diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf66aac603..5c6dcc1ba1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: - name: Linting run: yarn run lint - name: Unit Tests - run: yarn run test --maxWorkers=2 + run: yarn run test react-e2e: name: React end-to-end tests diff --git a/exchanges/auth/package.json b/exchanges/auth/package.json index f46a2279f7..30dcc2b7d7 100644 --- a/exchanges/auth/package.json +++ b/exchanges/auth/package.json @@ -39,7 +39,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist extras", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -47,9 +47,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "dependencies": { "@urql/core": ">=3.0.0", "wonka": "^6.0.0" diff --git a/exchanges/auth/src/authExchange.test.ts b/exchanges/auth/src/authExchange.test.ts index 3126c853cd..5227688d67 100644 --- a/exchanges/auth/src/authExchange.test.ts +++ b/exchanges/auth/src/authExchange.test.ts @@ -9,6 +9,7 @@ import { tap, map, } from 'wonka'; +import { vi, expect, it } from 'vitest'; import { print } from 'graphql'; import { authExchange } from './authExchange'; @@ -19,11 +20,11 @@ import { Operation, OperationResult, } from '@urql/core'; -import { queryOperation } from '@urql/core/test-utils'; +import { queryOperation } from '../../../packages/core/src/test-utils'; const makeExchangeArgs = () => { const operations: Operation[] = []; - const result = jest.fn( + const result = vi.fn( (operation: Operation): OperationResult => ({ operation }) ); @@ -146,7 +147,7 @@ it('adds the same token to subsequent operations', async () => { const { exchangeArgs } = makeExchangeArgs(); const { source, next } = makeSubject(); - const result = jest.fn(); + const result = vi.fn(); const auth$ = pipe( source, authExchange({ @@ -200,9 +201,9 @@ it('triggers authentication when an operation did error', async () => { let initialAuth; let afterErrorAuth; - const didAuthError = jest.fn().mockReturnValueOnce(true); + const didAuthError = vi.fn().mockReturnValueOnce(true); - const getAuth = jest + const getAuth = vi .fn() .mockImplementationOnce(() => { initialAuth = Promise.resolve({ token: 'initial-token' }); @@ -229,8 +230,11 @@ it('triggers authentication when an operation did error', async () => { await Promise.resolve(); expect(getAuth).toHaveBeenCalledTimes(1); await initialAuth; - await Promise.resolve(); - await Promise.resolve(); + await new Promise(res => { + setTimeout(() => { + res(null); + }); + }); result.mockReturnValueOnce({ operation: queryOperation, @@ -245,6 +249,11 @@ it('triggers authentication when an operation did error', async () => { expect(getAuth).toHaveBeenCalledTimes(2); await afterErrorAuth; + await new Promise(res => { + setTimeout(() => { + res(null); + }); + }); expect(result).toHaveBeenCalledTimes(2); expect(operations.length).toBe(2); @@ -265,16 +274,17 @@ it('triggers authentication when an operation will error', async () => { let initialAuth; let afterErrorAuth; - const willAuthError = jest + vi.useRealTimers(); + const willAuthError = vi .fn() .mockReturnValueOnce(true) .mockReturnValue(false); - const getAuth = jest + const getAuth = vi .fn() - .mockImplementationOnce(() => { + .mockImplementationOnce(async () => { initialAuth = Promise.resolve({ token: 'initial-token' }); - return initialAuth; + return await initialAuth; }) .mockImplementationOnce(() => { afterErrorAuth = Promise.resolve({ token: 'final-token' }); @@ -297,8 +307,11 @@ it('triggers authentication when an operation will error', async () => { await Promise.resolve(); expect(getAuth).toHaveBeenCalledTimes(1); await initialAuth; - await Promise.resolve(); - await Promise.resolve(); + await new Promise(res => { + setTimeout(() => { + res(null); + }); + }); next(queryOperation); expect(result).toHaveBeenCalledTimes(0); @@ -307,6 +320,12 @@ it('triggers authentication when an operation will error', async () => { await afterErrorAuth; + await new Promise(res => { + setTimeout(() => { + res(null); + }); + }); + expect(result).toHaveBeenCalledTimes(1); expect(operations.length).toBe(1); expect(operations[0]).toHaveProperty( diff --git a/exchanges/context/package.json b/exchanges/context/package.json index 412aa99b8b..c3349aef65 100644 --- a/exchanges/context/package.json +++ b/exchanges/context/package.json @@ -38,7 +38,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist extras", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -46,9 +46,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "dependencies": { "@urql/core": ">=2.3.6", "wonka": "^6.0.0" diff --git a/exchanges/context/src/context.test.ts b/exchanges/context/src/context.test.ts index 6ab48bc53a..e16fd0535a 100644 --- a/exchanges/context/src/context.test.ts +++ b/exchanges/context/src/context.test.ts @@ -1,4 +1,5 @@ import { pipe, map, makeSubject, publish, tap } from 'wonka'; +import { vi, expect, it, beforeEach } from 'vitest'; import { gql, @@ -28,7 +29,7 @@ const queryOneData = { }, }; -const dispatchDebug = jest.fn(); +const dispatchDebug = vi.fn(); let client, op, ops$, next; beforeEach(() => { client = createClient({ url: 'http://0.0.0.0' }); @@ -41,7 +42,7 @@ beforeEach(() => { }); it(`calls getContext`, () => { - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { return { operation: forwardOp, @@ -50,7 +51,7 @@ it(`calls getContext`, () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; @@ -75,8 +76,8 @@ it(`calls getContext`, () => { expect(result).toHaveBeenCalledTimes(1); }); -it(`calls getContext async`, done => { - const response = jest.fn( +it(`calls getContext async`, async () => { + const response = vi.fn( (forwardOp: Operation): OperationResult => { return { operation: forwardOp, @@ -85,7 +86,7 @@ it(`calls getContext async`, done => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; @@ -108,10 +109,12 @@ it(`calls getContext async`, done => { next(op); - setTimeout(() => { - expect(response).toHaveBeenCalledTimes(1); - expect(response.mock.calls[0][0].context.headers).toEqual(headers); - expect(result).toHaveBeenCalledTimes(1); - done(); - }, 10); + await new Promise(res => { + setTimeout(() => { + expect(response).toHaveBeenCalledTimes(1); + expect(response.mock.calls[0][0].context.headers).toEqual(headers); + expect(result).toHaveBeenCalledTimes(1); + res(null); + }, 10); + }); }); diff --git a/exchanges/execute/package.json b/exchanges/execute/package.json index f607731b6f..e9dd606306 100644 --- a/exchanges/execute/package.json +++ b/exchanges/execute/package.json @@ -39,7 +39,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist extras", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -47,9 +47,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "dependencies": { "@urql/core": ">=3.0.0", "wonka": "^6.0.0" diff --git a/exchanges/execute/src/execute.test.ts b/exchanges/execute/src/execute.test.ts index a80d35e7c7..2817ad9e25 100644 --- a/exchanges/execute/src/execute.test.ts +++ b/exchanges/execute/src/execute.test.ts @@ -1,12 +1,14 @@ -jest.mock('graphql', () => { - const graphql = jest.requireActual('graphql'); +import { vi, expect, it, beforeEach, afterEach, describe, Mock } from 'vitest'; + +vi.mock('graphql', async () => { + const graphql = await vi.importActual('graphql'); return { __esModule: true, - ...graphql, - print: jest.fn(() => '{ placeholder }'), - execute: jest.fn(() => ({ key: 'value' })), - subscribe: jest.fn(), + ...(graphql as object), + print: vi.fn(() => '{ placeholder }'), + execute: vi.fn(() => ({ key: 'value' })), + subscribe: vi.fn(), }; }); @@ -26,7 +28,7 @@ import { context, queryOperation, subscriptionOperation, -} from '@urql/core/test-utils'; +} from '../../../packages/core/src/test-utils'; import { makeErrorResult, makeOperation, @@ -48,11 +50,11 @@ const expectedSubscribeOperationName = getOperationName( subscriptionOperation.query ); -const fetchMock = (global as any).fetch as jest.Mock; +const fetchMock = (global as any).fetch as Mock; const mockHttpResponseData = { key: 'value' }; beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); mocked(print).mockImplementation(a => a as any); mocked(execute).mockResolvedValue({ data: mockHttpResponseData }); mocked(subscribe).mockImplementation(async function* x(this: any) { @@ -167,7 +169,7 @@ describe('on operation', () => { fetchMock.mockResolvedValue({ status: 200, - text: jest + text: vi .fn() .mockResolvedValue(JSON.stringify({ data: mockHttpResponseData })), }); @@ -175,7 +177,7 @@ describe('on operation', () => { const responseFromFetchExchange = await pipe( fromValue(queryOperation), fetchExchange({ - dispatchDebug: jest.fn(), + dispatchDebug: vi.fn(), forward: () => empty as Source, client: {} as Client, }), diff --git a/exchanges/graphcache/package.json b/exchanges/graphcache/package.json index c5d29740f3..409f197fae 100644 --- a/exchanges/graphcache/package.json +++ b/exchanges/graphcache/package.json @@ -53,7 +53,7 @@ "default-storage/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist extras", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -61,9 +61,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "dependencies": { "@urql/core": ">=3.0.5", "wonka": "^6.0.0" diff --git a/exchanges/graphcache/src/ast/schemaPredicates.test.ts b/exchanges/graphcache/src/ast/schemaPredicates.test.ts index 82f20ba1fc..cf2af32190 100644 --- a/exchanges/graphcache/src/ast/schemaPredicates.test.ts +++ b/exchanges/graphcache/src/ast/schemaPredicates.test.ts @@ -1,4 +1,6 @@ import { Kind, InlineFragmentNode } from 'graphql'; +import { describe, it, expect } from 'vitest'; + import { buildClientSchema } from './schema'; import * as SchemaPredicates from './schemaPredicates'; import { minifyIntrospectionQuery } from '@urql/introspection'; diff --git a/exchanges/graphcache/src/ast/traversal.test.ts b/exchanges/graphcache/src/ast/traversal.test.ts index 86479f8557..16e45938c2 100644 --- a/exchanges/graphcache/src/ast/traversal.test.ts +++ b/exchanges/graphcache/src/ast/traversal.test.ts @@ -1,6 +1,7 @@ import { gql } from '@urql/core'; -import { getSelectionSet } from './node'; +import { describe, it, expect } from 'vitest'; +import { getSelectionSet } from './node'; import { getMainOperation, shouldInclude } from './traversal'; describe('getMainOperation', () => { diff --git a/exchanges/graphcache/src/ast/variables.test.ts b/exchanges/graphcache/src/ast/variables.test.ts index cc387049ff..4291290057 100644 --- a/exchanges/graphcache/src/ast/variables.test.ts +++ b/exchanges/graphcache/src/ast/variables.test.ts @@ -1,4 +1,5 @@ import { gql } from '@urql/core'; +import { describe, it, expect } from 'vitest'; import { getMainOperation } from './traversal'; import { normalizeVariables, filterVariables } from './variables'; diff --git a/exchanges/graphcache/src/cacheExchange-types.test.ts b/exchanges/graphcache/src/cacheExchange-types.test.ts index d62f439d76..98444564b1 100644 --- a/exchanges/graphcache/src/cacheExchange-types.test.ts +++ b/exchanges/graphcache/src/cacheExchange-types.test.ts @@ -1,3 +1,4 @@ +import { describe, it } from 'vitest'; import { cacheExchange, Resolver as GraphCacheResolver, diff --git a/exchanges/graphcache/src/cacheExchange.test.ts b/exchanges/graphcache/src/cacheExchange.test.ts index 0c82e076fc..493caf4c75 100644 --- a/exchanges/graphcache/src/cacheExchange.test.ts +++ b/exchanges/graphcache/src/cacheExchange.test.ts @@ -6,6 +6,7 @@ import { OperationResult, CombinedError, } from '@urql/core'; +import { vi, expect, it, describe } from 'vitest'; import { Source, @@ -49,7 +50,7 @@ const queryOneData = { }, }; -const dispatchDebug = jest.fn(); +const dispatchDebug = vi.fn(); describe('data dependencies', () => { it('writes queries to the cache', () => { @@ -72,7 +73,7 @@ describe('data dependencies', () => { }, }; - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { expect(forwardOp.key).toBe(op.key); return { operation: forwardOp, data: expected }; @@ -80,7 +81,7 @@ describe('data dependencies', () => { ); const { source: ops$, next } = makeSubject(); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); pipe( @@ -121,7 +122,7 @@ describe('data dependencies', () => { } ); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { expect(forwardOp.key).toBe(op.key); return { operation: forwardOp, data: queryOneData }; @@ -129,7 +130,7 @@ describe('data dependencies', () => { ); const { source: ops$, next } = makeSubject(); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); pipe( @@ -174,7 +175,7 @@ describe('data dependencies', () => { const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(next); @@ -188,7 +189,7 @@ describe('data dependencies', () => { query: queryMultiple, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opOne, data: queryOneData }; @@ -201,7 +202,7 @@ describe('data dependencies', () => { ); const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); - const result = jest.fn(); + const result = vi.fn(); pipe( cacheExchange({})({ forward, client, dispatchDebug })(ops$), @@ -227,7 +228,7 @@ describe('data dependencies', () => { }); it('updates related queries when a mutation update touches query data', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const balanceFragment = gql` fragment BalanceFragment on Author { @@ -302,7 +303,7 @@ describe('data dependencies', () => { const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(next); @@ -324,7 +325,7 @@ describe('data dependencies', () => { variables: { userId: '1', amount: 1000 }, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opOne, data: queryByIdDataA }; @@ -338,12 +339,12 @@ describe('data dependencies', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(1), map(response)); const updates = { Mutation: { - updateBalance: jest.fn((result, _args, cache) => { + updateBalance: vi.fn((result, _args, cache) => { const { updateBalance: { userId, balance }, } = result; @@ -365,15 +366,15 @@ describe('data dependencies', () => { ); next(opTwo); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); next(opOne); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(2); next(opMutation); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(3); expect(updates.Mutation.updateBalance).toHaveBeenCalledTimes(1); @@ -408,7 +409,7 @@ describe('data dependencies', () => { const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(next); @@ -421,7 +422,7 @@ describe('data dependencies', () => { query: queryUnrelated, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opOne, data: queryOneData }; @@ -434,7 +435,7 @@ describe('data dependencies', () => { ); const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); - const result = jest.fn(); + const result = vi.fn(); pipe( cacheExchange({})({ forward, client, dispatchDebug })(ops$), @@ -453,7 +454,7 @@ describe('data dependencies', () => { }); it('does not reach updater when mutation has no selectionset in optimistic phase', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const mutation = gql` mutation { @@ -469,14 +470,14 @@ describe('data dependencies', () => { const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - jest.spyOn(client, 'reexecuteOperation').mockImplementation(next); + vi.spyOn(client, 'reexecuteOperation').mockImplementation(next); const opMutation = client.createRequestOperation('mutation', { key: 1, query: mutation, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opMutation, data: mutationData }; @@ -486,12 +487,12 @@ describe('data dependencies', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(1), map(response)); const updates = { Mutation: { - concealAuthor: jest.fn(), + concealAuthor: vi.fn(), }, }; @@ -504,12 +505,12 @@ describe('data dependencies', () => { next(opMutation); expect(updates.Mutation.concealAuthor).toHaveBeenCalledTimes(0); - jest.runAllTimers(); + vi.runAllTimers(); expect(updates.Mutation.concealAuthor).toHaveBeenCalledTimes(1); }); it('does reach updater when mutation has no selectionset in optimistic phase with optimistic update', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const mutation = gql` mutation { @@ -525,14 +526,14 @@ describe('data dependencies', () => { const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - jest.spyOn(client, 'reexecuteOperation').mockImplementation(next); + vi.spyOn(client, 'reexecuteOperation').mockImplementation(next); const opMutation = client.createRequestOperation('mutation', { key: 1, query: mutation, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opMutation, data: mutationData }; @@ -542,17 +543,17 @@ describe('data dependencies', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(1), map(response)); const updates = { Mutation: { - concealAuthor: jest.fn(), + concealAuthor: vi.fn(), }, }; const optimistic = { - concealAuthor: jest.fn(() => true) as any, + concealAuthor: vi.fn(() => true) as any, }; pipe( @@ -569,7 +570,7 @@ describe('data dependencies', () => { expect(optimistic.concealAuthor).toHaveBeenCalledTimes(1); expect(updates.Mutation.concealAuthor).toHaveBeenCalledTimes(1); - jest.runAllTimers(); + vi.runAllTimers(); expect(updates.Mutation.concealAuthor).toHaveBeenCalledTimes(2); }); @@ -608,18 +609,18 @@ describe('data dependencies', () => { }), }; - const reexecuteOperation = jest + const reexecuteOperation = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(next); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) return queryResult; return undefined as any; } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); pipe( @@ -639,7 +640,7 @@ describe('data dependencies', () => { describe('optimistic updates', () => { it('writes optimistic mutations to the cache', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const mutation = gql` mutation { @@ -673,7 +674,7 @@ describe('optimistic updates', () => { const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(next); @@ -687,7 +688,7 @@ describe('optimistic updates', () => { query: mutation, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opOne, data: queryOneData }; @@ -699,11 +700,11 @@ describe('optimistic updates', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(1), map(response)); const optimistic = { - concealAuthor: jest.fn(() => optimisticMutationData.concealAuthor) as any, + concealAuthor: vi.fn(() => optimisticMutationData.concealAuthor) as any, }; pipe( @@ -713,7 +714,7 @@ describe('optimistic updates', () => { ); next(opOne); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); next(opMutation); @@ -726,13 +727,13 @@ describe('optimistic updates', () => { author: { name: '[REDACTED OFFLINE]' }, }); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(2); expect(result).toHaveBeenCalledTimes(4); }); it('batches optimistic mutation result application', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const mutation = gql` mutation { @@ -764,7 +765,7 @@ describe('optimistic updates', () => { const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(next); @@ -783,7 +784,7 @@ describe('optimistic updates', () => { query: mutation, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opOne, data: queryOneData }; @@ -797,11 +798,11 @@ describe('optimistic updates', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(3), map(response)); const optimistic = { - concealAuthor: jest.fn(() => optimisticMutationData.concealAuthor) as any, + concealAuthor: vi.fn(() => optimisticMutationData.concealAuthor) as any, }; pipe( @@ -812,12 +813,12 @@ describe('optimistic updates', () => { ); next(opOne); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); expect(result).toHaveBeenCalledTimes(0); next(opMutationOne); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); next(opMutationTwo); expect(response).toHaveBeenCalledTimes(1); @@ -825,17 +826,17 @@ describe('optimistic updates', () => { expect(reexec).toHaveBeenCalledTimes(2); expect(result).toHaveBeenCalledTimes(0); - jest.advanceTimersByTime(2); + vi.advanceTimersByTime(2); expect(response).toHaveBeenCalledTimes(2); expect(result).toHaveBeenCalledTimes(0); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(3); expect(result).toHaveBeenCalledTimes(2); }); it('blocks refetches of overlapping queries', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const mutation = gql` mutation { @@ -858,7 +859,7 @@ describe('optimistic updates', () => { const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(next); @@ -878,7 +879,7 @@ describe('optimistic updates', () => { query: mutation, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opOne, data: queryOneData }; @@ -888,7 +889,7 @@ describe('optimistic updates', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe( ops$, @@ -898,7 +899,7 @@ describe('optimistic updates', () => { ); const optimistic = { - concealAuthor: jest.fn(() => optimisticMutationData.concealAuthor) as any, + concealAuthor: vi.fn(() => optimisticMutationData.concealAuthor) as any, }; pipe( @@ -908,7 +909,7 @@ describe('optimistic updates', () => { ); next(opOne); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); next(opMutation); @@ -921,7 +922,7 @@ describe('optimistic updates', () => { 'cache-first' ); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); next(opOne); @@ -930,7 +931,7 @@ describe('optimistic updates', () => { }); it('correctly clears on error', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const authorsQuery = gql` query { @@ -973,7 +974,7 @@ describe('optimistic updates', () => { const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(next); @@ -987,7 +988,7 @@ describe('optimistic updates', () => { query: mutation, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opOne, data: authorsQueryData }; @@ -1003,16 +1004,16 @@ describe('optimistic updates', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(1), map(response)); const optimistic = { - addAuthor: jest.fn(() => optimisticMutationData.addAuthor) as any, + addAuthor: vi.fn(() => optimisticMutationData.addAuthor) as any, }; const updates = { Mutation: { - addAuthor: jest.fn((data, _, cache) => { + addAuthor: vi.fn((data, _, cache) => { cache.updateQuery({ query: authorsQuery }, (prevData: any) => ({ ...prevData, authors: [...prevData.authors, data.addAuthor], @@ -1032,7 +1033,7 @@ describe('optimistic updates', () => { ); next(opOne); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); next(opMutation); @@ -1041,7 +1042,7 @@ describe('optimistic updates', () => { expect(updates.Mutation.addAuthor).toHaveBeenCalledTimes(1); expect(reexec).toHaveBeenCalledTimes(1); - jest.runAllTimers(); + vi.runAllTimers(); expect(updates.Mutation.addAuthor).toHaveBeenCalledTimes(2); expect(response).toHaveBeenCalledTimes(2); @@ -1059,7 +1060,7 @@ describe('custom resolvers', () => { query: queryOne, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opOne, data: queryOneData }; @@ -1071,8 +1072,8 @@ describe('custom resolvers', () => { const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); - const result = jest.fn(); - const fakeResolver = jest.fn(); + const result = vi.fn(); + const fakeResolver = vi.fn(); pipe( cacheExchange({ @@ -1102,7 +1103,7 @@ describe('custom resolvers', () => { }); it('follows resolvers for mutations', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const mutation = gql` mutation { @@ -1136,7 +1137,7 @@ describe('custom resolvers', () => { query: mutation, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: opOne, data: queryOneData }; @@ -1148,10 +1149,10 @@ describe('custom resolvers', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(1), map(response)); - const fakeResolver = jest.fn(); + const fakeResolver = vi.fn(); pipe( cacheExchange({ @@ -1169,14 +1170,14 @@ describe('custom resolvers', () => { ); next(opOne); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); next(opMutation); expect(response).toHaveBeenCalledTimes(1); expect(fakeResolver).toHaveBeenCalledTimes(1); - jest.runAllTimers(); + vi.runAllTimers(); expect(result.mock.calls[1][0].data).toEqual({ __typename: 'Mutation', concealAuthor: { @@ -1188,7 +1189,7 @@ describe('custom resolvers', () => { }); it('follows nested resolvers for mutations', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const mutation = gql` mutation { @@ -1277,7 +1278,7 @@ describe('custom resolvers', () => { ], }; - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: queryOperation, data: queryData }; @@ -1289,10 +1290,10 @@ describe('custom resolvers', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(1), map(response)); - const fakeResolver = jest.fn(); + const fakeResolver = vi.fn(); const called: any[] = []; pipe( @@ -1323,12 +1324,12 @@ describe('custom resolvers', () => { ); next(queryOperation); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); expect(fakeResolver).toHaveBeenCalledTimes(3); next(mutationOperation); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(2); expect(fakeResolver).toHaveBeenCalledTimes(6); expect(result.mock.calls[1][0].data).toEqual({ @@ -1368,10 +1369,10 @@ describe('custom resolvers', () => { describe('schema awareness', () => { it('reexecutes query and returns data on partial result', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') // Empty mock to avoid going in an endless loop, since we would again return // partial data. @@ -1429,7 +1430,7 @@ describe('schema awareness', () => { ], }; - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: initialQueryOperation, data: queryData }; @@ -1441,7 +1442,7 @@ describe('schema awareness', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(1), map(response)); pipe( @@ -1456,7 +1457,7 @@ describe('schema awareness', () => { ); next(initialQueryOperation); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); expect(reexec).toHaveBeenCalledTimes(0); expect(result.mock.calls[0][0].data).toMatchObject({ @@ -1474,13 +1475,12 @@ describe('schema awareness', () => { ], }); - expect(result.mock.calls[0][0]).toHaveProperty( - 'operation.context.meta', - undefined + expect(result.mock.calls[0][0]).not.toHaveProperty( + 'operation.context.meta' ); next(queryOperation); - jest.runAllTimers(); + vi.runAllTimers(); expect(result).toHaveBeenCalledTimes(2); expect(reexec).toHaveBeenCalledTimes(1); expect(result.mock.calls[1][0].stale).toBe(true); @@ -1510,10 +1510,10 @@ describe('schema awareness', () => { }); it('reexecutes query and returns data on partial results for nullable lists', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const client = createClient({ url: 'http://0.0.0.0' }); const { source: ops$, next } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') // Empty mock to avoid going in an endless loop, since we would again return // partial data. @@ -1562,7 +1562,7 @@ describe('schema awareness', () => { ], }; - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === 1) { return { operation: initialQueryOperation, data: queryData }; @@ -1574,7 +1574,7 @@ describe('schema awareness', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, delay(1), map(response)); pipe( @@ -1589,7 +1589,7 @@ describe('schema awareness', () => { ); next(initialQueryOperation); - jest.runAllTimers(); + vi.runAllTimers(); expect(response).toHaveBeenCalledTimes(1); expect(reexec).toHaveBeenCalledTimes(0); expect(result.mock.calls[0][0].data).toMatchObject({ @@ -1605,13 +1605,12 @@ describe('schema awareness', () => { ], }); - expect(result.mock.calls[0][0]).toHaveProperty( - 'operation.context.meta', - undefined + expect(result.mock.calls[0][0]).not.toHaveProperty( + 'operation.context.meta' ); next(queryOperation); - jest.runAllTimers(); + vi.runAllTimers(); expect(result).toHaveBeenCalledTimes(2); expect(reexec).toHaveBeenCalledTimes(1); expect(result.mock.calls[1][0].stale).toBe(true); @@ -1628,7 +1627,7 @@ describe('schema awareness', () => { describe('commutativity', () => { it('applies results that come in out-of-order commutatively and consistently', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); let data: any; @@ -1655,7 +1654,7 @@ describe('commutativity', () => { delay(operation.key === 2 ? 5 : operation.key * 10) ); - const output = jest.fn(result => { + const output = vi.fn(result => { data = result.data; }); @@ -1680,15 +1679,15 @@ describe('commutativity', () => { next(client.createRequestOperation('query', { key: 3, query })); - jest.advanceTimersByTime(5); + vi.advanceTimersByTime(5); expect(output).toHaveBeenCalledTimes(1); expect(data.index).toBe(2); - jest.advanceTimersByTime(10); + vi.advanceTimersByTime(10); expect(output).toHaveBeenCalledTimes(2); expect(data.index).toBe(2); - jest.advanceTimersByTime(30); + vi.advanceTimersByTime(30); expect(output).toHaveBeenCalledTimes(3); expect(data.index).toBe(3); }); @@ -1699,7 +1698,7 @@ describe('commutativity', () => { const { source: ops$, next: nextOp } = makeSubject(); const { source: res$, next: nextRes } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(nextOp); @@ -1801,7 +1800,7 @@ describe('commutativity', () => { const { source: ops$, next: nextOp } = makeSubject(); const { source: res$, next: nextRes } = makeSubject(); - const reexec = jest + const reexec = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(nextOp); @@ -1906,7 +1905,7 @@ describe('commutativity', () => { const { source: ops$, next: nextOp } = makeSubject(); const { source: res$, next: nextRes } = makeSubject(); - jest.spyOn(client, 'reexecuteOperation').mockImplementation(nextOp); + vi.spyOn(client, 'reexecuteOperation').mockImplementation(nextOp); const query = gql` { @@ -2000,7 +1999,7 @@ describe('commutativity', () => { const { source: ops$, next: nextOp } = makeSubject(); const { source: res$, next: nextRes } = makeSubject(); - jest.spyOn(client, 'reexecuteOperation').mockImplementation(nextOp); + vi.spyOn(client, 'reexecuteOperation').mockImplementation(nextOp); const query = gql` { @@ -2082,7 +2081,7 @@ describe('commutativity', () => { const { source: ops$, next: nextOp } = makeSubject(); const { source: res$, next: nextRes } = makeSubject(); - jest.spyOn(client, 'reexecuteOperation').mockImplementation(nextOp); + vi.spyOn(client, 'reexecuteOperation').mockImplementation(nextOp); const query = gql` { @@ -2206,7 +2205,7 @@ describe('commutativity', () => { const { source: ops$, next: nextOp } = makeSubject(); const { source: res$, next: nextRes } = makeSubject(); - jest.spyOn(client, 'reexecuteOperation').mockImplementation(nextOp); + vi.spyOn(client, 'reexecuteOperation').mockImplementation(nextOp); const normalQuery = gql` { @@ -2293,7 +2292,7 @@ describe('commutativity', () => { hasNext: true, }); - expect(deferredData).toHaveProperty('deferred', undefined); + expect(deferredData).not.toHaveProperty('deferred'); nextRes({ operation: normalOp, @@ -2308,7 +2307,7 @@ describe('commutativity', () => { }); expect(normalData).toHaveProperty('node.id', 2); - expect(combinedData).toHaveProperty('deferred', undefined); + expect(combinedData).not.toHaveProperty('deferred'); expect(combinedData).toHaveProperty('node.id', 2); nextRes({ diff --git a/exchanges/graphcache/src/extras/relayPagination.test.ts b/exchanges/graphcache/src/extras/relayPagination.test.ts index caac5fd805..1add1507e8 100644 --- a/exchanges/graphcache/src/extras/relayPagination.test.ts +++ b/exchanges/graphcache/src/extras/relayPagination.test.ts @@ -1,4 +1,5 @@ import { gql } from '@urql/core'; +import { it, expect } from 'vitest'; import { query, write } from '../operations'; import { Store } from '../store'; import { relayPagination } from './relayPagination'; @@ -592,16 +593,10 @@ it('prevents overlapping of pagination on different arguments', () => { variables: { filter: 'three' }, }); - expect(resOne.data).toHaveProperty( - ['items', 'edges', 0, 'node', 'id'], - 'one' - ); + expect(resOne.data).toHaveProperty('items.edges[0].node.id', 'one'); expect(resOne.data).toHaveProperty('items.edges.length', 1); - expect(resTwo.data).toHaveProperty( - ['items', 'edges', 0, 'node', 'id'], - 'two' - ); + expect(resTwo.data).toHaveProperty('items.edges[0].node.id', 'two'); expect(resTwo.data).toHaveProperty('items.edges.length', 1); expect(resThree.data).toEqual(null); diff --git a/exchanges/graphcache/src/extras/simplePagination.test.ts b/exchanges/graphcache/src/extras/simplePagination.test.ts index 4cf07080f4..34187a9d2a 100644 --- a/exchanges/graphcache/src/extras/simplePagination.test.ts +++ b/exchanges/graphcache/src/extras/simplePagination.test.ts @@ -1,4 +1,5 @@ import { gql } from '@urql/core'; +import { it, expect } from 'vitest'; import { query, write } from '../operations'; import { Store } from '../store'; import { simplePagination } from './simplePagination'; @@ -425,10 +426,10 @@ it('prevents overlapping of pagination on different arguments', () => { variables: { filter: 'three', skip: 2, limit: 1 }, }); - expect(resOne.data).toHaveProperty(['persons', 0, 'id'], 'one'); + expect(resOne.data).toHaveProperty('persons[0].id', 'one'); expect(resOne.data).toHaveProperty('persons.length', 1); - expect(resTwo.data).toHaveProperty(['persons', 0, 'id'], 'two'); + expect(resTwo.data).toHaveProperty('persons[0].id', 'two'); expect(resTwo.data).toHaveProperty('persons.length', 1); expect(resThree.data).toEqual(null); diff --git a/exchanges/graphcache/src/offlineExchange.test.ts b/exchanges/graphcache/src/offlineExchange.test.ts index 7a762bf7b5..ebc5f1d1b5 100644 --- a/exchanges/graphcache/src/offlineExchange.test.ts +++ b/exchanges/graphcache/src/offlineExchange.test.ts @@ -6,6 +6,7 @@ import { OperationResult, } from '@urql/core'; import { print } from 'graphql'; +import { vi, expect, it, describe } from 'vitest'; import { pipe, map, makeSubject, tap, publish } from 'wonka'; import { offlineExchange } from './offlineExchange'; @@ -49,20 +50,20 @@ const queryOneData = { ], }; -const dispatchDebug = jest.fn(); +const dispatchDebug = vi.fn(); const storage = { - onOnline: jest.fn(), - writeData: jest.fn(() => Promise.resolve(undefined)), - writeMetadata: jest.fn(() => Promise.resolve(undefined)), - readData: jest.fn(() => Promise.resolve(undefined)), - readMetadata: jest.fn(() => Promise.resolve(undefined)), + onOnline: vi.fn(), + writeData: vi.fn(() => Promise.resolve(undefined)), + writeMetadata: vi.fn(() => Promise.resolve(undefined)), + readData: vi.fn(() => Promise.resolve(undefined)), + readMetadata: vi.fn(() => Promise.resolve(undefined)), }; describe('storage', () => { it('should read the metadata and dispatch operations on initialization', () => { const client = createClient({ url: 'http://0.0.0.0' }); - const reexecuteOperation = jest + const reexecuteOperation = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(() => undefined); const op = client.createRequestOperation('mutation', { @@ -71,7 +72,7 @@ describe('storage', () => { variables: {}, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { expect(forwardOp.key).toBe(op.key); return { operation: forwardOp, data: mutationOneData }; @@ -79,16 +80,16 @@ describe('storage', () => { ); const { source: ops$ } = makeSubject(); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); - jest.useFakeTimers(); + vi.useFakeTimers(); pipe( offlineExchange({ storage })({ forward, client, dispatchDebug })(ops$), tap(result), publish ); - jest.runAllTimers(); + vi.runAllTimers(); expect(storage.readMetadata).toBeCalledTimes(1); expect(reexecuteOperation).toBeCalledTimes(0); @@ -97,7 +98,7 @@ describe('storage', () => { describe('offline', () => { it('should intercept errored mutations', () => { - const onlineSpy = jest.spyOn(navigator, 'onLine', 'get'); + const onlineSpy = vi.spyOn(navigator, 'onLine', 'get'); const client = createClient({ url: 'http://0.0.0.0' }); const queryOp = client.createRequestOperation('query', { @@ -112,7 +113,7 @@ describe('offline', () => { variables: {}, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { if (forwardOp.key === queryOp.key) { onlineSpy.mockReturnValueOnce(true); @@ -129,7 +130,7 @@ describe('offline', () => { ); const { source: ops$, next } = makeSubject(); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); pipe( @@ -176,7 +177,7 @@ describe('offline', () => { it('should intercept errored queries', async () => { const client = createClient({ url: 'http://0.0.0.0' }); - const onlineSpy = jest + const onlineSpy = vi .spyOn(navigator, 'onLine', 'get') .mockReturnValueOnce(false); @@ -185,7 +186,7 @@ describe('offline', () => { query: queryOne, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { onlineSpy.mockReturnValueOnce(false); return { @@ -197,7 +198,7 @@ describe('offline', () => { ); const { source: ops$, next } = makeSubject(); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); pipe( @@ -230,10 +231,10 @@ describe('offline', () => { flush = cb; }); - const onlineSpy = jest.spyOn(navigator, 'onLine', 'get'); + const onlineSpy = vi.spyOn(navigator, 'onLine', 'get'); const client = createClient({ url: 'http://0.0.0.0' }); - const reexecuteOperation = jest + const reexecuteOperation = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(() => undefined); @@ -243,7 +244,7 @@ describe('offline', () => { variables: {}, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { onlineSpy.mockReturnValueOnce(false); return { @@ -255,7 +256,7 @@ describe('offline', () => { ); const { source: ops$, next } = makeSubject(); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => pipe(ops$, map(response)); pipe( diff --git a/exchanges/graphcache/src/operations/query.test.ts b/exchanges/graphcache/src/operations/query.test.ts index 20335b3bba..5dd4493fe9 100644 --- a/exchanges/graphcache/src/operations/query.test.ts +++ b/exchanges/graphcache/src/operations/query.test.ts @@ -2,6 +2,7 @@ import { gql } from '@urql/core'; import { minifyIntrospectionQuery } from '@urql/introspection'; +import { describe, it, beforeEach, beforeAll, expect } from 'vitest'; import { Store } from '../store'; import { write } from './write'; diff --git a/exchanges/graphcache/src/operations/write.test.ts b/exchanges/graphcache/src/operations/write.test.ts index bdf5a9a305..daac0af5d3 100644 --- a/exchanges/graphcache/src/operations/write.test.ts +++ b/exchanges/graphcache/src/operations/write.test.ts @@ -2,6 +2,7 @@ import { gql, CombinedError } from '@urql/core'; import { minifyIntrospectionQuery } from '@urql/introspection'; +import { vi, expect, it, beforeEach, describe, beforeAll } from 'vitest'; import { write } from './write'; import * as InMemoryData from '../store/data'; @@ -47,7 +48,7 @@ describe('Query', () => { } ); - jest.clearAllMocks(); + vi.clearAllMocks(); }); it('should not crash for valid writes', async () => { diff --git a/exchanges/graphcache/src/store/__snapshots__/store.test.ts.snap b/exchanges/graphcache/src/store/__snapshots__/store.test.ts.snap index 15bfb793f1..1c80885ce6 100644 --- a/exchanges/graphcache/src/store/__snapshots__/store.test.ts.snap +++ b/exchanges/graphcache/src/store/__snapshots__/store.test.ts.snap @@ -1,15 +1,15 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 -exports[`Store with storage should be able to persist embedded data 1`] = ` -Object { +exports[`Store with storage > should be able to persist embedded data 1`] = ` +{ "Query%2eappointment({\\"id\\":\\"1\\"}).__typename": "\\"Appointment\\"", "Query%2eappointment({\\"id\\":\\"1\\"}).info": "\\"urql meeting\\"", "Query.appointment({\\"id\\":\\"1\\"})": ":\\"Query.appointment({\\\\\\"id\\\\\\":\\\\\\"1\\\\\\"})\\"", } `; -exports[`Store with storage should be able to store and rehydrate data 1`] = ` -Object { +exports[`Store with storage > should be able to store and rehydrate data 1`] = ` +{ "Appointment:1.__typename": "\\"Appointment\\"", "Appointment:1.id": "\\"1\\"", "Appointment:1.info": "\\"urql meeting\\"", diff --git a/exchanges/graphcache/src/store/data.test.ts b/exchanges/graphcache/src/store/data.test.ts index 55b08cb3f6..a4aa2f64cf 100644 --- a/exchanges/graphcache/src/store/data.test.ts +++ b/exchanges/graphcache/src/store/data.test.ts @@ -1,3 +1,4 @@ +import { describe, it, beforeEach, expect } from 'vitest'; import * as InMemoryData from './data'; import { keyOfField } from './keys'; @@ -121,26 +122,26 @@ describe('inspectFields', () => { InMemoryData.writeLink('Query', 'randomTodo', 'Todo:1'); expect(InMemoryData.inspectFields('Query')).toMatchInlineSnapshot(` - Array [ - Object { - "arguments": Object { + [ + { + "arguments": { "id": "1", }, "fieldKey": "todo({\\"id\\":\\"1\\"})", "fieldName": "todo", }, - Object { + { "arguments": null, "fieldKey": "randomTodo", "fieldName": "randomTodo", }, - Object { + { "arguments": null, "fieldKey": "__typename", "fieldName": "__typename", }, - Object { - "arguments": Object { + { + "arguments": { "id": "1", }, "fieldKey": "hasTodo({\\"id\\":\\"1\\"})", @@ -168,9 +169,7 @@ describe('inspectFields', () => { InMemoryData.initDataState('write', data, 1, true); InMemoryData.writeLink('Query', 'todo', 'Todo:1'); - expect(InMemoryData.inspectFields('Random')).toMatchInlineSnapshot( - `Array []` - ); + expect(InMemoryData.inspectFields('Random')).toMatchInlineSnapshot('[]'); }); it('avoids duplicate field infos', () => { @@ -180,8 +179,8 @@ describe('inspectFields', () => { InMemoryData.writeLink('Query', 'todo', 'Todo:2'); expect(InMemoryData.inspectFields('Query')).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "arguments": null, "fieldKey": "todo", "fieldName": "todo", diff --git a/exchanges/graphcache/src/store/store.test.ts b/exchanges/graphcache/src/store/store.test.ts index 2f3c8d3506..aee9d14c92 100644 --- a/exchanges/graphcache/src/store/store.test.ts +++ b/exchanges/graphcache/src/store/store.test.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ import { minifyIntrospectionQuery } from '@urql/introspection'; import { formatDocument, gql, maskTypename } from '@urql/core'; +import { vi, expect, it, beforeEach, describe } from 'vitest'; import { executeSync, @@ -851,8 +852,8 @@ describe('Store with storage', () => { it('should be able to store and rehydrate data', () => { const storage: StorageAdapter = { - readData: jest.fn(), - writeData: jest.fn(), + readData: vi.fn(), + writeData: vi.fn(), }; store.data.storage = storage; @@ -906,8 +907,8 @@ describe('Store with storage', () => { } as any; const storage: StorageAdapter = { - readData: jest.fn(), - writeData: jest.fn(), + readData: vi.fn(), + writeData: vi.fn(), }; store.data.storage = storage; @@ -943,8 +944,8 @@ describe('Store with storage', () => { it('persists commutative layers and ignores optimistic layers', () => { const storage: StorageAdapter = { - readData: jest.fn(), - writeData: jest.fn(), + readData: vi.fn(), + writeData: vi.fn(), }; store.data.storage = storage; @@ -1005,7 +1006,7 @@ describe('Store with storage', () => { }); it('should use different rootConfigs', function () { - const fakeUpdater = jest.fn(); + const fakeUpdater = vi.fn(); const store = new Store({ schema: { diff --git a/exchanges/graphcache/src/test-utils/examples-1.test.ts b/exchanges/graphcache/src/test-utils/examples-1.test.ts index 4bed1a511d..a0e20e586e 100644 --- a/exchanges/graphcache/src/test-utils/examples-1.test.ts +++ b/exchanges/graphcache/src/test-utils/examples-1.test.ts @@ -1,4 +1,5 @@ import { gql } from '@urql/core'; +import { it, expect, afterEach } from 'vitest'; import { query, write, writeOptimistic } from '../operations'; import * as InMemoryData from '../store/data'; import { Store } from '../store'; diff --git a/exchanges/graphcache/src/test-utils/examples-2.test.ts b/exchanges/graphcache/src/test-utils/examples-2.test.ts index 2d2f73e12c..a61c3ba172 100644 --- a/exchanges/graphcache/src/test-utils/examples-2.test.ts +++ b/exchanges/graphcache/src/test-utils/examples-2.test.ts @@ -1,4 +1,5 @@ import { gql } from '@urql/core'; +import { it, afterEach, expect } from 'vitest'; import { query, write } from '../operations'; import { Store } from '../store'; diff --git a/exchanges/graphcache/src/test-utils/examples-3.test.ts b/exchanges/graphcache/src/test-utils/examples-3.test.ts index 775ea0bedf..5784284ed1 100644 --- a/exchanges/graphcache/src/test-utils/examples-3.test.ts +++ b/exchanges/graphcache/src/test-utils/examples-3.test.ts @@ -1,4 +1,5 @@ import { gql } from '@urql/core'; +import { it, afterEach, expect } from 'vitest'; import { query, write } from '../operations'; import { Store } from '../store'; diff --git a/exchanges/graphcache/src/test-utils/suite.test.ts b/exchanges/graphcache/src/test-utils/suite.test.ts index 6c0c27ca71..ba12537cb9 100644 --- a/exchanges/graphcache/src/test-utils/suite.test.ts +++ b/exchanges/graphcache/src/test-utils/suite.test.ts @@ -1,5 +1,6 @@ import { DocumentNode } from 'graphql'; import { gql } from '@urql/core'; +import { it, expect } from 'vitest'; import { query, write } from '../operations'; import { Store } from '../store'; diff --git a/exchanges/multipart-fetch/package.json b/exchanges/multipart-fetch/package.json index f018d81d26..f80c3cb835 100644 --- a/exchanges/multipart-fetch/package.json +++ b/exchanges/multipart-fetch/package.json @@ -37,7 +37,7 @@ "extras/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist extras", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -45,9 +45,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "dependencies": { "@urql/core": ">=3.0.0", "extract-files": "^11.0.0", diff --git a/exchanges/multipart-fetch/src/__snapshots__/multipartFetchExchange.test.ts.snap b/exchanges/multipart-fetch/src/__snapshots__/multipartFetchExchange.test.ts.snap index 54b4b9aa42..c0630ff1dd 100644 --- a/exchanges/multipart-fetch/src/__snapshots__/multipartFetchExchange.test.ts.snap +++ b/exchanges/multipart-fetch/src/__snapshots__/multipartFetchExchange.test.ts.snap @@ -1,13 +1,13 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 -exports[`on error returns error data 1`] = ` -Object { +exports[`on error > returns error data 1`] = ` +{ "data": undefined, "error": [CombinedError: [Network] No Content], "extensions": undefined, - "operation": Object { - "context": Object { - "fetchOptions": Object { + "operation": { + "context": { + "fetchOptions": { "method": "POST", }, "requestPolicy": "cache-first", @@ -15,75 +15,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -94,21 +94,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -118,12 +118,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -132,28 +132,28 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on error returns error data with status 400 and manual redirect mode 1`] = ` -Object { +exports[`on error > returns error data with status 400 and manual redirect mode 1`] = ` +{ "data": undefined, "error": [CombinedError: [Network] No Content], "extensions": undefined, - "operation": Object { - "context": Object { - "fetchOptions": [MockFunction] { - "calls": Array [ - Array [], + "operation": { + "context": { + "fetchOptions": [MockFunction spy] { + "calls": [ + [], ], - "results": Array [ - Object { + "results": [ + { "type": "return", - "value": Object { + "value": { "redirect": "manual", }, }, @@ -164,75 +164,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -243,21 +243,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -267,12 +267,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -281,33 +281,33 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on success returns response data 1`] = ` -Object { - "data": Object { - "data": Object { +exports[`on success > returns response data 1`] = ` +{ + "data": { + "data": { "user": 1200, }, }, "error": undefined, "extensions": undefined, "hasNext": false, - "operation": Object { - "context": Object { - "fetchOptions": [MockFunction] { - "calls": Array [ - Array [], + "operation": { + "context": { + "fetchOptions": [MockFunction spy] { + "calls": [ + [], ], - "results": Array [ - Object { + "results": [ + { "type": "return", - "value": Object {}, + "value": {}, }, ], }, @@ -316,75 +316,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -395,21 +395,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -419,12 +419,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -433,35 +433,35 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on success returns response data 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}"`; +exports[`on success > returns response data 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}"`; -exports[`on success uses a file when given 1`] = ` -Object { - "data": Object { - "data": Object { +exports[`on success > uses a file when given 1`] = ` +{ + "data": { + "data": { "user": 1200, }, }, "error": undefined, "extensions": undefined, "hasNext": false, - "operation": Object { - "context": Object { - "fetchOptions": [MockFunction] { - "calls": Array [ - Array [], + "operation": { + "context": { + "fetchOptions": [MockFunction spy] { + "calls": [ + [], ], - "results": Array [ - Object { + "results": [ + { "type": "return", - "value": Object {}, + "value": {}, }, ], }, @@ -470,53 +470,53 @@ Object { }, "key": 3, "kind": "mutation", - "query": Object { + "query": { "__key": 4034972436, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "uploadProfilePicture", }, "operation": "mutation", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "picture", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "picture", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "uploadProfilePicture", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "location", }, @@ -527,21 +527,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "File", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "picture", }, @@ -551,12 +551,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 125, - "source": Object { + "source": { "body": "# uploadProfilePicture mutation uploadProfilePicture($picture: File) { uploadProfilePicture(picture: $picture) { location } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -565,41 +565,41 @@ mutation uploadProfilePicture($picture: File) { uploadProfilePicture(picture: $p "start": 0, }, }, - "variables": Object { + "variables": { "picture": File {}, }, }, } `; -exports[`on success uses a file when given 2`] = ` -Object { +exports[`on success > uses a file when given 2`] = ` +{ "accept": "application/graphql+json, application/json", } `; -exports[`on success uses a file when given 3`] = `FormData {}`; +exports[`on success > uses a file when given 3`] = `FormData {}`; -exports[`on success uses multiple files when given 1`] = ` -Object { - "data": Object { - "data": Object { +exports[`on success > uses multiple files when given 1`] = ` +{ + "data": { + "data": { "user": 1200, }, }, "error": undefined, "extensions": undefined, "hasNext": false, - "operation": Object { - "context": Object { - "fetchOptions": [MockFunction] { - "calls": Array [ - Array [], + "operation": { + "context": { + "fetchOptions": [MockFunction spy] { + "calls": [ + [], ], - "results": Array [ - Object { + "results": [ + { "type": "return", - "value": Object {}, + "value": {}, }, ], }, @@ -608,53 +608,53 @@ Object { }, "key": 3, "kind": "mutation", - "query": Object { + "query": { "__key": 2033658603, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "uploadProfilePictures", }, "operation": "mutation", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "pictures", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "pictures", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "uploadProfilePicture", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "location", }, @@ -665,24 +665,24 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "ListType", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "File", }, }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "pictures", }, @@ -692,12 +692,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 132, - "source": Object { + "source": { "body": "# uploadProfilePictures mutation uploadProfilePictures($pictures: [File]) { uploadProfilePicture(pictures: $pictures) { location } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -706,8 +706,8 @@ mutation uploadProfilePictures($pictures: [File]) { uploadProfilePicture(picture "start": 0, }, }, - "variables": Object { - "picture": Array [ + "variables": { + "picture": [ File {}, File {}, ], @@ -716,10 +716,10 @@ mutation uploadProfilePictures($pictures: [File]) { uploadProfilePicture(picture } `; -exports[`on success uses multiple files when given 2`] = ` -Object { +exports[`on success > uses multiple files when given 2`] = ` +{ "accept": "application/graphql+json, application/json", } `; -exports[`on success uses multiple files when given 3`] = `FormData {}`; +exports[`on success > uses multiple files when given 3`] = `FormData {}`; diff --git a/exchanges/multipart-fetch/src/multipartFetchExchange.test.ts b/exchanges/multipart-fetch/src/multipartFetchExchange.test.ts index d3c29d8de5..5fe71aaf58 100644 --- a/exchanges/multipart-fetch/src/multipartFetchExchange.test.ts +++ b/exchanges/multipart-fetch/src/multipartFetchExchange.test.ts @@ -1,5 +1,16 @@ import { Client, OperationResult, makeOperation } from '@urql/core'; import { empty, fromValue, pipe, Source, subscribe, toPromise } from 'wonka'; +import { + vi, + expect, + it, + beforeEach, + describe, + beforeAll, + Mock, + afterEach, + afterAll, +} from 'vitest'; import { multipartFetchExchange } from './multipartFetchExchange'; @@ -9,8 +20,8 @@ import { multipleUploadOperation, } from './test-utils'; -const fetch = (global as any).fetch as jest.Mock; -const abort = jest.fn(); +const fetch = (global as any).fetch as Mock; +const abort = vi.fn(); const abortError = new Error(); abortError.name = 'AbortError'; @@ -43,19 +54,19 @@ const response = JSON.stringify({ const exchangeArgs = { forward: () => empty as Source, client: {} as Client, - dispatchDebug: jest.fn(), + dispatchDebug: vi.fn(), }; describe('on success', () => { beforeEach(() => { fetch.mockResolvedValue({ status: 200, - text: jest.fn().mockResolvedValue(response), + text: vi.fn().mockResolvedValue(response), }); }); it('uses a file when given', async () => { - const fetchOptions = jest.fn().mockReturnValue({}); + const fetchOptions = vi.fn().mockReturnValue({}); const data = await pipe( fromValue({ @@ -76,7 +87,7 @@ describe('on success', () => { }); it('uses multiple files when given', async () => { - const fetchOptions = jest.fn().mockReturnValue({}); + const fetchOptions = vi.fn().mockReturnValue({}); const data = await pipe( fromValue({ @@ -97,7 +108,7 @@ describe('on success', () => { }); it('returns response data', async () => { - const fetchOptions = jest.fn().mockReturnValue({}); + const fetchOptions = vi.fn().mockReturnValue({}); const data = await pipe( fromValue({ @@ -121,7 +132,7 @@ describe('on error', () => { beforeEach(() => { fetch.mockResolvedValue({ status: 400, - text: jest.fn().mockResolvedValue('{}'), + text: vi.fn().mockResolvedValue('{}'), }); }); @@ -136,7 +147,7 @@ describe('on error', () => { }); it('returns error data with status 400 and manual redirect mode', async () => { - const fetchOptions = jest.fn().mockReturnValue({ redirect: 'manual' }); + const fetchOptions = vi.fn().mockReturnValue({ redirect: 'manual' }); const data = await pipe( fromValue({ @@ -156,7 +167,7 @@ describe('on error', () => { it('ignores the error when a result is available', async () => { fetch.mockResolvedValue({ status: 400, - text: jest.fn().mockResolvedValue(response), + text: vi.fn().mockResolvedValue(response), }); const data = await pipe( @@ -170,6 +181,10 @@ describe('on error', () => { }); describe('on teardown', () => { + const fail = () => { + expect(true).toEqual(false); + }; + it('does not start the outgoing request on immediate teardowns', () => { fetch.mockRejectedValueOnce(abortError); diff --git a/exchanges/persisted-fetch/package.json b/exchanges/persisted-fetch/package.json index fac9f0b155..833f0a732c 100644 --- a/exchanges/persisted-fetch/package.json +++ b/exchanges/persisted-fetch/package.json @@ -37,7 +37,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist extras", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -45,9 +45,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "dependencies": { "@urql/core": ">=3.0.0", "wonka": "^6.0.0" diff --git a/exchanges/persisted-fetch/src/__snapshots__/persistedFetchExchange.test.ts.snap b/exchanges/persisted-fetch/src/__snapshots__/persistedFetchExchange.test.ts.snap index 17a512b3c0..325c7c63e4 100644 --- a/exchanges/persisted-fetch/src/__snapshots__/persistedFetchExchange.test.ts.snap +++ b/exchanges/persisted-fetch/src/__snapshots__/persistedFetchExchange.test.ts.snap @@ -1,4 +1,4 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 exports[`accepts successful persisted query responses 1`] = `"{\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"},\\"extensions\\":{\\"persistedQuery\\":{\\"version\\":1,\\"sha256Hash\\":\\"b4228e10e04c59def248546d305b710309c1b297423b38eb64f989a89a398cd8\\"}}}"`; diff --git a/exchanges/persisted-fetch/src/persistedFetchExchange.test.ts b/exchanges/persisted-fetch/src/persistedFetchExchange.test.ts index 62bb2cb590..6fe67ff700 100644 --- a/exchanges/persisted-fetch/src/persistedFetchExchange.test.ts +++ b/exchanges/persisted-fetch/src/persistedFetchExchange.test.ts @@ -1,8 +1,9 @@ /** - * @jest-environment node + * @vitest-environment node */ import { empty, fromValue, fromArray, pipe, Source, toPromise } from 'wonka'; +import { vi, expect, it, afterEach, Mock } from 'vitest'; import { DocumentNode, print } from 'graphql'; import { Client, OperationResult } from '@urql/core'; @@ -11,14 +12,14 @@ import { queryOperation } from './test-utils'; import { hash } from './sha256'; import { persistedFetchExchange } from './persistedFetchExchange'; -const fetch = (global as any).fetch as jest.Mock; +const fetch = (global as any).fetch as Mock; const exchangeArgs = { - dispatchDebug: jest.fn(), + dispatchDebug: vi.fn(), forward: () => empty as Source, client: ({ debugTarget: { - dispatchEvent: jest.fn(), + dispatchEvent: vi.fn(), }, } as any) as Client, }; @@ -195,7 +196,7 @@ it('supports a custom hash function', async () => { text: () => Promise.resolve(expected), }); - const hashFn = jest.fn((_input: string, _doc: DocumentNode) => { + const hashFn = vi.fn((_input: string, _doc: DocumentNode) => { return Promise.resolve('hello'); }); @@ -238,7 +239,7 @@ it('falls back to a non-persisted query if the hash is falsy', async () => { text: () => Promise.resolve(expected), }); - const hashFn = jest.fn(() => Promise.resolve('')); + const hashFn = vi.fn(() => Promise.resolve('')); await pipe( fromValue(queryOperation), diff --git a/exchanges/populate/package.json b/exchanges/populate/package.json index 0eb97e4350..9fefdc66af 100644 --- a/exchanges/populate/package.json +++ b/exchanges/populate/package.json @@ -37,7 +37,7 @@ "extras/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist extras", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -45,9 +45,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "dependencies": { "@urql/core": ">=3.0.0", "wonka": "^6.0.0" diff --git a/exchanges/populate/src/populateExchange.test.ts b/exchanges/populate/src/populateExchange.test.ts index 94ce36c7be..112cab129c 100644 --- a/exchanges/populate/src/populateExchange.test.ts +++ b/exchanges/populate/src/populateExchange.test.ts @@ -7,6 +7,7 @@ import { ASTKindToNode, Kind, } from 'graphql'; +import { vi, expect, it, describe } from 'vitest'; import { fromValue, pipe, fromArray, toArray } from 'wonka'; import { @@ -109,12 +110,10 @@ const getNodesByType = ( const schema = introspectionFromSchema(buildSchema(schemaDef)); -beforeEach(jest.clearAllMocks); - const exchangeArgs = { forward: a => a as any, client: {} as Client, - dispatchDebug: jest.fn(), + dispatchDebug: vi.fn(), }; describe('on mutation', () => { diff --git a/exchanges/refocus/package.json b/exchanges/refocus/package.json index 1f35faec30..b7941032f2 100644 --- a/exchanges/refocus/package.json +++ b/exchanges/refocus/package.json @@ -39,7 +39,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -47,9 +47,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "devDependencies": { "@types/react": "^17.0.4", "graphql": "^16.0.0" diff --git a/exchanges/refocus/src/refocusExchange.test.ts b/exchanges/refocus/src/refocusExchange.test.ts index d8bbdf6474..178af829f9 100644 --- a/exchanges/refocus/src/refocusExchange.test.ts +++ b/exchanges/refocus/src/refocusExchange.test.ts @@ -1,4 +1,5 @@ import { pipe, map, makeSubject, publish, tap } from 'wonka'; +import { vi, expect, it, beforeEach } from 'vitest'; import { gql, @@ -10,7 +11,7 @@ import { import { refocusExchange } from './refocusExchange'; -const dispatchDebug = jest.fn(); +const dispatchDebug = vi.fn(); const queryOne = gql` { @@ -42,7 +43,7 @@ beforeEach(() => { }); it(`attaches a listener and redispatches queries on call`, () => { - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { return { operation: forwardOp, @@ -52,16 +53,16 @@ it(`attaches a listener and redispatches queries on call`, () => { ); let listener; - const spy = jest + const spy = vi .spyOn(window, 'addEventListener') .mockImplementation((_keyword, fn) => { listener = fn; }); - const reexecuteSpy = jest + const reexecuteSpy = vi .spyOn(client, 'reexecuteOperation') .mockImplementation(() => ({})); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; diff --git a/exchanges/request-policy/package.json b/exchanges/request-policy/package.json index 092b3d0693..197dbb0f8c 100644 --- a/exchanges/request-policy/package.json +++ b/exchanges/request-policy/package.json @@ -38,7 +38,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -46,9 +46,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "devDependencies": { "graphql": "^16.0.0" }, diff --git a/exchanges/request-policy/src/requestPolicyExchange.test.ts b/exchanges/request-policy/src/requestPolicyExchange.test.ts index bd33ee8661..16518ed5b6 100644 --- a/exchanges/request-policy/src/requestPolicyExchange.test.ts +++ b/exchanges/request-policy/src/requestPolicyExchange.test.ts @@ -1,4 +1,5 @@ import { pipe, map, makeSubject, publish, tap } from 'wonka'; +import { vi, expect, it, beforeEach } from 'vitest'; import { gql, @@ -10,7 +11,7 @@ import { import { requestPolicyExchange } from './requestPolicyExchange'; -const dispatchDebug = jest.fn(); +const dispatchDebug = vi.fn(); const mockOptions = { ttl: 5, @@ -45,8 +46,8 @@ beforeEach(() => { ({ source: ops$, next } = makeSubject()); }); -it(`upgrades to cache-and-network`, done => { - const response = jest.fn( +it(`upgrades to cache-and-network`, async () => { + const response = vi.fn( (forwardOp: Operation): OperationResult => { return { operation: forwardOp, @@ -55,7 +56,7 @@ it(`upgrades to cache-and-network`, done => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; @@ -78,19 +79,21 @@ it(`upgrades to cache-and-network`, done => { ); expect(result).toHaveBeenCalledTimes(1); - setTimeout(() => { - next(op); - expect(response).toHaveBeenCalledTimes(2); - expect(response.mock.calls[1][0].context.requestPolicy).toEqual( - 'cache-and-network' - ); - expect(result).toHaveBeenCalledTimes(2); - done(); - }, 10); + await new Promise(res => { + setTimeout(() => { + next(op); + expect(response).toHaveBeenCalledTimes(2); + expect(response.mock.calls[1][0].context.requestPolicy).toEqual( + 'cache-and-network' + ); + expect(result).toHaveBeenCalledTimes(2); + res(null); + }, 10); + }); }); -it(`doesn't upgrade when shouldUpgrade returns false`, done => { - const response = jest.fn( +it(`doesn't upgrade when shouldUpgrade returns false`, async () => { + const response = vi.fn( (forwardOp: Operation): OperationResult => { return { operation: forwardOp, @@ -99,12 +102,12 @@ it(`doesn't upgrade when shouldUpgrade returns false`, done => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; - const shouldUpgrade = jest.fn(() => false); + const shouldUpgrade = vi.fn(() => false); pipe( requestPolicyExchange({ ...mockOptions, shouldUpgrade })({ forward, @@ -123,14 +126,16 @@ it(`doesn't upgrade when shouldUpgrade returns false`, done => { ); expect(result).toHaveBeenCalledTimes(1); - setTimeout(() => { - next(op); - expect(response).toHaveBeenCalledTimes(2); - expect(response.mock.calls[1][0].context.requestPolicy).toEqual( - 'cache-first' - ); - expect(result).toHaveBeenCalledTimes(2); - expect(shouldUpgrade).toBeCalledTimes(2); - done(); - }, 10); + await new Promise(res => { + setTimeout(() => { + next(op); + expect(response).toHaveBeenCalledTimes(2); + expect(response.mock.calls[1][0].context.requestPolicy).toEqual( + 'cache-first' + ); + expect(result).toHaveBeenCalledTimes(2); + expect(shouldUpgrade).toBeCalledTimes(2); + res(null); + }, 10); + }); }); diff --git a/exchanges/retry/package.json b/exchanges/retry/package.json index 31d18dc914..82e88366cb 100644 --- a/exchanges/retry/package.json +++ b/exchanges/retry/package.json @@ -38,7 +38,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -46,9 +46,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "devDependencies": { "graphql": "^16.0.0" }, diff --git a/exchanges/retry/src/retryExchange.test.ts b/exchanges/retry/src/retryExchange.test.ts index 9b9248dffd..b620ed32c6 100644 --- a/exchanges/retry/src/retryExchange.test.ts +++ b/exchanges/retry/src/retryExchange.test.ts @@ -1,4 +1,5 @@ import { pipe, map, makeSubject, publish, tap } from 'wonka'; +import { vi, expect, it, beforeEach, afterEach } from 'vitest'; import { gql, @@ -11,14 +12,14 @@ import { import { retryExchange, RetryExchangeOptions } from './retryExchange'; -const dispatchDebug = jest.fn(); +const dispatchDebug = vi.fn(); beforeEach(() => { - jest.useFakeTimers(); + vi.useFakeTimers(); }); afterEach(() => { - jest.useRealTimers(); + vi.useRealTimers(); }); const mockOptions = { @@ -81,7 +82,7 @@ it(`retries if it hits an error and works for multiple concurrent operations`, ( query: queryTwo, }); - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { expect( forwardOp.key === op.key || forwardOp.key === opTwo.key @@ -95,12 +96,12 @@ it(`retries if it hits an error and works for multiple concurrent operations`, ( } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; - const mockRetryIf = jest.fn((() => true) as RetryExchangeOptions['retryIf']); + const mockRetryIf = vi.fn((() => true) as RetryExchangeOptions['retryIf']); pipe( retryExchange({ @@ -120,7 +121,7 @@ it(`retries if it hits an error and works for multiple concurrent operations`, ( expect(mockRetryIf).toHaveBeenCalledTimes(1); expect(mockRetryIf).toHaveBeenCalledWith(queryOneError as any, op); - jest.runAllTimers(); + vi.runAllTimers(); expect(mockRetryIf).toHaveBeenCalledTimes(mockOptions.maxNumberAttempts); @@ -131,7 +132,7 @@ it(`retries if it hits an error and works for multiple concurrent operations`, ( next(opTwo); - jest.runAllTimers(); + vi.runAllTimers(); expect(mockRetryIf).toHaveBeenCalledWith(queryTwoError as any, opTwo); @@ -142,7 +143,7 @@ it(`retries if it hits an error and works for multiple concurrent operations`, ( it('should retry x number of times and then return the successful result', () => { const numberRetriesBeforeSuccess = 3; - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { expect(forwardOp.key).toBe(op.key); // @ts-ignore @@ -155,12 +156,12 @@ it('should retry x number of times and then return the successful result', () => } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; - const mockRetryIf = jest.fn((() => true) as RetryExchangeOptions['retryIf']); + const mockRetryIf = vi.fn((() => true) as RetryExchangeOptions['retryIf']); pipe( retryExchange({ @@ -176,7 +177,7 @@ it('should retry x number of times and then return the successful result', () => ); next(op); - jest.runAllTimers(); + vi.runAllTimers(); expect(mockRetryIf).toHaveBeenCalledTimes(numberRetriesBeforeSuccess); expect(mockRetryIf).toHaveBeenCalledWith(queryOneError as any, op); @@ -191,7 +192,7 @@ it(`should still retry if retryIf undefined but there is a networkError`, () => ...queryOneError, networkError: 'scary network error', }; - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { expect(forwardOp.key).toBe(op.key); return { @@ -202,7 +203,7 @@ it(`should still retry if retryIf undefined but there is a networkError`, () => } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; @@ -222,7 +223,7 @@ it(`should still retry if retryIf undefined but there is a networkError`, () => next(op); - jest.runAllTimers(); + vi.runAllTimers(); // max number of retries, plus original call expect(response).toHaveBeenCalledTimes(mockOptions.maxNumberAttempts); @@ -234,7 +235,7 @@ it('should allow retryWhen to return falsy value and act as replacement of retry ...queryOneError, networkError: 'scary network error', }; - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { expect(forwardOp.key).toBe(op.key); return { @@ -245,12 +246,12 @@ it('should allow retryWhen to return falsy value and act as replacement of retry } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; - const retryWith = jest.fn(() => null); + const retryWith = vi.fn(() => null); pipe( retryExchange({ @@ -268,7 +269,7 @@ it('should allow retryWhen to return falsy value and act as replacement of retry next(op); - jest.runAllTimers(); + vi.runAllTimers(); // max number of retries, plus original call expect(retryWith).toHaveBeenCalledTimes(1); @@ -281,7 +282,7 @@ it('should allow retryWhen to return new operations when retrying', () => { ...queryOneError, networkError: 'scary network error', }; - const response = jest.fn( + const response = vi.fn( (forwardOp: Operation): OperationResult => { expect(forwardOp.key).toBe(op.key); return { @@ -292,12 +293,12 @@ it('should allow retryWhen to return new operations when retrying', () => { } ); - const result = jest.fn(); + const result = vi.fn(); const forward: ExchangeIO = ops$ => { return pipe(ops$, map(response)); }; - const retryWith = jest.fn((_error, operation) => { + const retryWith = vi.fn((_error, operation) => { return makeOperation(operation.kind, operation, { ...operation.context, counter: (operation.context?.counter || 0) + 1, @@ -320,7 +321,7 @@ it('should allow retryWhen to return new operations when retrying', () => { next(op); - jest.runAllTimers(); + vi.runAllTimers(); // max number of retries, plus original call expect(retryWith).toHaveBeenCalledTimes(mockOptions.maxNumberAttempts - 1); diff --git a/package.json b/package.json index 85f420002f..0651066e23 100644 --- a/package.json +++ b/package.json @@ -5,19 +5,13 @@ "exchanges/*" ], "scripts": { - "test": "jest", + "test": "vitest", "check": "tsc", "lint": "eslint --ext=js,jsx,ts,tsx .", "build": "node ./scripts/actions/build-all.js", "postinstall": "node ./scripts/prepare/postinstall.js", "pack": "node ./scripts/actions/pack-all.js" }, - "jest": { - "projects": [ - "/packages/*", - "/exchanges/*" - ] - }, "eslintConfig": { "root": true, "extends": [ @@ -78,8 +72,6 @@ "@rollup/plugin-sucrase": "^5.0.0", "@rollup/plugin-terser": "^0.1.0", "@rollup/pluginutils": "^5.0.0", - "@sucrase/jest-plugin": "^2.2.1", - "@types/jest": "^26.0.23", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.22.0", "cjs-module-lexer": "^1.2.2", @@ -89,7 +81,6 @@ "eslint-config-prettier": "^8.3.0", "eslint-plugin-es5": "^1.5.0", "eslint-plugin-import": "^2.22.0", - "eslint-plugin-jest": "^24.3.6", "eslint-plugin-prettier": "^3.4.0", "eslint-plugin-react": "^7.23.2", "eslint-plugin-react-hooks": "^4.2.0", @@ -98,8 +89,7 @@ "graphql": "^16.0.0", "husky-v4": "^4.3.8", "invariant": "^2.2.4", - "jest": "^26.6.3", - "jest-watch-yarn-workspaces": "^1.1.0", + "jsdom": "^20.0.3", "lint-staged": "^10.5.4", "npm-packlist": "^2.1.5", "npm-run-all": "^4.1.5", @@ -114,6 +104,7 @@ "rollup-plugin-visualizer": "^5.8.0", "tar": "^6.1.0", "terser": "^5.14.1", - "typescript": "^4.7.3" + "typescript": "^4.7.3", + "vitest": "^0.25.3" } } diff --git a/packages/core/package.json b/packages/core/package.json index 27b208d5b5..7c952030e3 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -44,7 +44,7 @@ "internal/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -52,9 +52,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "devDependencies": { "graphql": "^16.0.0" }, diff --git a/packages/core/src/__snapshots__/client.test.ts.snap b/packages/core/src/__snapshots__/client.test.ts.snap index 311b55faa7..007dc4576e 100644 --- a/packages/core/src/__snapshots__/client.test.ts.snap +++ b/packages/core/src/__snapshots__/client.test.ts.snap @@ -1,7 +1,7 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 -exports[`createClient / Client passes snapshot 1`] = ` -Client { +exports[`createClient / Client > passes snapshot 1`] = ` +Client2 { "createRequestOperation": [Function], "executeMutation": [Function], "executeQuery": [Function], diff --git a/packages/core/src/client.test.ts b/packages/core/src/client.test.ts index 060816d466..7c40b993ad 100755 --- a/packages/core/src/client.test.ts +++ b/packages/core/src/client.test.ts @@ -1,4 +1,5 @@ import { print } from 'graphql'; +import { vi, expect, it, beforeEach, describe, afterEach } from 'vitest'; /** NOTE: Testing in this file is designed to test both the client and its interaction with default Exchanges */ @@ -78,14 +79,14 @@ const subscription = { let receivedOps: Operation[] = []; let client = createClient({ url: '1234' }); -const receiveMock = jest.fn((s: Source) => +const receiveMock = vi.fn((s: Source) => pipe( s, tap(op => (receivedOps = [...receivedOps, op])), map(op => ({ operation: op })) ) ); -const exchangeMock = jest.fn(() => receiveMock); +const exchangeMock = vi.fn(() => receiveMock); beforeEach(() => { receivedOps = []; @@ -341,11 +342,11 @@ describe('executeSubscription', () => { describe('queuing behavior', () => { beforeEach(() => { - jest.useFakeTimers(); + vi.useFakeTimers(); }); afterEach(() => { - jest.useRealTimers(); + vi.useRealTimers(); }); it('queues reexecuteOperation, which dispatchOperation consumes', () => { @@ -446,7 +447,7 @@ describe('queuing behavior', () => { }) ); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(output.length).toBe(1); expect(output[0]).toHaveProperty('data', 1); @@ -474,11 +475,11 @@ describe('queuing behavior', () => { 'cache-first' ); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(output.length).toBe(3); expect(output[2]).toHaveProperty('data', 2); - expect(output[2]).toHaveProperty('stale', undefined); + expect(output[2]).not.toHaveProperty('stale'); expect(output[2]).toHaveProperty('operation.key', queryOperation.key); expect(output[2]).toHaveProperty( 'operation.context.requestPolicy', @@ -515,7 +516,7 @@ describe('queuing behavior', () => { }) ); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(output.length).toBe(1); expect(output[0]).toHaveProperty('operation.key', queryOperation.key); @@ -532,7 +533,7 @@ describe('queuing behavior', () => { ); await Promise.resolve(); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(output.length).toBe(2); expect(output[1]).toHaveProperty('stale', true); @@ -548,11 +549,11 @@ describe('queuing behavior', () => { describe('shared sources behavior', () => { beforeEach(() => { - jest.useFakeTimers(); + vi.useFakeTimers(); }); afterEach(() => { - jest.useRealTimers(); + vi.useRealTimers(); }); it('replays results from prior operation result as needed (cache-first)', async () => { @@ -573,14 +574,14 @@ describe('shared sources behavior', () => { exchanges: [exchange], }); - const resultOne = jest.fn(); - const resultTwo = jest.fn(); + const resultOne = vi.fn(); + const resultTwo = vi.fn(); pipe(client.executeRequestOperation(queryOperation), subscribe(resultOne)); expect(resultOne).toHaveBeenCalledTimes(0); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(resultOne).toHaveBeenCalledTimes(1); expect(resultOne).toHaveBeenCalledWith({ @@ -595,7 +596,7 @@ describe('shared sources behavior', () => { operation: queryOperation, }); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); // With cache-first we don't expect a new operation to be issued expect(resultTwo).toHaveBeenCalledTimes(1); @@ -619,8 +620,8 @@ describe('shared sources behavior', () => { exchanges: [exchange], }); - const resultOne = jest.fn(); - const resultTwo = jest.fn(); + const resultOne = vi.fn(); + const resultTwo = vi.fn(); const operationOne = makeOperation('query', queryOperation, { ...queryOperation.context, requestPolicy: 'cache-first', @@ -634,7 +635,7 @@ describe('shared sources behavior', () => { expect(resultOne).toHaveBeenCalledTimes(0); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(resultOne).toHaveBeenCalledTimes(1); expect(resultOne).toHaveBeenCalledWith({ @@ -650,7 +651,7 @@ describe('shared sources behavior', () => { stale: true, }); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(resultTwo).toHaveBeenCalledWith({ data: 2, @@ -681,14 +682,14 @@ describe('shared sources behavior', () => { requestPolicy: 'network-only', }); - const resultOne = jest.fn(); - const resultTwo = jest.fn(); + const resultOne = vi.fn(); + const resultTwo = vi.fn(); pipe(client.executeRequestOperation(operation), subscribe(resultOne)); expect(resultOne).toHaveBeenCalledTimes(0); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(resultOne).toHaveBeenCalledTimes(1); expect(resultOne).toHaveBeenCalledWith({ @@ -704,7 +705,7 @@ describe('shared sources behavior', () => { stale: true, }); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); // With network-only we expect a new operation to be issued, hence a new result expect(resultTwo).toHaveBeenCalledTimes(2); @@ -736,13 +737,13 @@ describe('shared sources behavior', () => { // We keep the source in-memory const source = client.executeRequestOperation(queryOperation); - const resultOne = jest.fn(); + const resultOne = vi.fn(); let subscription; subscription = pipe(source, subscribe(resultOne)); expect(resultOne).toHaveBeenCalledTimes(0); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(resultOne).toHaveBeenCalledWith({ data: 1, @@ -750,11 +751,11 @@ describe('shared sources behavior', () => { }); subscription.unsubscribe(); - const resultTwo = jest.fn(); + const resultTwo = vi.fn(); subscription = pipe(source, subscribe(resultTwo)); expect(resultTwo).toHaveBeenCalledTimes(0); - jest.advanceTimersByTime(1); + vi.advanceTimersByTime(1); expect(resultTwo).toHaveBeenCalledWith({ data: 2, @@ -785,8 +786,8 @@ describe('shared sources behavior', () => { requestPolicy: 'network-only', }); - const resultOne = jest.fn(); - const resultTwo = jest.fn(); + const resultOne = vi.fn(); + const resultTwo = vi.fn(); pipe(client.executeRequestOperation(operation), subscribe(resultOne)); pipe(client.executeRequestOperation(operation), subscribe(resultTwo)); @@ -813,8 +814,8 @@ describe('shared sources behavior', () => { exchanges: [exchange], }); - const resultOne = jest.fn(); - const resultTwo = jest.fn(); + const resultOne = vi.fn(); + const resultTwo = vi.fn(); pipe(client.executeRequestOperation(queryOperation), subscribe(resultOne)); @@ -843,8 +844,8 @@ describe('shared sources behavior', () => { requestPolicy: 'network-only', }); - const resultOne = jest.fn(); - const resultTwo = jest.fn(); + const resultOne = vi.fn(); + const resultTwo = vi.fn(); pipe(client.executeRequestOperation(operation), subscribe(resultOne)); @@ -880,8 +881,8 @@ describe('shared sources behavior', () => { exchanges: [exchange], }); - const resultOne = jest.fn(); - const resultTwo = jest.fn(); + const resultOne = vi.fn(); + const resultTwo = vi.fn(); pipe(client.executeRequestOperation(queryOperation), subscribe(resultOne)); @@ -917,8 +918,8 @@ describe('shared sources behavior', () => { exchanges: [exchange], }); - const resultOne = jest.fn(); - const resultTwo = jest.fn(); + const resultOne = vi.fn(); + const resultTwo = vi.fn(); pipe( client.executeRequestOperation(subscriptionOperation), diff --git a/packages/core/src/exchanges/__snapshots__/fetch.test.ts.snap b/packages/core/src/exchanges/__snapshots__/fetch.test.ts.snap index 5ee9e4f64f..9631163011 100644 --- a/packages/core/src/exchanges/__snapshots__/fetch.test.ts.snap +++ b/packages/core/src/exchanges/__snapshots__/fetch.test.ts.snap @@ -1,13 +1,13 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 -exports[`on error returns error data 1`] = ` -Object { +exports[`on error > returns error data 1`] = ` +{ "data": undefined, "error": [CombinedError: [Network] No Content], "extensions": undefined, - "operation": Object { - "context": Object { - "fetchOptions": Object { + "operation": { + "context": { + "fetchOptions": { "method": "POST", }, "requestPolicy": "cache-first", @@ -15,75 +15,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -94,21 +94,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -118,12 +118,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -132,28 +132,28 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on error returns error data with status 400 and manual redirect mode 1`] = ` -Object { +exports[`on error > returns error data with status 400 and manual redirect mode 1`] = ` +{ "data": undefined, "error": [CombinedError: [Network] No Content], "extensions": undefined, - "operation": Object { - "context": Object { - "fetchOptions": [MockFunction] { - "calls": Array [ - Array [], + "operation": { + "context": { + "fetchOptions": [MockFunction spy] { + "calls": [ + [], ], - "results": Array [ - Object { + "results": [ + { "type": "return", - "value": Object { + "value": { "redirect": "manual", }, }, @@ -164,75 +164,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -243,21 +243,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -267,12 +267,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -281,33 +281,33 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on success returns response data 1`] = ` -Object { - "data": Object { - "data": Object { +exports[`on success > returns response data 1`] = ` +{ + "data": { + "data": { "user": 1200, }, }, "error": undefined, "extensions": undefined, "hasNext": false, - "operation": Object { - "context": Object { - "fetchOptions": [MockFunction] { - "calls": Array [ - Array [], + "operation": { + "context": { + "fetchOptions": [MockFunction spy] { + "calls": [ + [], ], - "results": Array [ - Object { + "results": [ + { "type": "return", - "value": Object {}, + "value": {}, }, ], }, @@ -316,75 +316,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -395,21 +395,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -419,12 +419,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -433,11 +433,11 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on success returns response data 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}"`; +exports[`on success > returns response data 2`] = `"{\\"query\\":\\"query getUser($name: String) {\\\\n user(name: $name) {\\\\n id\\\\n firstName\\\\n lastName\\\\n }\\\\n}\\",\\"operationName\\":\\"getUser\\",\\"variables\\":{\\"name\\":\\"Clara\\"}}"`; diff --git a/packages/core/src/exchanges/__snapshots__/subscription.test.ts.snap b/packages/core/src/exchanges/__snapshots__/subscription.test.ts.snap index 74f857bda8..9d5b04d814 100644 --- a/packages/core/src/exchanges/__snapshots__/subscription.test.ts.snap +++ b/packages/core/src/exchanges/__snapshots__/subscription.test.ts.snap @@ -1,14 +1,14 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 exports[`should return response data from forwardSubscription observable 1`] = ` -Object { - "data": Object {}, +{ + "data": {}, "error": undefined, "extensions": undefined, "hasNext": false, - "operation": Object { - "context": Object { - "fetchOptions": Object { + "operation": { + "context": { + "fetchOptions": { "method": "POST", }, "requestPolicy": "cache-first", @@ -16,53 +16,53 @@ Object { }, "key": 4, "kind": "subscription", - "query": Object { + "query": { "__key": 2088253569, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "subscribeToUser", }, "operation": "subscription", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "user", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -73,21 +73,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "user", }, @@ -97,12 +97,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 92, - "source": Object { + "source": { "body": "# subscribeToUser subscription subscribeToUser($user: String) { user(user: $user) { name } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -111,7 +111,7 @@ subscription subscribeToUser($user: String) { user(user: $user) { name } }", "start": 0, }, }, - "variables": Object { + "variables": { "user": "colin", }, }, diff --git a/packages/core/src/exchanges/cache.test.ts b/packages/core/src/exchanges/cache.test.ts index 2ef9a58005..47fd1fab99 100755 --- a/packages/core/src/exchanges/cache.test.ts +++ b/packages/core/src/exchanges/cache.test.ts @@ -9,6 +9,8 @@ import { scan, toPromise, } from 'wonka'; +import { vi, expect, it, beforeEach, describe } from 'vitest'; + import { Client } from '../client'; import { mutationOperation, @@ -22,16 +24,14 @@ import { import { Operation, OperationResult, ExchangeInput } from '../types'; import { cacheExchange } from './cache'; -const reexecuteOperation = jest.fn(); -const dispatchDebug = jest.fn(); +const reexecuteOperation = vi.fn(); +const dispatchDebug = vi.fn(); let response; let exchangeArgs: ExchangeInput; let forwardedOperations: Operation[]; let input: Subject; -beforeEach(jest.clearAllMocks); - beforeEach(() => { response = queryResponse; forwardedOperations = []; @@ -81,7 +81,7 @@ describe('on query', () => { it('respects cache-and-network', () => { const { source: ops$, next, complete } = input; - const result = jest.fn(); + const result = vi.fn(); const exchange = cacheExchange(exchangeArgs)(ops$); pipe(exchange, forEach(result)); diff --git a/packages/core/src/exchanges/compose.test.ts b/packages/core/src/exchanges/compose.test.ts index e02e251a67..3e6d66608c 100644 --- a/packages/core/src/exchanges/compose.test.ts +++ b/packages/core/src/exchanges/compose.test.ts @@ -1,15 +1,17 @@ import { empty, Source } from 'wonka'; +import { vi, expect, it, beforeEach, describe } from 'vitest'; + import { Exchange } from '../types'; import { composeExchanges } from './compose'; import { noop } from '../utils'; const mockClient = {} as any; -const forward = jest.fn(); +const forward = vi.fn(); const noopExchange: Exchange = ({ forward }) => ops$ => forward(ops$); beforeEach(() => { - jest.spyOn(Date, 'now').mockReturnValue(1234); + vi.spyOn(Date, 'now').mockReturnValue(1234); }); it('composes exchanges correctly', () => { @@ -36,7 +38,7 @@ it('composes exchanges correctly', () => { }; const exchange = composeExchanges([firstExchange, secondExchange]); - const outerFw = jest.fn(() => noopExchange) as any; + const outerFw = vi.fn(() => noopExchange) as any; exchange({ client: mockClient, forward: outerFw, dispatchDebug: noop })( empty as Source @@ -47,7 +49,7 @@ it('composes exchanges correctly', () => { describe('on dispatchDebug', () => { it('dispatches debug event with exchange source name', () => { - const dispatchDebug = jest.fn(); + const dispatchDebug = vi.fn(); const debugArgs = { type: 'test', message: 'Hello', diff --git a/packages/core/src/exchanges/debug.test.ts b/packages/core/src/exchanges/debug.test.ts index 51241286ec..d389640723 100644 --- a/packages/core/src/exchanges/debug.test.ts +++ b/packages/core/src/exchanges/debug.test.ts @@ -1,4 +1,6 @@ import { makeSubject, map, pipe, publish, Source, Subject } from 'wonka'; +import { vi, expect, it, beforeEach, describe, afterEach } from 'vitest'; + import { Client } from '../client'; import { queryOperation, queryResponse } from '../test-utils'; import { Operation } from '../types'; @@ -27,7 +29,9 @@ beforeEach(() => { }); it('forwards query operations correctly', async () => { - jest.spyOn(global.console, 'log').mockImplementation(); + vi.spyOn(global.console, 'log').mockImplementation(() => { + /** Do NOthing */ + }); const { source: ops$, next, complete } = input; const exchange = debugExchange(exchangeArgs)(ops$); diff --git a/packages/core/src/exchanges/dedup.test.ts b/packages/core/src/exchanges/dedup.test.ts index c11773a91b..a8e9c23cae 100644 --- a/packages/core/src/exchanges/dedup.test.ts +++ b/packages/core/src/exchanges/dedup.test.ts @@ -7,6 +7,8 @@ import { Source, Subject, } from 'wonka'; +import { vi, expect, it, beforeEach } from 'vitest'; + import { mutationOperation, queryOperation, @@ -16,7 +18,7 @@ import { Operation } from '../types'; import { dedupExchange } from './dedup'; import { makeOperation } from '../utils'; -const dispatchDebug = jest.fn(); +const dispatchDebug = vi.fn(); let shouldRespond = false; let exchangeArgs; let forwardedOperations: Operation[]; diff --git a/packages/core/src/exchanges/error.test.ts b/packages/core/src/exchanges/error.test.ts index a706912094..b71b6276b6 100644 --- a/packages/core/src/exchanges/error.test.ts +++ b/packages/core/src/exchanges/error.test.ts @@ -1,4 +1,6 @@ import { makeSubject, map, pipe, publish, Subject } from 'wonka'; +import { vi, expect, it, beforeEach } from 'vitest'; + import { Client } from '../client'; import { queryOperation } from '../test-utils'; import { makeErrorResult, CombinedError } from '../utils'; @@ -13,7 +15,7 @@ beforeEach(() => { }); it('does not trigger when there are no errors', async () => { - const onError = jest.fn(); + const onError = vi.fn(); const { source: ops$, next, complete } = input; const exchangeArgs = { forward: op$ => @@ -33,7 +35,7 @@ it('does not trigger when there are no errors', async () => { }); it('triggers correctly when the operations has an error', async () => { - const onError = jest.fn(); + const onError = vi.fn(); const { source: ops$, next, complete } = input; const exchangeArgs = { forward: op$ => @@ -57,7 +59,7 @@ it('triggers correctly when the operations has an error', async () => { }); it('triggers correctly multiple times the operations has an error', async () => { - const onError = jest.fn(); + const onError = vi.fn(); const { source: ops$, next, complete } = input; const firstQuery = { diff --git a/packages/core/src/exchanges/fallback.test.ts b/packages/core/src/exchanges/fallback.test.ts index 9feab87e76..79e4c52fc2 100644 --- a/packages/core/src/exchanges/fallback.test.ts +++ b/packages/core/src/exchanges/fallback.test.ts @@ -1,13 +1,15 @@ import { forEach, fromValue, pipe } from 'wonka'; +import { vi, expect, it, beforeEach, afterAll } from 'vitest'; + import { queryOperation, teardownOperation } from '../test-utils'; import { fallbackExchange } from './fallback'; const consoleWarn = console.warn; -const dispatchDebug = jest.fn(); +const dispatchDebug = vi.fn(); beforeEach(() => { - console.warn = jest.fn(); + console.warn = vi.fn(); }); afterAll(() => { diff --git a/packages/core/src/exchanges/fetch.test.ts b/packages/core/src/exchanges/fetch.test.ts index 5eb5a40c82..80b29a8e2a 100755 --- a/packages/core/src/exchanges/fetch.test.ts +++ b/packages/core/src/exchanges/fetch.test.ts @@ -1,4 +1,15 @@ import { empty, fromValue, pipe, Source, subscribe, toPromise } from 'wonka'; +import { + vi, + expect, + it, + beforeEach, + describe, + beforeAll, + Mock, + afterEach, + afterAll, +} from 'vitest'; import { Client } from '../client'; import { makeOperation } from '../utils'; @@ -6,8 +17,8 @@ import { queryOperation } from '../test-utils'; import { OperationResult } from '../types'; import { fetchExchange } from './fetch'; -const fetch = (global as any).fetch as jest.Mock; -const abort = jest.fn(); +const fetch = (global as any).fetch as Mock; +const abort = vi.fn(); const abortError = new Error(); abortError.name = 'AbortError'; @@ -38,11 +49,11 @@ const response = JSON.stringify({ }); const exchangeArgs = { - dispatchDebug: jest.fn(), + dispatchDebug: vi.fn(), forward: () => empty as Source, client: ({ debugTarget: { - dispatchEvent: jest.fn(), + dispatchEvent: vi.fn(), }, } as any) as Client, }; @@ -51,12 +62,12 @@ describe('on success', () => { beforeEach(() => { fetch.mockResolvedValue({ status: 200, - text: jest.fn().mockResolvedValue(response), + text: vi.fn().mockResolvedValue(response), }); }); it('returns response data', async () => { - const fetchOptions = jest.fn().mockReturnValue({}); + const fetchOptions = vi.fn().mockReturnValue({}); const data = await pipe( fromValue({ @@ -80,7 +91,7 @@ describe('on error', () => { beforeEach(() => { fetch.mockResolvedValue({ status: 400, - text: jest.fn().mockResolvedValue(JSON.stringify({})), + text: vi.fn().mockResolvedValue(JSON.stringify({})), }); }); @@ -95,7 +106,7 @@ describe('on error', () => { }); it('returns error data with status 400 and manual redirect mode', async () => { - const fetchOptions = jest.fn().mockReturnValue({ redirect: 'manual' }); + const fetchOptions = vi.fn().mockReturnValue({ redirect: 'manual' }); const data = await pipe( fromValue({ @@ -115,7 +126,7 @@ describe('on error', () => { it('ignores the error when a result is available', async () => { fetch.mockResolvedValue({ status: 400, - text: jest.fn().mockResolvedValue(response), + text: vi.fn().mockResolvedValue(response), }); const data = await pipe( @@ -129,6 +140,9 @@ describe('on error', () => { }); describe('on teardown', () => { + const fail = () => { + expect(true).toEqual(false); + }; it('does not start the outgoing request on immediate teardowns', () => { fetch.mockRejectedValueOnce(abortError); diff --git a/packages/core/src/exchanges/ssr.test.ts b/packages/core/src/exchanges/ssr.test.ts index 7f188ee182..a2f7213160 100644 --- a/packages/core/src/exchanges/ssr.test.ts +++ b/packages/core/src/exchanges/ssr.test.ts @@ -1,4 +1,5 @@ import { makeSubject, pipe, map, publish, forEach, Subject } from 'wonka'; +import { vi, expect, it, beforeEach, afterEach } from 'vitest'; import { Client } from '../client'; import { queryOperation, queryResponse } from '../test-utils'; @@ -19,7 +20,7 @@ const serializedQueryResponse = { beforeEach(() => { input = makeSubject(); - output = jest.fn(operation => ({ operation })); + output = vi.fn(operation => ({ operation })); forward = ops$ => pipe(ops$, map(output)); client = { suspense: true } as any; exchangeInput = { forward, client }; @@ -180,7 +181,7 @@ it('caches complex GraphQLErrors in query results correctly', () => { }); it('resolves cached query results correctly', () => { - const onPush = jest.fn(); + const onPush = vi.fn(); const ssr = ssrExchange({ initialState: { [queryOperation.key]: serializedQueryResponse as any }, @@ -199,7 +200,7 @@ it('resolves cached query results correctly', () => { }); it('resolves deferred, cached query results correctly', () => { - const onPush = jest.fn(); + const onPush = vi.fn(); const ssr = ssrExchange({ isClient: true, @@ -226,7 +227,7 @@ it('resolves deferred, cached query results correctly', () => { it('deletes cached results in non-suspense environments', async () => { client.suspense = false; - const onPush = jest.fn(); + const onPush = vi.fn(); const ssr = ssrExchange(); ssr.restoreData({ [queryOperation.key]: serializedQueryResponse as any }); @@ -250,7 +251,7 @@ it('deletes cached results in non-suspense environments', async () => { it('never allows restoration of invalidated results', async () => { client.suspense = false; - const onPush = jest.fn(); + const onPush = vi.fn(); const initialState = { [queryOperation.key]: serializedQueryResponse as any }; const ssr = ssrExchange({ diff --git a/packages/core/src/exchanges/subscription.test.ts b/packages/core/src/exchanges/subscription.test.ts index e864268fd5..4d6b5a7910 100644 --- a/packages/core/src/exchanges/subscription.test.ts +++ b/packages/core/src/exchanges/subscription.test.ts @@ -1,4 +1,5 @@ import { print } from 'graphql'; +import { vi, expect, it } from 'vitest'; import { empty, publish, @@ -8,6 +9,7 @@ import { take, toPromise, } from 'wonka'; + import { Client } from '../client'; import { subscriptionOperation, subscriptionResult } from '../test-utils'; import { OperationResult } from '../types'; @@ -15,12 +17,12 @@ import { subscriptionExchange, SubscriptionForwarder } from './subscription'; it('should return response data from forwardSubscription observable', async () => { const exchangeArgs = { - dispatchDebug: jest.fn(), + dispatchDebug: vi.fn(), forward: () => empty as Source, client: {} as Client, }; - const unsubscribe = jest.fn(); + const unsubscribe = vi.fn(); const forwardSubscription: SubscriptionForwarder = operation => { expect(operation.query).toBe(print(subscriptionOperation.query)); expect(operation.variables).toBe(subscriptionOperation.variables); @@ -49,11 +51,11 @@ it('should return response data from forwardSubscription observable', async () = }); it('should tear down the operation if the source subscription ends', async () => { - const reexecuteOperation = jest.fn(); - const unsubscribe = jest.fn(); + const reexecuteOperation = vi.fn(); + const unsubscribe = vi.fn(); const exchangeArgs = { - dispatchDebug: jest.fn(), + dispatchDebug: vi.fn(), forward: () => empty as Source, client: { reexecuteOperation: reexecuteOperation as any } as Client, }; @@ -79,17 +81,17 @@ it('should tear down the operation if the source subscription ends', async () => it('should allow providing a custom isSubscriptionOperation implementation', async () => { const exchangeArgs = { - dispatchDebug: jest.fn(), + dispatchDebug: vi.fn(), forward: () => empty as Source, client: {} as Client, }; - const isSubscriptionOperation = jest.fn(() => true); + const isSubscriptionOperation = vi.fn(() => true); const forwardSubscription: SubscriptionForwarder = () => ({ subscribe(observer) { observer.next(subscriptionResult); - return { unsubscribe: jest.fn() }; + return { unsubscribe: vi.fn() }; }, }); diff --git a/packages/core/src/gql.test.ts b/packages/core/src/gql.test.ts index 1081552fc6..22e6b612d1 100644 --- a/packages/core/src/gql.test.ts +++ b/packages/core/src/gql.test.ts @@ -1,11 +1,13 @@ import { parse, print } from 'graphql'; +import { vi, expect, it, beforeEach, SpyInstance } from 'vitest'; + import { gql } from './gql'; import { keyDocument } from './utils'; -let warn: jest.SpyInstance; +let warn: SpyInstance; beforeEach(() => { - warn = jest.spyOn(console, 'warn'); + warn = vi.spyOn(console, 'warn'); warn.mockClear(); }); diff --git a/packages/core/src/internal/__snapshots__/fetchSource.test.ts.snap b/packages/core/src/internal/__snapshots__/fetchSource.test.ts.snap index c552c37da3..f030dcaa56 100644 --- a/packages/core/src/internal/__snapshots__/fetchSource.test.ts.snap +++ b/packages/core/src/internal/__snapshots__/fetchSource.test.ts.snap @@ -1,13 +1,13 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 -exports[`on error ignores the error when a result is available 1`] = ` -Object { +exports[`on error > ignores the error when a result is available 1`] = ` +{ "data": undefined, "error": [CombinedError: [Network] Forbidden], "extensions": undefined, - "operation": Object { - "context": Object { - "fetchOptions": Object { + "operation": { + "context": { + "fetchOptions": { "method": "POST", }, "requestPolicy": "cache-first", @@ -15,75 +15,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -94,21 +94,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -118,12 +118,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -132,21 +132,21 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on error returns error data 1`] = ` -Object { +exports[`on error > returns error data 1`] = ` +{ "data": undefined, "error": [CombinedError: [Network] Forbidden], "extensions": undefined, - "operation": Object { - "context": Object { - "fetchOptions": Object { + "operation": { + "context": { + "fetchOptions": { "method": "POST", }, "requestPolicy": "cache-first", @@ -154,75 +154,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -233,21 +233,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -257,12 +257,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -271,21 +271,21 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on error returns error data with status 400 and manual redirect mode 1`] = ` -Object { +exports[`on error > returns error data with status 400 and manual redirect mode 1`] = ` +{ "data": undefined, "error": [CombinedError: [Network] Forbidden], "extensions": undefined, - "operation": Object { - "context": Object { - "fetchOptions": Object { + "operation": { + "context": { + "fetchOptions": { "method": "POST", }, "requestPolicy": "cache-first", @@ -293,75 +293,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -372,21 +372,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -396,12 +396,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -410,26 +410,26 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on success returns response data 1`] = ` -Object { - "data": Object { - "data": Object { +exports[`on success > returns response data 1`] = ` +{ + "data": { + "data": { "user": 1200, }, }, "error": undefined, "extensions": undefined, "hasNext": false, - "operation": Object { - "context": Object { - "fetchOptions": Object { + "operation": { + "context": { + "fetchOptions": { "method": "POST", }, "requestPolicy": "cache-first", @@ -437,75 +437,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -516,21 +516,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -540,12 +540,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -554,42 +554,55 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, } `; -exports[`on success uses the mock fetch if given 1`] = ` -Object { - "data": Object { - "data": Object { +exports[`on success > uses the mock fetch if given 1`] = ` +{ + "data": { + "data": { "user": 1200, }, }, "error": undefined, "extensions": undefined, "hasNext": false, - "operation": Object { - "context": Object { - "fetch": [MockFunction] { - "calls": Array [ - Array [ + "operation": { + "context": { + "fetch": [MockFunction spy] { + "calls": [ + [ "https://test.com/graphql", - Object { + { "signal": undefined, }, ], ], - "results": Array [ - Object { + "results": [ + { "type": "return", - "value": Promise {}, + "value": { + "status": 200, + "text": [MockFunction spy] { + "calls": [ + [], + ], + "results": [ + { + "type": "return", + "value": "{\\"status\\":200,\\"data\\":{\\"data\\":{\\"user\\":1200}}}", + }, + ], + }, + }, }, ], }, - "fetchOptions": Object { + "fetchOptions": { "method": "POST", }, "requestPolicy": "cache-first", @@ -597,75 +610,75 @@ Object { }, "key": 2, "kind": "query", - "query": Object { + "query": { "__key": 3521976120, - "definitions": Array [ - Object { - "directives": Array [], + "definitions": [ + { + "directives": [], "kind": "OperationDefinition", - "name": Object { + "name": { "kind": "Name", "value": "getUser", }, "operation": "query", - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [ - Object { + "arguments": [ + { "kind": "Argument", - "name": Object { + "name": { "kind": "Name", "value": "name", }, - "value": Object { + "value": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, }, }, ], - "directives": Array [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "user", }, - "selectionSet": Object { + "selectionSet": { "kind": "SelectionSet", - "selections": Array [ - Object { + "selections": [ + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "id", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "firstName", }, "selectionSet": undefined, }, - Object { + { "alias": undefined, - "arguments": Array [], - "directives": Array [], + "arguments": [], + "directives": [], "kind": "Field", - "name": Object { + "name": { "kind": "Name", "value": "lastName", }, @@ -676,21 +689,21 @@ Object { }, ], }, - "variableDefinitions": Array [ - Object { + "variableDefinitions": [ + { "defaultValue": undefined, - "directives": Array [], + "directives": [], "kind": "VariableDefinition", - "type": Object { + "type": { "kind": "NamedType", - "name": Object { + "name": { "kind": "Name", "value": "String", }, }, - "variable": Object { + "variable": { "kind": "Variable", - "name": Object { + "name": { "kind": "Name", "value": "name", }, @@ -700,12 +713,12 @@ Object { }, ], "kind": "Document", - "loc": Object { + "loc": { "end": 86, - "source": Object { + "source": { "body": "# getUser query getUser($name: String) { user(name: $name) { id firstName lastName } }", - "locationOffset": Object { + "locationOffset": { "column": 1, "line": 1, }, @@ -714,7 +727,7 @@ query getUser($name: String) { user(name: $name) { id firstName lastName } }", "start": 0, }, }, - "variables": Object { + "variables": { "name": "Clara", }, }, diff --git a/packages/core/src/internal/fetchSource.test.ts b/packages/core/src/internal/fetchSource.test.ts index c2a55f6beb..70c2b798ab 100644 --- a/packages/core/src/internal/fetchSource.test.ts +++ b/packages/core/src/internal/fetchSource.test.ts @@ -1,4 +1,14 @@ import { pipe, scan, subscribe, toPromise } from 'wonka'; +import { + vi, + expect, + it, + beforeEach, + describe, + beforeAll, + Mock, + afterAll, +} from 'vitest'; import { queryOperation, context } from '../test-utils'; import { makeFetchSource } from './fetchSource'; @@ -6,8 +16,8 @@ import { gql } from '../gql'; import { OperationResult, Operation } from '../types'; import { makeOperation } from '../utils'; -const fetch = (global as any).fetch as jest.Mock; -const abort = jest.fn(); +const fetch = (global as any).fetch as Mock; +const abort = vi.fn(); const abortError = new Error(); abortError.name = 'AbortError'; @@ -41,7 +51,7 @@ describe('on success', () => { beforeEach(() => { fetch.mockResolvedValue({ status: 200, - text: jest.fn().mockResolvedValue(response), + text: vi.fn().mockResolvedValue(response), }); }); @@ -61,9 +71,9 @@ describe('on success', () => { it('uses the mock fetch if given', async () => { const fetchOptions = {}; - const fetcher = jest.fn().mockResolvedValue({ + const fetcher = vi.fn().mockResolvedValue({ status: 200, - text: jest.fn().mockResolvedValue(response), + text: vi.fn().mockResolvedValue(response), }); const data = await pipe( @@ -92,7 +102,7 @@ describe('on error', () => { fetch.mockResolvedValue({ status: 400, statusText: 'Forbidden', - text: jest.fn().mockResolvedValue('{}'), + text: vi.fn().mockResolvedValue('{}'), }); }); @@ -132,7 +142,7 @@ describe('on unexpected plain text responses', () => { fetch.mockResolvedValue({ status: 200, headers: new Map([['Content-Type', 'text/plain']]), - text: jest.fn().mockResolvedValue('Some Error Message'), + text: vi.fn().mockResolvedValue('Some Error Message'), }); }); @@ -150,6 +160,10 @@ describe('on unexpected plain text responses', () => { }); describe('on teardown', () => { + const fail = () => { + expect(true).toEqual(false); + }; + it('does not start the outgoing request on immediate teardowns', () => { fetch.mockRejectedValue(abortError); diff --git a/packages/core/src/utils/__snapshots__/error.test.ts.snap b/packages/core/src/utils/__snapshots__/error.test.ts.snap index 2caff081c6..5542ad2f32 100644 --- a/packages/core/src/utils/__snapshots__/error.test.ts.snap +++ b/packages/core/src/utils/__snapshots__/error.test.ts.snap @@ -1,3 +1,3 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 -exports[`CombinedError behaves like a normal Error 1`] = `"[Network] test"`; +exports[`CombinedError > behaves like a normal Error 1`] = `"[Network] test"`; diff --git a/packages/core/src/utils/error.test.ts b/packages/core/src/utils/error.test.ts index 4593d82781..5340dea1d2 100644 --- a/packages/core/src/utils/error.test.ts +++ b/packages/core/src/utils/error.test.ts @@ -1,3 +1,4 @@ +import { describe, it, expect } from 'vitest'; import { CombinedError } from './error'; describe('CombinedError', () => { diff --git a/packages/core/src/utils/maskTypename.test.ts b/packages/core/src/utils/maskTypename.test.ts index f3f2a28582..af5f17e53d 100644 --- a/packages/core/src/utils/maskTypename.test.ts +++ b/packages/core/src/utils/maskTypename.test.ts @@ -1,3 +1,4 @@ +import { it, expect } from 'vitest'; import { maskTypename } from './maskTypename'; it('strips typename from flat objects', () => { diff --git a/packages/core/src/utils/request.test.ts b/packages/core/src/utils/request.test.ts index b45444e2f7..7dd6caaa33 100644 --- a/packages/core/src/utils/request.test.ts +++ b/packages/core/src/utils/request.test.ts @@ -1,12 +1,17 @@ +import { vi, expect, it, describe } from 'vitest'; + +vi.mock('./hash', async () => { + const hash = await vi.importActual('./hash'); + return { + ...hash, + phash: (x: number) => x, + }; +}); + import { parse, print } from 'graphql'; import { gql } from '../gql'; import { createRequest, stringifyDocument } from './request'; -jest.mock('./hash', () => ({ - hash: jest.requireActual('./hash').hash, - phash: (x: number) => x, -})); - it('should hash identical queries identically', () => { const reqA = createRequest('{ test }'); const reqB = createRequest('{ test }'); diff --git a/packages/core/src/utils/result.test.ts b/packages/core/src/utils/result.test.ts index eaa1e7d859..29334443fd 100644 --- a/packages/core/src/utils/result.test.ts +++ b/packages/core/src/utils/result.test.ts @@ -1,3 +1,4 @@ +import { describe, it, expect } from 'vitest'; import { queryOperation } from '../test-utils'; import { makeResult } from './result'; diff --git a/packages/core/src/utils/stringifyVariables.test.ts b/packages/core/src/utils/stringifyVariables.test.ts index 2d592e4e86..3ef8fccc52 100644 --- a/packages/core/src/utils/stringifyVariables.test.ts +++ b/packages/core/src/utils/stringifyVariables.test.ts @@ -1,4 +1,5 @@ import { stringifyVariables } from './stringifyVariables'; +import { it, expect } from 'vitest'; it('stringifies objects stabily', () => { expect(stringifyVariables({ b: 'b', a: 'a' })).toBe('{"a":"a","b":"b"}'); diff --git a/packages/core/src/utils/typenames.test.ts b/packages/core/src/utils/typenames.test.ts index fb1a62646c..68d36c7063 100755 --- a/packages/core/src/utils/typenames.test.ts +++ b/packages/core/src/utils/typenames.test.ts @@ -1,4 +1,5 @@ import { parse, print } from 'graphql'; +import { describe, it, expect } from 'vitest'; import { collectTypesFromResponse, formatDocument } from './typenames'; import { createRequest } from './request'; diff --git a/packages/introspection/package.json b/packages/introspection/package.json index 13916ef4f5..26c992dc4d 100644 --- a/packages/introspection/package.json +++ b/packages/introspection/package.json @@ -36,7 +36,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -44,9 +44,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "devDependencies": { "graphql": "^16.0.0" }, diff --git a/packages/next-urql/package.json b/packages/next-urql/package.json index 7585cba925..529a12da7f 100644 --- a/packages/next-urql/package.json +++ b/packages/next-urql/package.json @@ -22,7 +22,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -30,10 +30,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset", - "testEnvironment": "node" - }, "devDependencies": { "@types/enzyme": "^3.10.3", "@types/enzyme-adapter-react-16": "^1.0.5", diff --git a/packages/next-urql/src/__tests__/init-urql-client.spec.ts b/packages/next-urql/src/__tests__/init-urql-client.spec.ts deleted file mode 100644 index 0f6906736b..0000000000 --- a/packages/next-urql/src/__tests__/init-urql-client.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Client } from '@urql/core'; -import { initUrqlClient } from '../init-urql-client'; - -describe('initUrqlClient', () => { - it('should return the urqlClient instance (suspense)', () => { - const urqlClient = initUrqlClient( - { - url: 'http://localhost:3000', - }, - true - ); - - expect(urqlClient).toBeInstanceOf(Client); - expect(urqlClient).toHaveProperty('suspense', true); - }); - - it('should return the urqlClient instance (no-suspense)', () => { - const urqlClient = initUrqlClient( - { - url: 'http://localhost:3000', - }, - false - ); - - expect(urqlClient).toBeInstanceOf(Client); - expect(urqlClient).toHaveProperty('suspense', false); - }); -}); diff --git a/packages/next-urql/src/__tests__/with-urql-client.spec.ts b/packages/next-urql/src/__tests__/with-urql-client.spec.ts index 81a7935edb..1b85bc3490 100644 --- a/packages/next-urql/src/__tests__/with-urql-client.spec.ts +++ b/packages/next-urql/src/__tests__/with-urql-client.spec.ts @@ -2,12 +2,11 @@ import React, { createElement as h } from 'react'; import { shallow, configure } from 'enzyme'; import Adapter from 'enzyme-adapter-react-16'; import { Client } from 'urql'; +import { vi, expect, it, beforeEach, describe, beforeAll } from 'vitest'; import { withUrqlClient, NextUrqlPageContext } from '..'; import * as init from '../init-urql-client'; -beforeEach(jest.clearAllMocks); - const MockApp: React.FC = () => { return h('div'); }; @@ -17,7 +16,7 @@ const MockAppTree: React.FC = () => { }; describe('withUrqlClient', () => { - const spyInitUrqlClient = jest.spyOn(init, 'initUrqlClient'); + const spyInitUrqlClient = vi.spyOn(init, 'initUrqlClient'); let Component: any; beforeAll(() => { @@ -45,6 +44,7 @@ describe('withUrqlClient', () => { expect(app.props().urqlClient).toBeInstanceOf(Client); expect(spyInitUrqlClient).toHaveBeenCalledTimes(1); + // @ts-ignore expect(spyInitUrqlClient.mock.calls[0][0].exchanges).toHaveLength(4); }); @@ -135,32 +135,6 @@ describe('withUrqlClient', () => { expect(Component.getInitialProps).toBeUndefined(); }); - describe('with exchanges provided', () => { - const exchange = jest.fn(() => op => op); - - beforeEach(() => { - Component = withUrqlClient(() => ({ - url: 'http://localhost:3000', - exchanges: [exchange] as any[], - }))(MockApp); - }); - - it('uses exchanges defined in the client config', () => { - const tree = shallow(h(Component)); - const app = tree.find(MockApp); - - const client = app.props().urqlClient; - client.query(` - { - users { - id - } - } - `); - expect(exchange).toBeCalledTimes(1); - }); - }); - describe('never-suspend', () => { // Simulate a token that might be passed in a request to the server-rendered application. const token = Math.random().toString(36).slice(-10); diff --git a/packages/next-urql/tsconfig.json b/packages/next-urql/tsconfig.json index c8c44c9613..60d322a1e2 100644 --- a/packages/next-urql/tsconfig.json +++ b/packages/next-urql/tsconfig.json @@ -3,7 +3,7 @@ "include": ["src"], "compilerOptions": { "baseUrl": "./", - "types": ["node", "jest", "react"], + "types": ["node", "react"], "jsx": "react", "paths": { "urql": ["../../node_modules/urql/src"], diff --git a/packages/preact-urql/package.json b/packages/preact-urql/package.json index f44115e83d..ef55b48379 100644 --- a/packages/preact-urql/package.json +++ b/packages/preact-urql/package.json @@ -39,7 +39,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -47,9 +47,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "devDependencies": { "@testing-library/preact": "^2.0.0", "graphql": "^16.0.0", diff --git a/packages/preact-urql/src/components/Mutation.test.tsx b/packages/preact-urql/src/components/Mutation.test.tsx index abe24f8831..583e7ab7c9 100644 --- a/packages/preact-urql/src/components/Mutation.test.tsx +++ b/packages/preact-urql/src/components/Mutation.test.tsx @@ -1,27 +1,31 @@ import { h } from 'preact'; import { act, cleanup, render } from '@testing-library/preact'; import { pipe, fromValue, delay } from 'wonka'; +import { vi, expect, it, beforeEach, describe, afterEach, Mock } from 'vitest'; + import { Provider } from '../context'; import { Mutation } from './Mutation'; const mock = { - executeMutation: jest.fn(() => + executeMutation: vi.fn(() => pipe(fromValue({ data: 1, error: 2, extensions: { i: 1 } }), delay(200)) ), }; -const client = mock as { executeMutation: jest.Mock }; +const client = mock as { executeMutation: Mock }; const query = 'mutation Example { example }'; describe('Mutation', () => { beforeEach(() => { - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothing + }); }); afterEach(() => { cleanup(); }); - it('Should execute the mutation', done => { + it('Should execute the mutation', async () => { // eslint-disable-next-line let execute = () => {}, props = {}; @@ -60,9 +64,12 @@ describe('Mutation', () => { fetching: true, error: undefined, }); - setTimeout(() => { - expect(props).toStrictEqual({ data: 1, fetching: false, error: 2 }); - done(); - }, 400); + + await new Promise(res => { + setTimeout(() => { + expect(props).toStrictEqual({ data: 1, fetching: false, error: 2 }); + res(null); + }, 400); + }); }); }); diff --git a/packages/preact-urql/src/components/Query.test.tsx b/packages/preact-urql/src/components/Query.test.tsx index 5f0188f6dc..cd1b754a03 100644 --- a/packages/preact-urql/src/components/Query.test.tsx +++ b/packages/preact-urql/src/components/Query.test.tsx @@ -1,6 +1,8 @@ import { h } from 'preact'; import { cleanup, render } from '@testing-library/preact'; import { map, interval, pipe } from 'wonka'; +import { vi, expect, it, beforeEach, describe, afterEach } from 'vitest'; + import { Query } from './Query'; import { Provider } from '../context'; @@ -10,7 +12,7 @@ const variables = { }; const client = { - executeQuery: jest.fn(() => + executeQuery: vi.fn(() => pipe( interval(200), map((i: number) => ({ data: i, error: i + 1 })) @@ -20,14 +22,16 @@ const client = { describe('Query', () => { beforeEach(() => { - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothing + }); }); afterEach(() => { cleanup(); }); - it('Should execute the query', done => { + it('Should execute the query', async () => { let props = {}; const Test = () => h('p', {}, 'hi'); const App = () => { @@ -50,9 +54,12 @@ describe('Query', () => { fetching: true, error: undefined, }); - setTimeout(() => { - expect(props).toStrictEqual({ data: 0, fetching: false, error: 1 }); - done(); - }, 250); + + await new Promise(res => { + setTimeout(() => { + expect(props).toStrictEqual({ data: 0, fetching: false, error: 1 }); + res(null); + }, 250); + }); }); }); diff --git a/packages/preact-urql/src/components/Subscription.test.tsx b/packages/preact-urql/src/components/Subscription.test.tsx index 952c953934..d74f6464c8 100644 --- a/packages/preact-urql/src/components/Subscription.test.tsx +++ b/packages/preact-urql/src/components/Subscription.test.tsx @@ -1,12 +1,14 @@ import { h } from 'preact'; import { cleanup, render } from '@testing-library/preact'; import { map, interval, pipe } from 'wonka'; +import { vi, expect, it, beforeEach, describe, afterEach } from 'vitest'; + import { Provider } from '../context'; import { Subscription } from './Subscription'; const query = 'subscription Example { example }'; const client = { - executeSubscription: jest.fn(() => + executeSubscription: vi.fn(() => pipe( interval(200), map((i: number) => ({ data: i, error: i + 1 })) @@ -16,14 +18,16 @@ const client = { describe('Subscription', () => { beforeEach(() => { - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothing + }); }); afterEach(() => { cleanup(); }); - it('Should execute the subscription', done => { + it('Should execute the subscription', async () => { let props = {}; const Test = () => h('p', {}, 'hi'); const App = () => { @@ -46,9 +50,12 @@ describe('Subscription', () => { fetching: true, error: undefined, }); - setTimeout(() => { - expect(props).toStrictEqual({ data: 0, fetching: true, error: 1 }); - done(); - }, 300); + + await new Promise(res => { + setTimeout(() => { + expect(props).toStrictEqual({ data: 0, fetching: true, error: 1 }); + res(null); + }, 300); + }); }); }); diff --git a/packages/preact-urql/src/hooks/useMutation.test.tsx b/packages/preact-urql/src/hooks/useMutation.test.tsx index 4010d49b15..3a8e0f6358 100644 --- a/packages/preact-urql/src/hooks/useMutation.test.tsx +++ b/packages/preact-urql/src/hooks/useMutation.test.tsx @@ -2,17 +2,28 @@ import { FunctionalComponent as FC, h } from 'preact'; import { render, cleanup, act } from '@testing-library/preact'; import { print } from 'graphql'; import { gql } from '@urql/core'; -import { useMutation } from './useMutation'; import { fromValue, delay, pipe } from 'wonka'; +import { + vi, + expect, + it, + beforeEach, + describe, + beforeAll, + afterEach, + Mock, +} from 'vitest'; + +import { useMutation } from './useMutation'; import { Provider } from '../context'; const mock = { - executeMutation: jest.fn(() => + executeMutation: vi.fn(() => pipe(fromValue({ data: 1, error: 2, extensions: { i: 1 } }), delay(200)) ), }; -const client = mock as { executeMutation: jest.Mock }; +const client = mock as { executeMutation: Mock }; const props = { query: 'mutation Example { example }', }; @@ -26,7 +37,9 @@ const MutationUser: FC = ({ query }) => { }; beforeAll(() => { - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothing + }); }); describe('useMutation', () => { diff --git a/packages/preact-urql/src/hooks/useQuery.test.tsx b/packages/preact-urql/src/hooks/useQuery.test.tsx index 4ae0b1517a..93f2669b06 100644 --- a/packages/preact-urql/src/hooks/useQuery.test.tsx +++ b/packages/preact-urql/src/hooks/useQuery.test.tsx @@ -1,12 +1,23 @@ import { FunctionalComponent as FC, h } from 'preact'; import { render, cleanup, act } from '@testing-library/preact'; import { OperationContext } from '@urql/core'; -import { useQuery, UseQueryArgs, UseQueryState } from './useQuery'; import { map, interval, pipe, never, onStart, onEnd, empty } from 'wonka'; +import { + vi, + expect, + it, + beforeEach, + describe, + beforeAll, + Mock, + afterEach, +} from 'vitest'; + +import { useQuery, UseQueryArgs, UseQueryState } from './useQuery'; import { Provider } from '../context'; const mock = { - executeQuery: jest.fn(() => + executeQuery: vi.fn(() => pipe( interval(400), map((i: number) => ({ data: i, error: i + 1, extensions: { i: 1 } })) @@ -14,7 +25,7 @@ const mock = { ), }; -const client = mock as { executeQuery: jest.Mock }; +const client = mock as { executeQuery: Mock }; const props: UseQueryArgs<{ myVar: number }> = { query: '{ example }', variables: { @@ -36,7 +47,7 @@ const QueryUser: FC> = ({ }; beforeAll(() => { - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(); }); describe('useQuery', () => { @@ -95,7 +106,7 @@ describe('useQuery', () => { expect(state).toHaveProperty('fetching', true); }); - it('forwards data response', done => { + it('forwards data response', async () => { const { rerender } = render( h(Provider, { value: client as any, @@ -110,19 +121,21 @@ describe('useQuery', () => { }) ); - setTimeout(() => { - rerender( - h(Provider, { - value: client as any, - children: [h(QueryUser, { ...props })], - }) - ); - expect(state).toHaveProperty('data', 0); - done(); - }, 400); + await new Promise(res => { + setTimeout(() => { + rerender( + h(Provider, { + value: client as any, + children: [h(QueryUser, { ...props })], + }) + ); + expect(state).toHaveProperty('data', 0); + res(null); + }, 400); + }); }); - it('forwards error response', done => { + it('forwards error response', async () => { const { rerender } = render( h(Provider, { value: client as any, @@ -137,19 +150,21 @@ describe('useQuery', () => { }) ); - setTimeout(() => { - rerender( - h(Provider, { - value: client as any, - children: [h(QueryUser, { ...props })], - }) - ); - expect(state).toHaveProperty('error', 1); - done(); - }, 400); + await new Promise(res => { + setTimeout(() => { + rerender( + h(Provider, { + value: client as any, + children: [h(QueryUser, { ...props })], + }) + ); + expect(state).toHaveProperty('error', 1); + res(null); + }, 400); + }); }); - it('forwards extensions response', done => { + it('forwards extensions response', async () => { const { rerender } = render( h(Provider, { value: client as any, @@ -167,20 +182,22 @@ describe('useQuery', () => { }) ); - setTimeout(() => { - rerender( - h(Provider, { - value: client as any, - children: [h(QueryUser, { ...props })], - }) - ); + await new Promise(res => { + setTimeout(() => { + rerender( + h(Provider, { + value: client as any, + children: [h(QueryUser, { ...props })], + }) + ); - expect(state).toHaveProperty('extensions', { i: 1 }); - done(); - }, 400); + expect(state).toHaveProperty('extensions', { i: 1 }); + res(null); + }, 400); + }); }); - it('sets fetching to false', done => { + it('sets fetching to false', async () => { const { rerender } = render( h(Provider, { value: client as any, @@ -195,16 +212,18 @@ describe('useQuery', () => { }) ); - setTimeout(() => { - rerender( - h(Provider, { - value: client as any, - children: [h(QueryUser, { ...props })], - }) - ); - expect(state).toHaveProperty('fetching', false); - done(); - }, 400); + await new Promise(res => { + setTimeout(() => { + rerender( + h(Provider, { + value: client as any, + children: [h(QueryUser, { ...props })], + }) + ); + expect(state).toHaveProperty('fetching', false); + res(null); + }, 400); + }); }); describe('on change', () => { @@ -241,8 +260,8 @@ describe('useQuery', () => { }); describe('on unmount', () => { - const start = jest.fn(); - const unsubscribe = jest.fn(); + const start = vi.fn(); + const unsubscribe = vi.fn(); beforeEach(() => { client.executeQuery.mockReturnValue( diff --git a/packages/preact-urql/src/hooks/useSubscription.test.tsx b/packages/preact-urql/src/hooks/useSubscription.test.tsx index 5e87b9457b..7db6c1fad7 100644 --- a/packages/preact-urql/src/hooks/useSubscription.test.tsx +++ b/packages/preact-urql/src/hooks/useSubscription.test.tsx @@ -1,17 +1,28 @@ import { FunctionalComponent as FC, h } from 'preact'; import { render, cleanup, act } from '@testing-library/preact'; import { OperationContext } from '@urql/core'; -import { useSubscription, UseSubscriptionState } from './useSubscription'; +import { + vi, + expect, + it, + beforeEach, + describe, + beforeAll, + Mock, + afterEach, +} from 'vitest'; import { merge, fromValue, never, empty } from 'wonka'; + +import { useSubscription, UseSubscriptionState } from './useSubscription'; import { Provider } from '../context'; const data = { data: 1234, error: 5678 }; const mock = { // @ts-ignore - executeSubscription: jest.fn(() => merge([fromValue(data), never])), + executeSubscription: vi.fn(() => merge([fromValue(data), never])), }; -const client = mock as { executeSubscription: jest.Mock }; +const client = mock as { executeSubscription: Mock }; const query = 'subscription Example { example }'; let state: UseSubscriptionState | undefined; @@ -28,7 +39,9 @@ const SubscriptionUser: FC<{ }; beforeAll(() => { - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothing + }); }); describe('useSubscription', () => { @@ -99,7 +112,7 @@ describe('useSubscription', () => { }); it('calls handler', () => { - const handler = jest.fn(); + const handler = vi.fn(); const { rerender } = render( h(Provider, { value: client as any, diff --git a/packages/preact-urql/tsconfig.json b/packages/preact-urql/tsconfig.json index 924909dc78..2c515d12d7 100644 --- a/packages/preact-urql/tsconfig.json +++ b/packages/preact-urql/tsconfig.json @@ -3,7 +3,7 @@ "include": ["src"], "compilerOptions": { "baseUrl": "./", - "types": ["node", "jest", "react"], + "types": ["node", "react", "vitest"], "jsx": "react", "paths": { "urql": ["../../node_modules/urql/src"], diff --git a/packages/react-urql/package.json b/packages/react-urql/package.json index 9ac3dd9528..44fd2d5d32 100644 --- a/packages/react-urql/package.json +++ b/packages/react-urql/package.json @@ -31,7 +31,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -39,9 +39,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "devDependencies": { "@cypress/react": "^7.0.1", "@cypress/vite-dev-server": "^4.0.1", diff --git a/packages/react-urql/src/components/Mutation.test.tsx b/packages/react-urql/src/components/Mutation.test.tsx index 921cee25f4..6060b19a8d 100644 --- a/packages/react-urql/src/components/Mutation.test.tsx +++ b/packages/react-urql/src/components/Mutation.test.tsx @@ -1,10 +1,10 @@ /* eslint-disable react-hooks/rules-of-hooks */ +import { vi, expect, it, beforeEach, describe, Mock, afterEach } from 'vitest'; -jest.mock('../context', () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { delay, fromValue, pipe } = require('wonka'); +vi.mock('../context', async () => { + const { delay, fromValue, pipe } = await vi.importActual('wonka'); const mock = { - executeMutation: jest.fn(() => + executeMutation: vi.fn(() => pipe(fromValue({ data: 1, error: 2 }), delay(200)) ), }; @@ -20,20 +20,22 @@ import { Mutation } from './Mutation'; import { useClient } from '../context'; // @ts-ignore -const client = useClient() as { executeMutation: jest.Mock }; +const client = useClient() as { executeMutation: Mock }; const query = 'mutation Example { example }'; describe('Mutation', () => { beforeEach(() => { // TODO: Fix use of act() - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothing + }); }); afterEach(() => { cleanup(); }); - it('Should execute the mutation', done => { + it('Should execute the mutation', async () => { let execute = () => { /* noop */ }, @@ -66,9 +68,11 @@ describe('Mutation', () => { fetching: true, error: undefined, }); - setTimeout(() => { - expect(props).toStrictEqual({ data: 1, fetching: false, error: 2 }); - done(); - }, 400); + await new Promise(res => { + setTimeout(() => { + expect(props).toStrictEqual({ data: 1, fetching: false, error: 2 }); + res(null); + }, 400); + }); }); }); diff --git a/packages/react-urql/src/components/Query.test.tsx b/packages/react-urql/src/components/Query.test.tsx index ab2cd52bc3..15b653cb1c 100644 --- a/packages/react-urql/src/components/Query.test.tsx +++ b/packages/react-urql/src/components/Query.test.tsx @@ -1,8 +1,9 @@ -jest.mock('../context', () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { map, interval, pipe } = require('wonka'); +import { vi, expect, it, beforeEach, describe, afterEach } from 'vitest'; + +vi.mock('../context', async () => { + const { map, interval, pipe } = await vi.importActual('wonka'); const mock = { - executeQuery: jest.fn(() => + executeQuery: vi.fn(() => pipe( interval(200), map((i: number) => ({ data: i, error: i + 1 })) @@ -28,14 +29,16 @@ const variables = { describe('Query', () => { beforeEach(() => { // TODO: Fix use of act() - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothing + }); }); afterEach(() => { cleanup(); }); - it('Should execute the query', done => { + it('Should execute the query', async () => { let props = {}; const Test = () =>

Hi

; const App = () => { @@ -55,9 +58,11 @@ describe('Query', () => { fetching: true, error: undefined, }); - setTimeout(() => { - expect(props).toStrictEqual({ data: 0, fetching: false, error: 1 }); - done(); - }, 200); + await new Promise(res => { + setTimeout(() => { + expect(props).toStrictEqual({ data: 0, fetching: false, error: 1 }); + res(null); + }, 200); + }); }); }); diff --git a/packages/react-urql/src/hooks/__snapshots__/useMutation.test.tsx.snap b/packages/react-urql/src/hooks/__snapshots__/useMutation.test.tsx.snap index 2da6d2deb9..f79419cb36 100644 --- a/packages/react-urql/src/hooks/__snapshots__/useMutation.test.tsx.snap +++ b/packages/react-urql/src/hooks/__snapshots__/useMutation.test.tsx.snap @@ -1,7 +1,7 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 -exports[`on initial useEffect initialises default state 1`] = ` -Object { +exports[`on initial useEffect > initialises default state 1`] = ` +{ "data": undefined, "error": undefined, "extensions": undefined, diff --git a/packages/react-urql/src/hooks/__snapshots__/useQuery.test.tsx.snap b/packages/react-urql/src/hooks/__snapshots__/useQuery.test.tsx.snap index 353e67e3e5..6e38c0caa1 100644 --- a/packages/react-urql/src/hooks/__snapshots__/useQuery.test.tsx.snap +++ b/packages/react-urql/src/hooks/__snapshots__/useQuery.test.tsx.snap @@ -1,7 +1,7 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 -exports[`on initial useEffect initialises default state 1`] = ` -Object { +exports[`on initial useEffect > initialises default state 1`] = ` +{ "data": undefined, "error": undefined, "extensions": undefined, diff --git a/packages/react-urql/src/hooks/__snapshots__/useSubscription.test.tsx.snap b/packages/react-urql/src/hooks/__snapshots__/useSubscription.test.tsx.snap index 353e67e3e5..6e38c0caa1 100644 --- a/packages/react-urql/src/hooks/__snapshots__/useSubscription.test.tsx.snap +++ b/packages/react-urql/src/hooks/__snapshots__/useSubscription.test.tsx.snap @@ -1,7 +1,7 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1 -exports[`on initial useEffect initialises default state 1`] = ` -Object { +exports[`on initial useEffect > initialises default state 1`] = ` +{ "data": undefined, "error": undefined, "extensions": undefined, diff --git a/packages/react-urql/src/hooks/useMutation.test.tsx b/packages/react-urql/src/hooks/useMutation.test.tsx index 827b06968b..e692faaaf1 100644 --- a/packages/react-urql/src/hooks/useMutation.test.tsx +++ b/packages/react-urql/src/hooks/useMutation.test.tsx @@ -1,11 +1,11 @@ /* eslint-disable react-hooks/rules-of-hooks */ +import { vi, expect, it, beforeEach, describe, beforeAll, Mock } from 'vitest'; // Note: Testing for hooks is not yet supported in Enzyme - https://github.com/airbnb/enzyme/issues/2011 -jest.mock('../context', () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { delay, fromValue, pipe } = require('wonka'); +vi.mock('../context', async () => { + const { delay, fromValue, pipe } = await vi.importActual('wonka'); const mock = { - executeMutation: jest.fn(() => + executeMutation: vi.fn(() => pipe(fromValue({ data: 1, error: 2, extensions: { i: 1 } }), delay(200)) ), }; @@ -24,7 +24,7 @@ import { useClient } from '../context'; import { useMutation } from './useMutation'; // @ts-ignore -const client = useClient() as { executeMutation: jest.Mock }; +const client = useClient() as { executeMutation: Mock }; const props = { query: 'mutation Example { example }', @@ -42,7 +42,9 @@ const MutationUser = ({ query }: { query: any }) => { beforeAll(() => { // TODO: Fix use of act() - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothing + }); }); beforeEach(() => { diff --git a/packages/react-urql/src/hooks/useQuery.spec.ts b/packages/react-urql/src/hooks/useQuery.spec.ts index 23f48d4533..cf9455af81 100644 --- a/packages/react-urql/src/hooks/useQuery.spec.ts +++ b/packages/react-urql/src/hooks/useQuery.spec.ts @@ -3,13 +3,14 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { interval, map, pipe } from 'wonka'; import { RequestPolicy } from '@urql/core'; +import { vi, expect, it, beforeEach, describe, beforeAll, Mock } from 'vitest'; import { useClient } from '../context'; import { useQuery } from './useQuery'; -jest.mock('../context', () => { +vi.mock('../context', () => { const mock = { - executeQuery: jest.fn(() => + executeQuery: vi.fn(() => pipe( interval(1000 / 60), map(i => ({ data: i, error: i + 1 })) @@ -23,7 +24,7 @@ jest.mock('../context', () => { }); // @ts-ignore -const client = useClient() as { executeQuery: jest.Mock }; +const client = useClient() as { executeQuery: Mock }; const mockQuery = ` query todo($id: ID!) { @@ -42,7 +43,9 @@ const mockVariables = { describe('useQuery', () => { beforeAll(() => { // TODO: Fix use of act() - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothing + }); }); beforeEach(() => { diff --git a/packages/react-urql/src/hooks/useQuery.test.tsx b/packages/react-urql/src/hooks/useQuery.test.tsx index 8a4c536243..ff55fc891b 100644 --- a/packages/react-urql/src/hooks/useQuery.test.tsx +++ b/packages/react-urql/src/hooks/useQuery.test.tsx @@ -1,11 +1,11 @@ /* eslint-disable react-hooks/rules-of-hooks */ +import { vi, expect, it, beforeEach, describe, beforeAll, Mock } from 'vitest'; // Note: Testing for hooks is not yet supported in Enzyme - https://github.com/airbnb/enzyme/issues/2011 -jest.mock('../context', () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { map, interval, pipe } = require('wonka'); +vi.mock('../context', async () => { + const { map, interval, pipe } = await vi.importActual('wonka'); const mock = { - executeQuery: jest.fn(() => + executeQuery: vi.fn(() => pipe( interval(400), map((i: number) => ({ data: i, error: i + 1, extensions: { i: 1 } })) @@ -27,7 +27,7 @@ import { useQuery, UseQueryArgs, UseQueryState } from './useQuery'; import { useClient } from '../context'; // @ts-ignore -const client = useClient() as { executeQuery: jest.Mock }; +const client = useClient() as { executeQuery: Mock }; const props: UseQueryArgs<{ myVar: number }> = { query: '{ example }', @@ -53,7 +53,9 @@ const QueryUser = ({ beforeAll(() => { // TODO: Fix use of act() - jest.spyOn(global.console, 'error').mockImplementation(); + vi.spyOn(global.console, 'error').mockImplementation(() => { + // do nothings + }); }); beforeEach(() => { @@ -98,7 +100,7 @@ describe('on subscription', () => { }); describe('on subscription update', () => { - it('forwards data response', done => { + it('forwards data response', async () => { const wrapper = renderer.create(); /** * Have to call update (without changes) in order to see the @@ -106,14 +108,16 @@ describe('on subscription update', () => { */ wrapper.update(); - setTimeout(() => { - wrapper.update(); - expect(state).toHaveProperty('data', 0); - done(); - }, 400); + await new Promise(res => { + setTimeout(() => { + wrapper.update(); + expect(state).toHaveProperty('data', 0); + res(null); + }, 400); + }); }); - it('forwards error response', done => { + it('forwards error response', async () => { const wrapper = renderer.create(); /** * Have to call update (without changes) in order to see the @@ -121,14 +125,16 @@ describe('on subscription update', () => { */ wrapper.update(); - setTimeout(() => { - wrapper.update(); - expect(state).toHaveProperty('error', 1); - done(); - }, 400); + await new Promise(res => { + setTimeout(() => { + wrapper.update(); + expect(state).toHaveProperty('error', 1); + res(null); + }, 400); + }); }); - it('forwards extensions response', done => { + it('forwards extensions response', async () => { const wrapper = renderer.create(); /** * Have to call update (without changes) in order to see the @@ -136,14 +142,16 @@ describe('on subscription update', () => { */ wrapper.update(); - setTimeout(() => { - wrapper.update(); - expect(state).toHaveProperty('extensions', { i: 1 }); - done(); - }, 400); + await new Promise(res => { + setTimeout(() => { + wrapper.update(); + expect(state).toHaveProperty('extensions', { i: 1 }); + res(null); + }, 400); + }); }); - it('sets fetching to false', done => { + it('sets fetching to false', async () => { const wrapper = renderer.create(); /** * Have to call update (without changes) in order to see the @@ -151,11 +159,13 @@ describe('on subscription update', () => { */ wrapper.update(); - setTimeout(() => { - wrapper.update(); - expect(state).toHaveProperty('fetching', false); - done(); - }, 400); + await new Promise(res => { + setTimeout(() => { + wrapper.update(); + expect(state).toHaveProperty('fetching', false); + res(null); + }, 400); + }); }); }); @@ -178,8 +188,8 @@ describe('on change', () => { }); describe('on unmount', () => { - const start = jest.fn(); - const unsubscribe = jest.fn(); + const start = vi.fn(); + const unsubscribe = vi.fn(); beforeEach(() => { client.executeQuery.mockReturnValue( diff --git a/packages/react-urql/src/hooks/useRequest.test.ts b/packages/react-urql/src/hooks/useRequest.test.ts index f9b88c6ac7..35d6d4e088 100644 --- a/packages/react-urql/src/hooks/useRequest.test.ts +++ b/packages/react-urql/src/hooks/useRequest.test.ts @@ -1,5 +1,6 @@ import { gql } from '@urql/core'; import { renderHook } from '@testing-library/react-hooks'; +import { it, expect } from 'vitest'; import { useRequest } from './useRequest'; it('preserves instance of request when key has not changed', () => { diff --git a/packages/react-urql/src/hooks/useSubscription.test.tsx b/packages/react-urql/src/hooks/useSubscription.test.tsx index 45657b08ed..6da256ab1c 100644 --- a/packages/react-urql/src/hooks/useSubscription.test.tsx +++ b/packages/react-urql/src/hooks/useSubscription.test.tsx @@ -1,12 +1,12 @@ /* eslint-disable react-hooks/rules-of-hooks */ +import { vi, expect, it, beforeEach, describe, Mock } from 'vitest'; // Note: Testing for hooks is not yet supported in Enzyme - https://github.com/airbnb/enzyme/issues/2011 -jest.mock('../context', () => { +vi.mock('../context', async () => { const d = { data: 1234, error: 5678 }; - // eslint-disable-next-line @typescript-eslint/no-var-requires - const { merge, fromValue, never } = require('wonka'); + const { merge, fromValue, never } = await vi.importActual('wonka'); const mock = { - executeSubscription: jest.fn(() => merge([fromValue(d), never])), + executeSubscription: vi.fn(() => merge([fromValue(d), never])), }; return { @@ -22,7 +22,7 @@ import { useSubscription, UseSubscriptionState } from './useSubscription'; import { useClient } from '../context'; // @ts-ignore -const client = useClient() as { executeSubscription: jest.Mock }; +const client = useClient() as { executeSubscription: Mock }; const query = 'subscription Example { example }'; let state: UseSubscriptionState | undefined; @@ -78,7 +78,7 @@ it('should support setting context in useSubscription params', () => { }); it('calls handler', () => { - const handler = jest.fn(); + const handler = vi.fn(); const wrapper = renderer.create( ); diff --git a/packages/react-urql/src/test-utils/ssr.test.tsx b/packages/react-urql/src/test-utils/ssr.test.tsx index de0b931259..0e9d6f45ef 100644 --- a/packages/react-urql/src/test-utils/ssr.test.tsx +++ b/packages/react-urql/src/test-utils/ssr.test.tsx @@ -1,6 +1,7 @@ import React from 'react'; import prepass from 'react-ssr-prepass'; import { never, publish, filter, delay, pipe, map } from 'wonka'; +import { describe, it, beforeEach, expect } from 'vitest'; import { gql, diff --git a/packages/react-urql/tsconfig.json b/packages/react-urql/tsconfig.json index 924909dc78..2b3cff969c 100644 --- a/packages/react-urql/tsconfig.json +++ b/packages/react-urql/tsconfig.json @@ -3,7 +3,7 @@ "include": ["src"], "compilerOptions": { "baseUrl": "./", - "types": ["node", "jest", "react"], + "types": ["node", "react"], "jsx": "react", "paths": { "urql": ["../../node_modules/urql/src"], diff --git a/packages/storage-rn/package.json b/packages/storage-rn/package.json index 334db7d7c0..9b3ed1d28e 100644 --- a/packages/storage-rn/package.json +++ b/packages/storage-rn/package.json @@ -47,9 +47,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "devDependencies": { "@react-native-async-storage/async-storage": "^1.15.5", "@react-native-community/netinfo": "^6.0.0", diff --git a/packages/storage-rn/src/makeAsyncStorage.test.ts b/packages/storage-rn/src/makeAsyncStorage.test.ts index a4c0a0956c..7de6083a1a 100644 --- a/packages/storage-rn/src/makeAsyncStorage.test.ts +++ b/packages/storage-rn/src/makeAsyncStorage.test.ts @@ -1,18 +1,29 @@ -import AsyncStorage from '@react-native-async-storage/async-storage'; -import NetInfo from '@react-native-community/netinfo'; -import { makeAsyncStorage } from './makeAsyncStorage'; +import { vi, expect, it, describe } from 'vitest'; -jest.mock('@react-native-community/netinfo', () => ({ +vi.mock('@react-native-community/netinfo', () => ({ addEventListener: () => 'addEventListener', + default: { + addEventListener: () => 'addEventListener', + }, })); -jest.mock('@react-native-async-storage/async-storage', () => ({ +vi.mock('@react-native-async-storage/async-storage', () => ({ + default: { + setItem: () => 'setItem', + getItem: () => 'getItem', + getAllKeys: () => 'getAllKeys', + removeItem: () => 'removeItem', + }, setItem: () => 'setItem', getItem: () => 'getItem', getAllKeys: () => 'getAllKeys', removeItem: () => 'removeItem', })); +import AsyncStorage from '@react-native-async-storage/async-storage'; +import NetInfo from '@react-native-community/netinfo'; +import { makeAsyncStorage } from './makeAsyncStorage'; + const request = [ { query: 'something something', @@ -31,8 +42,8 @@ const serializedEntries = '{"hello":"world"}'; describe('makeAsyncStorage', () => { describe('writeMetadata', () => { it('writes metadata to async storage', async () => { - const setItemSpy = jest.fn(); - jest.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); + const setItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); const storage = makeAsyncStorage(); @@ -47,8 +58,8 @@ describe('makeAsyncStorage', () => { }); it('writes metadata using a custom key', async () => { - const setItemSpy = jest.fn(); - jest.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); + const setItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); const storage = makeAsyncStorage({ metadataKey: 'my-custom-key' }); @@ -65,8 +76,8 @@ describe('makeAsyncStorage', () => { describe('readMetadata', () => { it('returns an empty array if no metadata is found', async () => { - const getItemSpy = jest.fn().mockResolvedValue(null); - jest.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); + const getItemSpy = vi.fn().mockResolvedValue(null); + vi.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); const storage = makeAsyncStorage(); @@ -78,8 +89,8 @@ describe('makeAsyncStorage', () => { }); it('returns the parsed JSON correctly', async () => { - const getItemSpy = jest.fn().mockResolvedValue(serializedRequest); - jest.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); + const getItemSpy = vi.fn().mockResolvedValue(serializedRequest); + vi.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); const storage = makeAsyncStorage(); @@ -91,8 +102,8 @@ describe('makeAsyncStorage', () => { }); it('reads metadata using a custom key', async () => { - const getItemSpy = jest.fn().mockResolvedValue(serializedRequest); - jest.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); + const getItemSpy = vi.fn().mockResolvedValue(serializedRequest); + vi.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); const storage = makeAsyncStorage({ metadataKey: 'my-custom-key' }); @@ -104,8 +115,8 @@ describe('makeAsyncStorage', () => { }); it('returns an empty array if json.parse errors', async () => { - const getItemSpy = jest.fn().mockResolvedValue('surprise!'); - jest.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); + const getItemSpy = vi.fn().mockResolvedValue('surprise!'); + vi.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); const storage = makeAsyncStorage(); if (storage && storage.readMetadata) { @@ -118,11 +129,11 @@ describe('makeAsyncStorage', () => { describe('writeData', () => { it('writes data to async storage', async () => { - jest.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); + vi.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); const dayStamp = 18891; - const setItemSpy = jest.fn(); - jest.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); + const setItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); const storage = makeAsyncStorage(); @@ -137,11 +148,11 @@ describe('makeAsyncStorage', () => { }); it('writes data to async storage using custom key', async () => { - jest.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); + vi.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); const dayStamp = 18891; - const setItemSpy = jest.fn(); - jest.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); + const setItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); const storage = makeAsyncStorage({ dataKey: 'my-custom-key' }); @@ -156,11 +167,11 @@ describe('makeAsyncStorage', () => { }); it('merges previous writes', async () => { - jest.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); + vi.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); const dayStamp = 18891; - const setItemSpy = jest.fn(); - jest.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); + const setItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); const storage = makeAsyncStorage(); @@ -175,10 +186,10 @@ describe('makeAsyncStorage', () => { ); // write twice - const secondSetItemSpy = jest.fn(); - jest - .spyOn(AsyncStorage, 'setItem') - .mockImplementationOnce(secondSetItemSpy); + const secondSetItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'setItem').mockImplementationOnce( + secondSetItemSpy + ); if (storage && storage.writeData) { storage.writeData({ foo: 'bar' }); @@ -190,17 +201,15 @@ describe('makeAsyncStorage', () => { }); it('keeps items from previous days', async () => { - jest.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); + vi.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); const dayStamp = 18891; const oldDayStamp = 18857; - jest - .spyOn(AsyncStorage, 'getItem') - .mockResolvedValueOnce( - JSON.stringify({ [oldDayStamp]: { foo: 'bar' } }) - ); + vi.spyOn(AsyncStorage, 'getItem').mockResolvedValueOnce( + JSON.stringify({ [oldDayStamp]: { foo: 'bar' } }) + ); - const setItemSpy = jest.fn(); - jest.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); + const setItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); const storage = makeAsyncStorage(); @@ -215,9 +224,9 @@ describe('makeAsyncStorage', () => { }); it('propagates deleted keys to previous days', async () => { - jest.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); + vi.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); const dayStamp = 18891; - jest.spyOn(AsyncStorage, 'getItem').mockResolvedValueOnce( + vi.spyOn(AsyncStorage, 'getItem').mockResolvedValueOnce( JSON.stringify({ [dayStamp]: { foo: 'bar', hello: 'world' }, [dayStamp - 1]: { foo: 'bar', hello: 'world' }, @@ -225,8 +234,8 @@ describe('makeAsyncStorage', () => { }) ); - const setItemSpy = jest.fn(); - jest.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); + const setItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); const storage = makeAsyncStorage(); @@ -247,8 +256,8 @@ describe('makeAsyncStorage', () => { describe('readData', () => { it('returns an empty object if no data is found', async () => { - const getItemSpy = jest.fn().mockResolvedValue(null); - jest.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); + const getItemSpy = vi.fn().mockResolvedValue(null); + vi.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); const storage = makeAsyncStorage(); @@ -260,11 +269,11 @@ describe('makeAsyncStorage', () => { }); it("returns today's data correctly", async () => { - jest.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); + vi.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); const dayStamp = 18891; const mockData = JSON.stringify({ [dayStamp]: entires }); - const getItemSpy = jest.fn().mockResolvedValue(mockData); - jest.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); + const getItemSpy = vi.fn().mockResolvedValue(mockData); + vi.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); const storage = makeAsyncStorage(); @@ -276,7 +285,7 @@ describe('makeAsyncStorage', () => { }); it('merges data from past days correctly', async () => { - jest.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); + vi.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); const dayStamp = 18891; const mockData = JSON.stringify({ [dayStamp]: { one: 'one' }, @@ -284,8 +293,8 @@ describe('makeAsyncStorage', () => { [dayStamp - 3]: { three: 'three' }, [dayStamp - 4]: { two: 'old' }, }); - const getItemSpy = jest.fn().mockResolvedValue(mockData); - jest.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); + const getItemSpy = vi.fn().mockResolvedValue(mockData); + vi.spyOn(AsyncStorage, 'getItem').mockImplementationOnce(getItemSpy); const storage = makeAsyncStorage(); @@ -301,7 +310,7 @@ describe('makeAsyncStorage', () => { }); it('cleans up old data', async () => { - jest.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); + vi.spyOn(Date.prototype, 'valueOf').mockReturnValueOnce(1632209690641); const dayStamp = 18891; const maxAge = 5; const mockData = JSON.stringify({ @@ -309,9 +318,9 @@ describe('makeAsyncStorage', () => { [dayStamp - maxAge + 1]: entires, // should be kept [dayStamp - maxAge - 1]: { old: 'data' }, // should get deleted }); - jest.spyOn(AsyncStorage, 'getItem').mockResolvedValueOnce(mockData); - const setItemSpy = jest.fn(); - jest.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); + vi.spyOn(AsyncStorage, 'getItem').mockResolvedValueOnce(mockData); + const setItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'setItem').mockImplementationOnce(setItemSpy); const storage = makeAsyncStorage({ maxAge }); @@ -331,10 +340,10 @@ describe('makeAsyncStorage', () => { describe('onOnline', () => { it('sets up an event listener for the network change event', () => { - const addEventListenerSpy = jest.fn(); - jest - .spyOn(NetInfo, 'addEventListener') - .mockImplementationOnce(addEventListenerSpy); + const addEventListenerSpy = vi.fn(); + vi.spyOn(NetInfo, 'addEventListener').mockImplementationOnce( + addEventListenerSpy + ); const storage = makeAsyncStorage(); @@ -346,14 +355,12 @@ describe('makeAsyncStorage', () => { }); it('calls the callback when the device comes online', () => { - const callbackSpy = jest.fn(); + const callbackSpy = vi.fn(); let networkCallback; - jest - .spyOn(NetInfo, 'addEventListener') - .mockImplementationOnce(callback => { - networkCallback = callback; - return () => null; - }); + vi.spyOn(NetInfo, 'addEventListener').mockImplementationOnce(callback => { + networkCallback = callback; + return () => null; + }); const storage = makeAsyncStorage(); @@ -367,14 +374,12 @@ describe('makeAsyncStorage', () => { }); it('does not call the callback when the device is offline', () => { - const callbackSpy = jest.fn(); + const callbackSpy = vi.fn(); let networkCallback; - jest - .spyOn(NetInfo, 'addEventListener') - .mockImplementationOnce(callback => { - networkCallback = callback; - return () => null; - }); + vi.spyOn(NetInfo, 'addEventListener').mockImplementationOnce(callback => { + networkCallback = callback; + return () => null; + }); const storage = makeAsyncStorage(); @@ -390,10 +395,9 @@ describe('makeAsyncStorage', () => { describe('clear', () => { it('clears all data and metadata', async () => { - const removeItemSpy = jest.fn(); - const secondRemoveItemSpy = jest.fn(); - jest - .spyOn(AsyncStorage, 'removeItem') + const removeItemSpy = vi.fn(); + const secondRemoveItemSpy = vi.fn(); + vi.spyOn(AsyncStorage, 'removeItem') .mockImplementationOnce(removeItemSpy) .mockImplementationOnce(secondRemoveItemSpy); diff --git a/packages/svelte-urql/package.json b/packages/svelte-urql/package.json index b19527a0b0..04ce61b59c 100644 --- a/packages/svelte-urql/package.json +++ b/packages/svelte-urql/package.json @@ -39,7 +39,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -47,9 +47,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "peerDependencies": { "graphql": "^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0", "svelte": "^3.0.0" diff --git a/packages/svelte-urql/src/mutationStore.test.ts b/packages/svelte-urql/src/mutationStore.test.ts index 72191cd226..c264595abb 100644 --- a/packages/svelte-urql/src/mutationStore.test.ts +++ b/packages/svelte-urql/src/mutationStore.test.ts @@ -1,5 +1,7 @@ import { createClient } from '@urql/core'; import { get } from 'svelte/store'; +import { vi, expect, it, describe } from 'vitest'; + import { mutationStore } from './mutationStore'; describe('mutationStore', () => { @@ -16,7 +18,7 @@ describe('mutationStore', () => { }); it('creates a svelte store', () => { - const subscriber = jest.fn(); + const subscriber = vi.fn(); store.subscribe(subscriber); expect(subscriber).toHaveBeenCalledTimes(1); }); diff --git a/packages/svelte-urql/src/queryStore.test.ts b/packages/svelte-urql/src/queryStore.test.ts index 8b6ef04e43..dab8c9ce69 100644 --- a/packages/svelte-urql/src/queryStore.test.ts +++ b/packages/svelte-urql/src/queryStore.test.ts @@ -1,7 +1,9 @@ import { createClient } from '@urql/core'; -import { queryStore } from './queryStore'; +import { vi, expect, it, describe } from 'vitest'; import { get } from 'svelte/store'; +import { queryStore } from './queryStore'; + describe('queryStore', () => { const client = createClient({ url: 'https://example.com' }); const variables = {}; @@ -10,7 +12,7 @@ describe('queryStore', () => { const store = queryStore({ client, query, variables, context }); it('creates a svelte store', () => { - const subscriber = jest.fn(); + const subscriber = vi.fn(); store.subscribe(subscriber); expect(subscriber).toHaveBeenCalledTimes(1); }); diff --git a/packages/svelte-urql/src/subscriptionStore.test.ts b/packages/svelte-urql/src/subscriptionStore.test.ts index f82bfeb168..7ad7eebbaa 100644 --- a/packages/svelte-urql/src/subscriptionStore.test.ts +++ b/packages/svelte-urql/src/subscriptionStore.test.ts @@ -1,5 +1,7 @@ import { createClient } from '@urql/core'; import { get } from 'svelte/store'; +import { vi, expect, it, describe } from 'vitest'; + import { subscriptionStore } from './subscriptionStore'; describe('subscriptionStore', () => { @@ -15,7 +17,7 @@ describe('subscriptionStore', () => { }); it('creates a svelte store', () => { - const subscriber = jest.fn(); + const subscriber = vi.fn(); store.subscribe(subscriber); expect(subscriber).toHaveBeenCalledTimes(1); }); diff --git a/packages/vue-urql/package.json b/packages/vue-urql/package.json index 52320d2854..ddf149aa34 100644 --- a/packages/vue-urql/package.json +++ b/packages/vue-urql/package.json @@ -39,7 +39,7 @@ "dist/" ], "scripts": { - "test": "jest", + "test": "vitest --config ../../vitest.config.ts", "clean": "rimraf dist", "check": "tsc --noEmit", "lint": "eslint --ext=js,jsx,ts,tsx .", @@ -47,9 +47,6 @@ "prepare": "node ../../scripts/prepare/index.js", "prepublishOnly": "run-s clean build" }, - "jest": { - "preset": "../../scripts/jest/preset" - }, "devDependencies": { "graphql": "^16.0.0", "vue": "^3.0.11" diff --git a/packages/vue-urql/src/useMutation.test.ts b/packages/vue-urql/src/useMutation.test.ts index dcd6535c10..298b5c94e0 100644 --- a/packages/vue-urql/src/useMutation.test.ts +++ b/packages/vue-urql/src/useMutation.test.ts @@ -1,10 +1,14 @@ -import { reactive, ref } from 'vue'; +import { reactive } from 'vue'; +import { vi, expect, it, beforeEach, describe } from 'vitest'; -jest.mock('./useClient.ts', () => ({ - __esModule: true, - ...jest.requireActual('./useClient.ts'), - useClient: () => ref(client), -})); +vi.mock('./useClient.ts', async () => { + const { ref } = await vi.importActual('vue'); + return { + __esModule: true, + ...((await vi.importActual('./useClient.ts')) as object), + useClient: () => ref(client), + }; +}); import { makeSubject } from 'wonka'; import { createClient, gql } from '@urql/core'; @@ -13,13 +17,13 @@ import { useMutation } from './useMutation'; const client = createClient({ url: '/graphql', exchanges: [] }); beforeEach(() => { - jest.resetAllMocks(); + vi.resetAllMocks(); }); describe('useMutation', () => { - it('provides an execute method that resolves a promise', done => { + it('provides an execute method that resolves a promise', async () => { const subject = makeSubject(); - const clientMutation = jest + const clientMutation = vi .spyOn(client, 'executeMutation') .mockImplementation(() => subject.source); @@ -52,12 +56,11 @@ describe('useMutation', () => { expect(clientMutation).toHaveBeenCalledTimes(1); subject.next({ data: { test: true } }); - promise.then(function () { + await promise.then(function () { expect(mutation.fetching).toBe(false); expect(mutation.stale).toBe(false); expect(mutation.error).toBe(undefined); expect(mutation.data).toEqual({ test: true }); - done(); }); }); }); diff --git a/packages/vue-urql/src/useQuery.test.ts b/packages/vue-urql/src/useQuery.test.ts index 9b4ed8dd7c..8728beba27 100644 --- a/packages/vue-urql/src/useQuery.test.ts +++ b/packages/vue-urql/src/useQuery.test.ts @@ -1,8 +1,9 @@ import { nextTick, reactive, ref } from 'vue'; +import { vi, expect, it, describe } from 'vitest'; -jest.mock('./useClient.ts', () => ({ +vi.mock('./useClient.ts', async () => ({ __esModule: true, - ...jest.requireActual('./useClient.ts'), + ...((await vi.importActual('./useClient.ts')) as object), useClient: () => ref(client), })); @@ -15,7 +16,7 @@ const client = createClient({ url: '/graphql', exchanges: [] }); describe('useQuery', () => { it('runs a query and updates data', async () => { const subject = makeSubject(); - const executeQuery = jest + const executeQuery = vi .spyOn(client, 'executeQuery') .mockImplementation(() => subject.source); @@ -59,7 +60,7 @@ describe('useQuery', () => { }); it('runs queries as a promise-like that resolves when used', async () => { - const executeQuery = jest + const executeQuery = vi .spyOn(client, 'executeQuery') .mockImplementation(() => { return pipe(fromValue({ data: { test: true } }), delay(1)) as any; @@ -75,7 +76,7 @@ describe('useQuery', () => { }); it('runs queries as a promise-like that resolves even when the query changes', async () => { - const executeQuery = jest + const executeQuery = vi .spyOn(client, 'executeQuery') .mockImplementation(request => { return pipe( @@ -106,7 +107,7 @@ describe('useQuery', () => { it('pauses query when asked to do so', async () => { const subject = makeSubject(); - const executeQuery = jest + const executeQuery = vi .spyOn(client, 'executeQuery') .mockImplementation(() => subject.source); diff --git a/packages/vue-urql/src/useSubscription.test.ts b/packages/vue-urql/src/useSubscription.test.ts index 00bc04bef8..5939828f7f 100644 --- a/packages/vue-urql/src/useSubscription.test.ts +++ b/packages/vue-urql/src/useSubscription.test.ts @@ -1,8 +1,9 @@ import { nextTick, reactive, ref } from 'vue'; +import { vi, expect, it, describe } from 'vitest'; -jest.mock('./useClient.ts', () => ({ +vi.mock('./useClient.ts', async () => ({ __esModule: true, - ...jest.requireActual('./useClient.ts'), + ...((await vi.importActual('./useClient.ts')) as object), useClient: () => ref(client), })); @@ -15,7 +16,7 @@ const client = createClient({ url: '/graphql', exchanges: [] }); describe('useSubscription', () => { it('subscribes to a subscription and updates data', async () => { const subject = makeSubject(); - const executeQuery = jest + const executeQuery = vi .spyOn(client, 'executeSubscription') .mockImplementation(() => subject.source); @@ -57,7 +58,7 @@ describe('useSubscription', () => { it('updates the executed subscription when inputs change', async () => { const subject = makeSubject(); - const executeSubscription = jest + const executeSubscription = vi .spyOn(client, 'executeSubscription') .mockImplementation(() => subject.source); @@ -98,7 +99,7 @@ describe('useSubscription', () => { }); it('supports a custom scanning handler', async () => { const subject = makeSubject(); - const executeSubscription = jest + const executeSubscription = vi .spyOn(client, 'executeSubscription') .mockImplementation(() => subject.source); diff --git a/packages/vue-urql/tsconfig.json b/packages/vue-urql/tsconfig.json index 218c6fe188..1df51497b1 100644 --- a/packages/vue-urql/tsconfig.json +++ b/packages/vue-urql/tsconfig.json @@ -3,7 +3,7 @@ "include": ["src"], "compilerOptions": { "baseUrl": "./", - "types": ["node", "vue", "jest"], + "types": ["node", "vue"], "paths": { "urql": ["../../node_modules/urql/src"], "*-urql": ["../../node_modules/*-urql/src"], diff --git a/scripts/eslint/common.js b/scripts/eslint/common.js index 30521f60ab..4d445e78ed 100644 --- a/scripts/eslint/common.js +++ b/scripts/eslint/common.js @@ -22,7 +22,6 @@ module.exports = { plugins: [ 'react-hooks', 'prettier', - 'jest', 'es5', ], rules: { @@ -45,7 +44,9 @@ module.exports = { trailingComma: 'es5', }], }, - + globals: { + "vi": true + }, overrides: [ { files: [ @@ -58,11 +59,6 @@ module.exports = { 'es5/no-for-of': 'off', 'es5/no-generators': 'off', 'es5/no-typeof-symbol': 'off', - - 'jest/no-disabled-tests': 'error', - 'jest/no-focused-tests': 'error', - 'jest/no-identical-title': 'warn', - 'jest/consistent-test-it': ['warn', { fn: 'it' }], } } ], diff --git a/scripts/jest/preset.js b/scripts/jest/preset.js deleted file mode 100644 index 030b4ffab4..0000000000 --- a/scripts/jest/preset.js +++ /dev/null @@ -1,21 +0,0 @@ -module.exports = { - setupFiles: [ - require.resolve('./setup.js') - ], - clearMocks: true, - transform: { - '^.+\\.tsx?$': '@sucrase/jest-plugin', - }, - moduleNameMapper: { - "^urql$": "/../../node_modules/urql/src", - "^(.*-urql)$": "/../../node_modules/$1/src", - "^@urql/(.*)/(.*)$": "/../../node_modules/@urql/$1/src/$2", - "^@urql/(.*)$": "/../../node_modules/@urql/$1/src", - }, - watchPlugins: ['jest-watch-yarn-workspaces'], - testRegex: '(src/.*(\\.|/)(test|spec))\\.tsx?$', - moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx', 'json'], - collectCoverageFrom: ['/src/**/*.{ts,tsx}'], - coveragePathIgnorePatterns: ['/src/test-utils'], - testPathIgnorePatterns: ["/e2e-tests/*"], -}; diff --git a/scripts/jest/setup.js b/scripts/jest/setup.js deleted file mode 100644 index 78436ea7e0..0000000000 --- a/scripts/jest/setup.js +++ /dev/null @@ -1,19 +0,0 @@ -// This script is run before each `.test.ts` file. - -global.AbortController = undefined; -global.fetch = jest.fn(); - -process.on('unhandledRejection', error => { - throw error; -}); - -const originalConsole = console; -global.console = { - ...originalConsole, - warn: jest.SpyInstance = () => { /* noop */ }, - error: jest.SpyInstance = (message) => { throw new Error(message); } -}; - -jest.spyOn(console, 'log'); -jest.spyOn(console, 'warn'); -jest.spyOn(console, 'error'); diff --git a/scripts/vitest/setup.js b/scripts/vitest/setup.js new file mode 100644 index 0000000000..8e2ce82fa3 --- /dev/null +++ b/scripts/vitest/setup.js @@ -0,0 +1,20 @@ +// This script is run before each `.test.ts` file. +import { vi } from 'vitest'; + +global.AbortController = undefined; +global.fetch = vi.fn(); + +process.on('unhandledRejection', error => { + throw error; +}); + +const originalConsole = console; +global.console = { + ...originalConsole, + warn: vi.SpyInstance = () => { /* noop */ }, + error: vi.SpyInstance = (message) => { throw new Error(message); } +}; + +vi.spyOn(console, 'log'); +vi.spyOn(console, 'warn'); +vi.spyOn(console, 'error'); diff --git a/tsconfig.json b/tsconfig.json index e41ee6ab6f..32f42920d4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "baseUrl": "./", - "types": ["node", "jest"], + "types": ["node"], "paths": { "urql": ["packages/react-urql/src"], "*-urql": ["packages/*-urql/src"], diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000000..ea4cc2582d --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,28 @@ +import { defineConfig } from 'vitest/config'; +import path from 'path'; + +export default defineConfig({ + test: { + environment: 'jsdom', + globals: false, + maxConcurrency: 20, + setupFiles: [path.resolve(__dirname, 'scripts/vitest/setup.js')], + clearMocks: true, + alias: { + urql: path.resolve(__dirname, 'node_modules/urql/src'), + '@urql/core': path.resolve(__dirname, 'node_modules/@urql/core/src'), + '@urql/introspection': path.resolve( + __dirname, + 'node_modules/@urql/introspection/src' + ), + }, + exclude: [ + '**/node_modules/**', + '**/dist/**', + '**/cypress/**', + '**/e2e-tests/**', + '**/.{idea,git,cache,output,temp}/**', + '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.*', + ], + }, +}); diff --git a/yarn.lock b/yarn.lock index 78020efe1c..f3c95a6d04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -99,7 +99,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.1.0", "@babel/core@^7.12.10", "@babel/core@^7.2.0", "@babel/core@^7.20.2", "@babel/core@^7.5.5", "@babel/core@^7.7.5": +"@babel/core@^7.12.10", "@babel/core@^7.2.0", "@babel/core@^7.20.2", "@babel/core@^7.5.5", "@babel/core@^7.7.5": version "7.20.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.2.tgz#8dc9b1620a673f92d3624bd926dc49a52cf25b92" integrity sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g== @@ -356,7 +356,7 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.0", "@babel/parser@^7.12.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2": +"@babel/parser@^7.12.0", "@babel/parser@^7.12.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2": version "7.20.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg== @@ -512,14 +512,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-bigint@^7.8.3": - version "7.8.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz#4c9a6f669f5d0cdf1b90a1671e9a146be5300cea" - integrity sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13", "@babel/plugin-syntax-class-properties@^7.8.3": +"@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== @@ -561,13 +554,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-syntax-import-meta@^7.8.3": - version "7.10.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" - integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - "@babel/plugin-syntax-json-strings@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz#01ca21b668cd8218c9e640cb6dd88c5412b2c96a" @@ -589,7 +575,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== @@ -603,7 +589,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-numeric-separator@^7.10.4", "@babel/plugin-syntax-numeric-separator@^7.8.3": +"@babel/plugin-syntax-numeric-separator@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== @@ -631,7 +617,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-top-level-await@^7.12.13", "@babel/plugin-syntax-top-level-await@^7.8.3": +"@babel/plugin-syntax-top-level-await@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz#c5f0fa6e249f5b739727f923540cf7a806130178" integrity sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ== @@ -1109,7 +1095,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.12.13", "@babel/template@^7.12.7", "@babel/template@^7.18.10", "@babel/template@^7.3.3": +"@babel/template@^7.12.13", "@babel/template@^7.12.7", "@babel/template@^7.18.10": version "7.18.10" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== @@ -1118,7 +1104,7 @@ "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.20.1", "@babel/traverse@^7.4.5": +"@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.20.1", "@babel/traverse@^7.4.5": version "7.20.1" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.1.tgz#9b15ccbf882f6d107eeeecf263fbcdd208777ec8" integrity sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA== @@ -1143,7 +1129,7 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@babel/types@^7.0.0", "@babel/types@^7.12.0", "@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.12.7", "@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.13.14", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": +"@babel/types@^7.12.0", "@babel/types@^7.12.1", "@babel/types@^7.12.13", "@babel/types@^7.12.7", "@babel/types@^7.13.0", "@babel/types@^7.13.12", "@babel/types@^7.13.14", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.4.4": version "7.20.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.2.tgz#67ac09266606190f496322dbaff360fdaa5e7842" integrity sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog== @@ -1152,11 +1138,6 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" -"@bcoe/v8-coverage@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" - integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== - "@changesets/apply-release-plan@^5.0.0": version "5.0.0" resolved "https://registry.yarnpkg.com/@changesets/apply-release-plan/-/apply-release-plan-5.0.0.tgz#11bf168acecbf4cfa2b0e6425160bac5ceeec1c3" @@ -1349,14 +1330,6 @@ human-id "^1.0.2" prettier "^1.19.1" -"@cnakazawa/watch@^1.0.3": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" - integrity sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ== - dependencies: - exec-sh "^0.3.2" - minimist "^1.2.0" - "@cypress/react@^7.0.1": version "7.0.1" resolved "https://registry.yarnpkg.com/@cypress/react/-/react-7.0.1.tgz#30089e918434a934db70e5d0d7efaa49c653c791" @@ -1555,182 +1528,6 @@ resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.0.tgz#f3933a44e365864f4dad5db94158106d511e8131" integrity sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug== -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jest/console@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-26.6.2.tgz#4e04bc464014358b03ab4937805ee36a0aeb98f2" - integrity sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g== - dependencies: - "@jest/types" "^26.6.2" - "@types/node" "*" - chalk "^4.0.0" - jest-message-util "^26.6.2" - jest-util "^26.6.2" - slash "^3.0.0" - -"@jest/core@^26.6.3": - version "26.6.3" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-26.6.3.tgz#7639fcb3833d748a4656ada54bde193051e45fad" - integrity sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw== - dependencies: - "@jest/console" "^26.6.2" - "@jest/reporters" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/transform" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-changed-files "^26.6.2" - jest-config "^26.6.3" - jest-haste-map "^26.6.2" - jest-message-util "^26.6.2" - jest-regex-util "^26.0.0" - jest-resolve "^26.6.2" - jest-resolve-dependencies "^26.6.3" - jest-runner "^26.6.3" - jest-runtime "^26.6.3" - jest-snapshot "^26.6.2" - jest-util "^26.6.2" - jest-validate "^26.6.2" - jest-watcher "^26.6.2" - micromatch "^4.0.2" - p-each-series "^2.1.0" - rimraf "^3.0.0" - slash "^3.0.0" - strip-ansi "^6.0.0" - -"@jest/environment@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-26.6.2.tgz#ba364cc72e221e79cc8f0a99555bf5d7577cf92c" - integrity sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA== - dependencies: - "@jest/fake-timers" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/node" "*" - jest-mock "^26.6.2" - -"@jest/fake-timers@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-26.6.2.tgz#459c329bcf70cee4af4d7e3f3e67848123535aad" - integrity sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA== - dependencies: - "@jest/types" "^26.6.2" - "@sinonjs/fake-timers" "^6.0.1" - "@types/node" "*" - jest-message-util "^26.6.2" - jest-mock "^26.6.2" - jest-util "^26.6.2" - -"@jest/globals@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-26.6.2.tgz#5b613b78a1aa2655ae908eba638cc96a20df720a" - integrity sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA== - dependencies: - "@jest/environment" "^26.6.2" - "@jest/types" "^26.6.2" - expect "^26.6.2" - -"@jest/reporters@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-26.6.2.tgz#1f518b99637a5f18307bd3ecf9275f6882a667f6" - integrity sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw== - dependencies: - "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/transform" "^26.6.2" - "@jest/types" "^26.6.2" - chalk "^4.0.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.2" - graceful-fs "^4.2.4" - istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^4.0.3" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.0" - istanbul-reports "^3.0.2" - jest-haste-map "^26.6.2" - jest-resolve "^26.6.2" - jest-util "^26.6.2" - jest-worker "^26.6.2" - slash "^3.0.0" - source-map "^0.6.0" - string-length "^4.0.1" - terminal-link "^2.0.0" - v8-to-istanbul "^7.0.0" - optionalDependencies: - node-notifier "^8.0.0" - -"@jest/source-map@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-26.6.2.tgz#29af5e1e2e324cafccc936f218309f54ab69d535" - integrity sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.2.4" - source-map "^0.6.0" - -"@jest/test-result@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-26.6.2.tgz#55da58b62df134576cc95476efa5f7949e3f5f18" - integrity sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ== - dependencies: - "@jest/console" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/istanbul-lib-coverage" "^2.0.0" - collect-v8-coverage "^1.0.0" - -"@jest/test-sequencer@^26.6.3": - version "26.6.3" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz#98e8a45100863886d074205e8ffdc5a7eb582b17" - integrity sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw== - dependencies: - "@jest/test-result" "^26.6.2" - graceful-fs "^4.2.4" - jest-haste-map "^26.6.2" - jest-runner "^26.6.3" - jest-runtime "^26.6.3" - -"@jest/transform@^26.6.2": - version "26.6.2" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-26.6.2.tgz#5ac57c5fa1ad17b2aae83e73e45813894dcf2e4b" - integrity sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^26.6.2" - babel-plugin-istanbul "^6.0.0" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.2.4" - jest-haste-map "^26.6.2" - jest-regex-util "^26.0.0" - jest-util "^26.6.2" - micromatch "^4.0.2" - pirates "^4.0.1" - slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" - "@jest/types@^26.6.2": version "26.6.2" resolved "https://registry.yarnpkg.com/@jest/types/-/types-26.6.2.tgz#bef5a532030e1d88a2f5a6d933f84e97226ed48e" @@ -2167,20 +1964,6 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd" integrity sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow== -"@sinonjs/commons@^1.7.0": - version "1.8.3" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" - integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== - dependencies: - type-detect "4.0.8" - -"@sinonjs/fake-timers@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz#293674fccb3262ac782c7aadfdeca86b10c75c40" - integrity sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA== - dependencies: - "@sinonjs/commons" "^1.7.0" - "@storybook/addons@6.2.9", "@storybook/addons@>=6.0.28": version "6.2.9" resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-6.2.9.tgz#b7ba2b9f0e15b852c7d6b57d04fb0a493c57477c" @@ -2674,13 +2457,6 @@ resolve-from "^5.0.0" store2 "^2.12.0" -"@sucrase/jest-plugin@^2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@sucrase/jest-plugin/-/jest-plugin-2.2.1.tgz#659d31f34412fc9c50e6e0622298baaf27b75366" - integrity sha512-5fG+kHOlfwPNi82MCvTFQdAg50YQymGbdwH9nzTA9D9FhJVHynTjadXi58gb/Ae17RMvinY0+Fglx33MB056Rg== - dependencies: - sucrase "^3.18.0" - "@testing-library/dom@^7.16.2", "@testing-library/dom@^7.28.1": version "7.30.4" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.30.4.tgz#c6a4a91557e92035fd565246bbbfb8107aa4634d" @@ -2722,6 +2498,11 @@ "@babel/runtime" "^7.12.5" "@testing-library/dom" "^7.28.1" +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + "@types/anymatch@*": version "1.3.1" resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" @@ -2732,44 +2513,23 @@ resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.1.tgz#78b5433344e2f92e8b306c06a5622c50c245bf6b" integrity sha512-S6oPal772qJZHoRZLFc/XoZW2gFvwXusYUmXPXkgxJLuEk2vOt7jc4Yo6z/vtI0EBkbPBVrJJ0B+prLIKiWqHg== -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.7": - version "7.1.14" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.14.tgz#faaeefc4185ec71c389f4501ee5ec84b170cc402" - integrity sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.2" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.2.tgz#f3d71178e187858f7c45e30380f8f1b7415a12d8" - integrity sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.4.0" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.0.tgz#0c888dd70b3ee9eebb6e4f200e809da0076262be" - integrity sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.11.1" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.11.1.tgz#654f6c4f67568e24c23b367e947098c6206fa639" - integrity sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw== - dependencies: - "@babel/types" "^7.3.0" - "@types/braces@*": version "3.0.0" resolved "https://registry.yarnpkg.com/@types/braces/-/braces-3.0.0.tgz#7da1c0d44ff1c7eb660a36ec078ea61ba7eb42cb" integrity sha512-TbH79tcyi9FHwbyboOKeRachRq63mSuWYXOflsNO9ZyE5ClQ/JaozNKl+aWUq87qPNsXasXxi2AbgfwIJ+8GQw== +"@types/chai-subset@^1.3.3": + version "1.3.3" + resolved "https://registry.yarnpkg.com/@types/chai-subset/-/chai-subset-1.3.3.tgz#97893814e92abd2c534de422cb377e0e0bdaac94" + integrity sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw== + dependencies: + "@types/chai" "*" + +"@types/chai@*", "@types/chai@^4.3.3": + version "4.3.4" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.4.tgz#e913e8175db8307d78b4e8fa690408ba6b65dee4" + integrity sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw== + "@types/cheerio@*": version "0.22.28" resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.28.tgz#90808aabb44fec40fa2950f4c72351e3e4eb065b" @@ -2822,13 +2582,6 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/graceful-fs@^4.1.2": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== - dependencies: - "@types/node" "*" - "@types/hast@^2.0.0": version "2.3.1" resolved "https://registry.yarnpkg.com/@types/hast/-/hast-2.3.1.tgz#b16872f2a6144c7025f296fb9636a667ebb79cd9" @@ -2846,7 +2599,7 @@ resolved "https://registry.yarnpkg.com/@types/is-function/-/is-function-1.0.0.tgz#1b0b819b1636c7baf0d6785d030d12edf70c3e83" integrity sha512-iTs9HReBu7evG77Q4EC8hZnqRt57irBDkK9nvmHroiOIVwYMQc4IvYvdRgwKfYepunIY7Oh/dBuuld+Gj9uo6w== -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.3" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz#4ba8ddb720221f432e443bd5f9117fd22cfd4762" integrity sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw== @@ -2865,14 +2618,6 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^26.0.23": - version "26.0.23" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-26.0.23.tgz#a1b7eab3c503b80451d019efb588ec63522ee4e7" - integrity sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA== - dependencies: - jest-diff "^26.0.0" - pretty-format "^26.0.0" - "@types/json-schema@^7.0.3", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.6": version "7.0.7" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" @@ -2962,11 +2707,6 @@ resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-5.0.3.tgz#e7b5aebbac150f8b5fdd4a46e7f0bd8e65e19109" integrity sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw== -"@types/prettier@^2.0.0": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0" - integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA== - "@types/pretty-hrtime@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/pretty-hrtime/-/pretty-hrtime-1.0.0.tgz#c5a2d644a135e988b2932f99737e67b3c62528d0" @@ -3054,11 +2794,6 @@ resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" integrity sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA== -"@types/stack-utils@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.0.tgz#7036640b4e21cc2f259ae826ce843d277dad8cff" - integrity sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== - "@types/tapable@^1", "@types/tapable@^1.0.5": version "1.0.7" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.7.tgz#545158342f949e8fd3bfd813224971ecddc3fac4" @@ -3135,7 +2870,7 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@4.22.0", "@typescript-eslint/experimental-utils@^4.0.1": +"@typescript-eslint/experimental-utils@4.22.0": version "4.22.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.22.0.tgz#68765167cca531178e7b650a53456e6e0bef3b1f" integrity sha512-xJXHHl6TuAxB5AWiVrGhvbGL8/hbiCQ8FiWwObO3r0fnvBdrbWEDy1hlvGQOAWc6qsCWuWMKdVWlLAEMpxnddg== @@ -3406,10 +3141,10 @@ resolved "https://registry.yarnpkg.com/@zeit/schemas/-/schemas-2.6.0.tgz#004e8e553b4cd53d538bd38eac7bcbf58a867fe3" integrity sha512-uUrgZ8AxS+Lio0fZKAipJjAh415JyrOZowliZAzmnJSsf7piVL5w+G0+gFJ0KSu3QRhvui/7zuvpLz03YjXAhg== -abab@^2.0.3, abab@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" - integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== +abab@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: version "1.3.7" @@ -3419,13 +3154,13 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" -acorn-globals@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" - integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== +acorn-globals@^7.0.0: + version "7.0.1" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-7.0.1.tgz#0dbf05c44fa7c94332914c02066d5beff62c40c3" + integrity sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q== dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" + acorn "^8.1.0" + acorn-walk "^8.0.2" acorn-jsx@^5.3.1: version "5.3.1" @@ -3437,6 +3172,11 @@ acorn-walk@^7.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== +acorn-walk@^8.0.2, acorn-walk@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + acorn@^6.4.1: version "6.4.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6" @@ -3447,10 +3187,10 @@ acorn@^7.1.1, acorn@^7.4.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== -acorn@^8.1.0, acorn@^8.5.0: - version "8.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" - integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== +acorn@^8.1.0, acorn@^8.5.0, acorn@^8.8.0, acorn@^8.8.1: + version "8.8.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.1.tgz#0a3f9cbecc4ec3bea6f0a80b66ae8dd2da250b73" + integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== address@1.1.2, address@^1.0.1: version "1.1.2" @@ -3462,6 +3202,13 @@ after@0.8.2: resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" integrity sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8= +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + aggregate-error@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" @@ -3582,12 +3329,12 @@ ansi-colors@^4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-escapes@^3.1.0, ansi-escapes@^3.2.0: +ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== -ansi-escapes@^4.2.1, ansi-escapes@^4.3.0, ansi-escapes@^4.3.1: +ansi-escapes@^4.3.0, ansi-escapes@^4.3.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -3653,7 +3400,7 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" -anymatch@^3.0.3, anymatch@~3.1.1: +anymatch@~3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -3867,6 +3614,11 @@ assert@^1.1.1: object-assign "^4.1.1" util "0.10.3" +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -3966,20 +3718,6 @@ babel-core@7.0.0-bridge.0: resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece" integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg== -babel-jest@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-26.6.3.tgz#d87d25cb0037577a0c89f82e5755c5d293c01056" - integrity sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== - dependencies: - "@jest/transform" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/babel__core" "^7.1.7" - babel-plugin-istanbul "^6.0.0" - babel-preset-jest "^26.6.2" - chalk "^4.0.0" - graceful-fs "^4.2.4" - slash "^3.0.0" - babel-loader@^8.0.6, babel-loader@^8.2.2: version "8.2.2" resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.2.2.tgz#9363ce84c10c9a40e6c753748e1441b60c8a0b81" @@ -4033,27 +3771,6 @@ babel-plugin-extract-import-names@1.6.22: dependencies: "@babel/helper-plugin-utils" "7.10.4" -babel-plugin-istanbul@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz#e159ccdc9af95e0b570c75b4573b7c34d671d765" - integrity sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^4.0.0" - test-exclude "^6.0.0" - -babel-plugin-jest-hoist@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz#8185bd030348d254c6d7dd974355e6a28b21e62d" - integrity sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" - "@types/babel__traverse" "^7.0.6" - babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.6.1, babel-plugin-macros@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" @@ -4145,32 +3862,6 @@ babel-plugin-universal-import@^4.0.0: dependencies: "@babel/helper-module-imports" "^7.0.0" -babel-preset-current-node-syntax@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b" - integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ== - dependencies: - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-bigint" "^7.8.3" - "@babel/plugin-syntax-class-properties" "^7.8.3" - "@babel/plugin-syntax-import-meta" "^7.8.3" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.8.3" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-top-level-await" "^7.8.3" - -babel-preset-jest@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz#747872b1171df032252426586881d62d31798fee" - integrity sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ== - dependencies: - babel-plugin-jest-hoist "^26.6.2" - babel-preset-current-node-syntax "^1.0.0" - babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -4454,11 +4145,6 @@ brorand@^1.0.1, brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" @@ -4558,13 +4244,6 @@ browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.16.5, browserslist@^4 node-releases "^2.0.6" update-browserslist-db "^1.0.9" -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" @@ -4802,11 +4481,6 @@ camelcase@^5.0.0, camelcase@^5.2.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" - integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== - camelize@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" @@ -4827,13 +4501,6 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001125, can resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001431.tgz#e7c59bd1bc518fae03a4656be442ce6c4887a795" integrity sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ== -capture-exit@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" - integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== - dependencies: - rsvp "^4.8.4" - case-sensitive-paths-webpack-plugin@^2.2.0, case-sensitive-paths-webpack-plugin@^2.3.0: version "2.4.0" resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz#db64066c6422eed2e08cc14b986ca43796dbc6d4" @@ -4859,6 +4526,19 @@ ccount@^1.0.0: resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== +chai@^4.3.6: + version "4.3.7" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.7.tgz#ec63f6df01829088e8bf55fca839bcd464a8ec51" + integrity sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^4.1.2" + get-func-name "^2.0.0" + loupe "^2.3.1" + pathval "^1.1.1" + type-detect "^4.0.5" + chalk@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" @@ -4901,11 +4581,6 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -char-regex@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf" - integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== - character-entities-html4@^1.0.0: version "1.1.4" resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.4.tgz#0e64b0a3753ddbf1fdc044c5fd01d0199a02e125" @@ -4931,6 +4606,11 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA== + check-more-types@^2.24.0: version "2.24.0" resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" @@ -5036,11 +4716,6 @@ circular-dependency-plugin@^5.2.0: resolved "https://registry.yarnpkg.com/circular-dependency-plugin/-/circular-dependency-plugin-5.2.2.tgz#39e836079db1d3cf2f988dc48c5188a44058b600" integrity sha512-g38K9Cm5WRwlaH6g03B9OEz/0qRizI+2I7n+Gz+L5DxXJAPAiWQvwlYNm1V1jkdpUv95bOe/ASm2vfi/G560jQ== -cjs-module-lexer@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz#4186fcca0eae175970aee870b9fe2d6cf8d5655f" - integrity sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw== - cjs-module-lexer@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" @@ -5209,11 +4884,6 @@ clone@^1.0.2: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - coa@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/coa/-/coa-2.0.2.tgz#43f6c21151b4ef2bf57187db0d73de229e3e7ec3" @@ -5233,11 +4903,6 @@ collapse-white-space@^1.0.2: resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.6.tgz#e63629c0016665792060dbbeb79c42239d2c5287" integrity sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ== -collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== - collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" @@ -5481,7 +5146,7 @@ content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== -convert-source-map@1.7.0, convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: +convert-source-map@1.7.0, convert-source-map@^1.1.0, convert-source-map@^1.5.0, convert-source-map@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== @@ -5774,18 +5439,7 @@ css-select@^2.0.0, css-select@^2.0.2: domutils "^1.7.0" nth-check "^1.0.2" -css-select@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.1.2.tgz#8b52b6714ed3a80d8221ec971c543f3b12653286" - integrity sha512-nu5ye2Hg/4ISq4XqdLY2bEatAcLIdt3OYGFc9Tm9n7VSlFBcfRv0gBNksHRgSdUDQGtN3XrZ94ztW+NfzkFSUw== - dependencies: - boolbase "^1.0.0" - css-what "^5.0.0" - domhandler "^4.2.0" - domutils "^2.6.0" - nth-check "^2.0.0" - -css-select@^4.2.1: +css-select@^4.1.2, css-select@^4.2.1: version "4.3.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.3.0.tgz#db7129b2846662fd8628cfc496abb2b59e41529b" integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== @@ -5940,10 +5594,10 @@ csso@^4.0.2: dependencies: css-tree "^1.1.2" -cssom@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" - integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== +cssom@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.5.0.tgz#d254fa92cd8b6fbd83811b9fbaed34663cc17c36" + integrity sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw== cssom@~0.3.6: version "0.3.8" @@ -6057,14 +5711,14 @@ data-uri-to-buffer@3.0.1: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz#594b8973938c5bc2c33046535785341abc4f3636" integrity sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og== -data-urls@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" - integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== +data-urls@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-3.0.2.tgz#9cf24a477ae22bcef5cd5f6f0bfbc1d2d3be9143" + integrity sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ== dependencies: - abab "^2.0.3" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" + abab "^2.0.6" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" dataloader@^1.4.0: version "1.4.0" @@ -6083,6 +5737,13 @@ debug@2, debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: dependencies: ms "2.0.0" +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + debug@=3.1.0, debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" @@ -6097,20 +5758,6 @@ debug@^3.0.0, debug@^3.1.0, debug@^3.1.1, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.2: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - dependencies: - ms "2.1.2" - -debug@^4.3.4: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debug@~4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" @@ -6131,10 +5778,10 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decimal.js@^10.2.1: - version "10.2.1" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.2.1.tgz#238ae7b0f0c793d3e3cea410108b35a2c01426a3" - integrity sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw== +decimal.js@^10.4.2: + version "10.4.2" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.4.2.tgz#0341651d1d997d86065a2ce3a441fbd0d8e8b98e" + integrity sha512-ic1yEvwT6GuvaYwBLLY6/aFFgjZdySKTE8en/fkU3QICTmRtgtSlFn0u0BXN06InZwtfCelR7j8LRiDI/02iGA== decode-uri-component@^0.2.0: version "0.2.0" @@ -6213,6 +5860,13 @@ deep-assign@^3.0.0: dependencies: is-obj "^1.0.0" +deep-eql@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-4.1.2.tgz#270ceb902f87724077e6f6449aed81463f42fc1c" + integrity sha512-gT18+YW4CcW/DBNTwAmqTtkJh7f9qqScu2qFVlx7kCoeY9tlBu9cUcr7+I+Z/noG8INehS3xQgLpTtd/QUTn4w== + dependencies: + type-detect "^4.0.0" + deep-equal@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" @@ -6231,9 +5885,9 @@ deep-extend@^0.6.0: integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-is@^0.1.3, deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + version "0.1.4" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" + integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deep-object-diff@^1.1.0: version "1.1.0" @@ -6362,11 +6016,6 @@ detect-indent@^6.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.0.0.tgz#0abd0f549f69fc6659a254fe96786186b6f528fd" integrity sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA== -detect-newline@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" - integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== - detect-node@^2.0.4: version "2.0.5" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.5.tgz#9d270aa7eaa5af0b72c4c9d9b814e7f4ce738b79" @@ -6388,11 +6037,6 @@ detect-port@^1.3.0: address "^1.0.1" debug "^2.6.0" -diff-sequences@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" - integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== - diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -6517,12 +6161,12 @@ domelementtype@^2.0.1, domelementtype@^2.2.0: resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-2.2.0.tgz#9a0b6c2782ed6a1c7323d42267183df9bd8b1d57" integrity sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A== -domexception@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" - integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== +domexception@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-4.0.0.tgz#4ad1be56ccadc86fc76d033353999a8037d03673" + integrity sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw== dependencies: - webidl-conversions "^5.0.0" + webidl-conversions "^7.0.0" domhandler@^2.3.0: version "2.4.2" @@ -6531,14 +6175,7 @@ domhandler@^2.3.0: dependencies: domelementtype "1" -domhandler@^4.0.0, domhandler@^4.1.0, domhandler@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.2.0.tgz#f9768a5f034be60a89a27c2e4d0f74eba0d8b059" - integrity sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA== - dependencies: - domelementtype "^2.2.0" - -domhandler@^4.3.1: +domhandler@^4.0.0, domhandler@^4.1.0, domhandler@^4.2.0, domhandler@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.1.tgz#8d792033416f59d68bc03a5aa7b018c1ca89279c" integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== @@ -6553,16 +6190,7 @@ domutils@^1.5.1, domutils@^1.7.0: dom-serializer "0" domelementtype "1" -domutils@^2.5.2, domutils@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.6.0.tgz#2e15c04185d43fb16ae7057cb76433c6edb938b7" - integrity sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - -domutils@^2.8.0: +domutils@^2.5.2, domutils@^2.6.0, domutils@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== @@ -6715,11 +6343,6 @@ elliptic@^6.5.3: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -emittery@^0.7.1: - version "0.7.2" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.7.2.tgz#25595908e13af0f5674ab419396e2fb394cdfa82" - integrity sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ== - "emoji-regex@>=6.0.0 <=6.1.1": version "6.1.1" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e" @@ -6848,6 +6471,11 @@ entities@^2.0.0: resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== +entities@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" + integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== + enzyme-adapter-react-16@^1.15.2: version "1.15.6" resolved "https://registry.yarnpkg.com/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.6.tgz#fd677a658d62661ac5afd7f7f541f141f8085901" @@ -7136,7 +6764,7 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@2.0.0, escape-string-regexp@^2.0.0: +escape-string-regexp@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== @@ -7203,13 +6831,6 @@ eslint-plugin-import@^2.22.0: resolve "^1.17.0" tsconfig-paths "^3.9.0" -eslint-plugin-jest@^24.3.6: - version "24.3.6" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-24.3.6.tgz#5f0ca019183c3188c5ad3af8e80b41de6c8e9173" - integrity sha512-WOVH4TIaBLIeCX576rLcOgjNXqP+jNlCiEmRgFTfQtJ52DpwnIQKAVGlGPAN7CZ33bW6eNfHD6s8ZbEUTQubJg== - dependencies: - "@typescript-eslint/experimental-utils" "^4.0.1" - eslint-plugin-prettier@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz#cdbad3bf1dbd2b177e9825737fe63b476a08f0c7" @@ -7399,12 +7020,7 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" -exec-sh@^0.3.2: - version "0.3.6" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" - integrity sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w== - -execa@4.1.0, execa@^4.0.0, execa@^4.0.1, execa@^4.1.0: +execa@4.1.0, execa@^4.0.1, execa@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== @@ -7485,11 +7101,6 @@ exenv@^1.2.2: resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50= -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= - expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -7503,18 +7114,6 @@ expand-brackets@^2.1.4: snapdragon "^0.8.1" to-regex "^3.0.1" -expect@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/expect/-/expect-26.6.2.tgz#c6b996bf26bf3fe18b67b2d0f51fc981ba934417" - integrity sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA== - dependencies: - "@jest/types" "^26.6.2" - ansi-styles "^4.0.0" - jest-get-type "^26.3.0" - jest-matcher-utils "^26.6.2" - jest-message-util "^26.6.2" - jest-regex-util "^26.0.0" - express@^4.16.3, express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -7732,13 +7331,6 @@ faye-websocket@^0.11.3: dependencies: websocket-driver ">=0.5.1" -fb-watchman@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" - integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== - dependencies: - bser "2.1.1" - fd-slicer@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" @@ -8064,6 +7656,15 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" + integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -8215,7 +7816,7 @@ fsevents@^1.2.7: bindings "^1.5.0" nan "^2.12.1" -fsevents@^2.1.2, fsevents@~2.3.1, fsevents@~2.3.2: +fsevents@~2.3.1, fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -8289,6 +7890,11 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig== + get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" @@ -8310,11 +7916,6 @@ get-own-enumerable-property-symbols@^3.0.0: resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - get-proxy@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-2.1.0.tgz#349f2b4d91d44c4d4d4e9cba2ad90143fac5ef93" @@ -8440,7 +8041,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.1.6, glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@7.1.6, glob@^7.0.0, glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -8599,7 +8200,7 @@ got@^8.3.1: url-parse-lax "^3.0.0" url-to-options "^1.0.1" -graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.4: +graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== @@ -8614,11 +8215,6 @@ graphql@^16.0.0: resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.0.1.tgz#93a13cd4e0e38ca8d0832e79614c8578bfd34f10" integrity sha512-oPvCuu6dlLdiz8gZupJ47o1clgb72r1u8NDBcQYjcV6G/iEdmE11B1bBlkhXRvV0LisP/SXRFP7tT6AgaTjpzg== -growly@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= - gud@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" @@ -8927,23 +8523,18 @@ html-element-map@^1.2.0: array-filter "^1.0.0" call-bind "^1.0.2" -html-encoding-sniffer@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" - integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== +html-encoding-sniffer@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9" + integrity sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA== dependencies: - whatwg-encoding "^1.0.5" + whatwg-encoding "^2.0.0" html-entities@^1.2.0, html-entities@^1.2.1, html-entities@^1.3.1: version "1.4.0" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.4.0.tgz#cfbd1b01d2afaf9adca1b10ae7dffab98c71d2dc" integrity sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA== -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - html-minifier-terser@^5.0.1: version "5.1.1" resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz#922e96f1f3bb60832c2634b79884096389b1f054" @@ -9072,6 +8663,15 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + http-proxy-middleware@0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" @@ -9114,6 +8714,14 @@ https-browserify@1.0.0, https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= +https-proxy-agent@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== + dependencies: + agent-base "6" + debug "4" + human-id@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/human-id/-/human-id-1.0.2.tgz#e654d4b2b0d8b07e45da9f6020d8af17ec0a5df3" @@ -9152,7 +8760,7 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.6.2: +iconv-lite@0.6.3, iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== @@ -9248,14 +8856,6 @@ import-local@^2.0.0: pkg-dir "^3.0.0" resolve-cwd "^2.0.0" -import-local@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.0.2.tgz#a8cfd0431d1de4a2199703d003e3e62364fa6db6" - integrity sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA== - dependencies: - pkg-dir "^4.2.0" - resolve-cwd "^3.0.0" - imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -9652,11 +9252,6 @@ is-function@^1.0.2: resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - is-generator-function@^1.0.7: version "1.0.9" resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.9.tgz#e5f82c2323673e7fcad3d12858c83c4039f6399c" @@ -9773,7 +9368,7 @@ is-path-in-cwd@^2.0.0: dependencies: is-path-inside "^2.1.0" -is-path-inside@^2.0.0, is-path-inside@^2.1.0: +is-path-inside@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== @@ -9807,7 +9402,7 @@ is-plain-object@^5.0.0: resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344" integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q== -is-potential-custom-element-name@^1.0.0: +is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== @@ -9897,7 +9492,7 @@ is-typed-array@^1.1.3: foreach "^2.0.5" has-symbols "^1.0.1" -is-typedarray@^1.0.0, is-typedarray@~1.0.0: +is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= @@ -9981,47 +9576,6 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= -istanbul-lib-coverage@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" - integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== - -istanbul-lib-instrument@^4.0.0, istanbul-lib-instrument@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" - integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== - dependencies: - "@babel/core" "^7.7.5" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.0.0" - semver "^6.3.0" - -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" - integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b" - integrity sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - isurl@^1.0.0-alpha5: version "1.0.0" resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" @@ -10043,379 +9597,6 @@ iterate-value@^1.0.2: es-get-iterator "^1.0.2" iterate-iterator "^1.0.1" -jest-changed-files@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-26.6.2.tgz#f6198479e1cc66f22f9ae1e22acaa0b429c042d0" - integrity sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ== - dependencies: - "@jest/types" "^26.6.2" - execa "^4.0.0" - throat "^5.0.0" - -jest-cli@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-26.6.3.tgz#43117cfef24bc4cd691a174a8796a532e135e92a" - integrity sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg== - dependencies: - "@jest/core" "^26.6.3" - "@jest/test-result" "^26.6.2" - "@jest/types" "^26.6.2" - chalk "^4.0.0" - exit "^0.1.2" - graceful-fs "^4.2.4" - import-local "^3.0.2" - is-ci "^2.0.0" - jest-config "^26.6.3" - jest-util "^26.6.2" - jest-validate "^26.6.2" - prompts "^2.0.1" - yargs "^15.4.1" - -jest-config@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-26.6.3.tgz#64f41444eef9eb03dc51d5c53b75c8c71f645349" - integrity sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg== - dependencies: - "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^26.6.3" - "@jest/types" "^26.6.2" - babel-jest "^26.6.3" - chalk "^4.0.0" - deepmerge "^4.2.2" - glob "^7.1.1" - graceful-fs "^4.2.4" - jest-environment-jsdom "^26.6.2" - jest-environment-node "^26.6.2" - jest-get-type "^26.3.0" - jest-jasmine2 "^26.6.3" - jest-regex-util "^26.0.0" - jest-resolve "^26.6.2" - jest-util "^26.6.2" - jest-validate "^26.6.2" - micromatch "^4.0.2" - pretty-format "^26.6.2" - -jest-diff@^26.0.0, jest-diff@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-26.6.2.tgz#1aa7468b52c3a68d7d5c5fdcdfcd5e49bd164394" - integrity sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA== - dependencies: - chalk "^4.0.0" - diff-sequences "^26.6.2" - jest-get-type "^26.3.0" - pretty-format "^26.6.2" - -jest-docblock@^26.0.0: - version "26.0.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5" - integrity sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w== - dependencies: - detect-newline "^3.0.0" - -jest-each@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-26.6.2.tgz#02526438a77a67401c8a6382dfe5999952c167cb" - integrity sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A== - dependencies: - "@jest/types" "^26.6.2" - chalk "^4.0.0" - jest-get-type "^26.3.0" - jest-util "^26.6.2" - pretty-format "^26.6.2" - -jest-environment-jsdom@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz#78d09fe9cf019a357009b9b7e1f101d23bd1da3e" - integrity sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q== - dependencies: - "@jest/environment" "^26.6.2" - "@jest/fake-timers" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/node" "*" - jest-mock "^26.6.2" - jest-util "^26.6.2" - jsdom "^16.4.0" - -jest-environment-node@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-26.6.2.tgz#824e4c7fb4944646356f11ac75b229b0035f2b0c" - integrity sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag== - dependencies: - "@jest/environment" "^26.6.2" - "@jest/fake-timers" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/node" "*" - jest-mock "^26.6.2" - jest-util "^26.6.2" - -jest-get-type@^26.3.0: - version "26.3.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" - integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== - -jest-haste-map@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" - integrity sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w== - dependencies: - "@jest/types" "^26.6.2" - "@types/graceful-fs" "^4.1.2" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.4" - jest-regex-util "^26.0.0" - jest-serializer "^26.6.2" - jest-util "^26.6.2" - jest-worker "^26.6.2" - micromatch "^4.0.2" - sane "^4.0.3" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.1.2" - -jest-jasmine2@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz#adc3cf915deacb5212c93b9f3547cd12958f2edd" - integrity sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^26.6.2" - "@jest/source-map" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^26.6.2" - is-generator-fn "^2.0.0" - jest-each "^26.6.2" - jest-matcher-utils "^26.6.2" - jest-message-util "^26.6.2" - jest-runtime "^26.6.3" - jest-snapshot "^26.6.2" - jest-util "^26.6.2" - pretty-format "^26.6.2" - throat "^5.0.0" - -jest-leak-detector@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz#7717cf118b92238f2eba65054c8a0c9c653a91af" - integrity sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg== - dependencies: - jest-get-type "^26.3.0" - pretty-format "^26.6.2" - -jest-matcher-utils@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz#8e6fd6e863c8b2d31ac6472eeb237bc595e53e7a" - integrity sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw== - dependencies: - chalk "^4.0.0" - jest-diff "^26.6.2" - jest-get-type "^26.3.0" - pretty-format "^26.6.2" - -jest-message-util@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-26.6.2.tgz#58173744ad6fc0506b5d21150b9be56ef001ca07" - integrity sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA== - dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/types" "^26.6.2" - "@types/stack-utils" "^2.0.0" - chalk "^4.0.0" - graceful-fs "^4.2.4" - micromatch "^4.0.2" - pretty-format "^26.6.2" - slash "^3.0.0" - stack-utils "^2.0.2" - -jest-mock@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-26.6.2.tgz#d6cb712b041ed47fe0d9b6fc3474bc6543feb302" - integrity sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew== - dependencies: - "@jest/types" "^26.6.2" - "@types/node" "*" - -jest-pnp-resolver@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" - integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== - -jest-regex-util@^26.0.0: - version "26.0.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" - integrity sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A== - -jest-resolve-dependencies@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz#6680859ee5d22ee5dcd961fe4871f59f4c784fb6" - integrity sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg== - dependencies: - "@jest/types" "^26.6.2" - jest-regex-util "^26.0.0" - jest-snapshot "^26.6.2" - -jest-resolve@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-26.6.2.tgz#a3ab1517217f469b504f1b56603c5bb541fbb507" - integrity sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ== - dependencies: - "@jest/types" "^26.6.2" - chalk "^4.0.0" - graceful-fs "^4.2.4" - jest-pnp-resolver "^1.2.2" - jest-util "^26.6.2" - read-pkg-up "^7.0.1" - resolve "^1.18.1" - slash "^3.0.0" - -jest-runner@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-26.6.3.tgz#2d1fed3d46e10f233fd1dbd3bfaa3fe8924be159" - integrity sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ== - dependencies: - "@jest/console" "^26.6.2" - "@jest/environment" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/node" "*" - chalk "^4.0.0" - emittery "^0.7.1" - exit "^0.1.2" - graceful-fs "^4.2.4" - jest-config "^26.6.3" - jest-docblock "^26.0.0" - jest-haste-map "^26.6.2" - jest-leak-detector "^26.6.2" - jest-message-util "^26.6.2" - jest-resolve "^26.6.2" - jest-runtime "^26.6.3" - jest-util "^26.6.2" - jest-worker "^26.6.2" - source-map-support "^0.5.6" - throat "^5.0.0" - -jest-runtime@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-26.6.3.tgz#4f64efbcfac398331b74b4b3c82d27d401b8fa2b" - integrity sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw== - dependencies: - "@jest/console" "^26.6.2" - "@jest/environment" "^26.6.2" - "@jest/fake-timers" "^26.6.2" - "@jest/globals" "^26.6.2" - "@jest/source-map" "^26.6.2" - "@jest/test-result" "^26.6.2" - "@jest/transform" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/yargs" "^15.0.0" - chalk "^4.0.0" - cjs-module-lexer "^0.6.0" - collect-v8-coverage "^1.0.0" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.2.4" - jest-config "^26.6.3" - jest-haste-map "^26.6.2" - jest-message-util "^26.6.2" - jest-mock "^26.6.2" - jest-regex-util "^26.0.0" - jest-resolve "^26.6.2" - jest-snapshot "^26.6.2" - jest-util "^26.6.2" - jest-validate "^26.6.2" - slash "^3.0.0" - strip-bom "^4.0.0" - yargs "^15.4.1" - -jest-serializer@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-26.6.2.tgz#d139aafd46957d3a448f3a6cdabe2919ba0742d1" - integrity sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.4" - -jest-snapshot@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-26.6.2.tgz#f3b0af1acb223316850bd14e1beea9837fb39c84" - integrity sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og== - dependencies: - "@babel/types" "^7.0.0" - "@jest/types" "^26.6.2" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.0.0" - chalk "^4.0.0" - expect "^26.6.2" - graceful-fs "^4.2.4" - jest-diff "^26.6.2" - jest-get-type "^26.3.0" - jest-haste-map "^26.6.2" - jest-matcher-utils "^26.6.2" - jest-message-util "^26.6.2" - jest-resolve "^26.6.2" - natural-compare "^1.4.0" - pretty-format "^26.6.2" - semver "^7.3.2" - -jest-util@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-26.6.2.tgz#907535dbe4d5a6cb4c47ac9b926f6af29576cbc1" - integrity sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q== - dependencies: - "@jest/types" "^26.6.2" - "@types/node" "*" - chalk "^4.0.0" - graceful-fs "^4.2.4" - is-ci "^2.0.0" - micromatch "^4.0.2" - -jest-validate@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-26.6.2.tgz#23d380971587150467342911c3d7b4ac57ab20ec" - integrity sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ== - dependencies: - "@jest/types" "^26.6.2" - camelcase "^6.0.0" - chalk "^4.0.0" - jest-get-type "^26.3.0" - leven "^3.1.0" - pretty-format "^26.6.2" - -jest-watch-directories@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jest-watch-directories/-/jest-watch-directories-1.1.0.tgz#c9cd3fb40ba3d985c5c029ca91d95b081e92efbb" - integrity sha512-hSXyGELXGUnkV2RsbPSV2m6jUzKY+WEOMG35sq9ZLm4yIJzeXNnOiNYtvIusi1/4rizS6PgTRAF6hiCmBClt4g== - dependencies: - ansi-escapes "^3.1.0" - glob "^7.1.3" - is-path-inside "^2.0.0" - messageformat "^2.0.4" - prompts "^1.1.1" - -jest-watch-yarn-workspaces@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/jest-watch-yarn-workspaces/-/jest-watch-yarn-workspaces-1.1.0.tgz#6b77666da152f7a5d89321a8333de7011b2ebbff" - integrity sha512-kfufQPfJoBN5n1qP9LjsVA//D6LIGxDd0/ZZbRorN6cinCKs5u+7ACIkk7XGFIaW+PH2HjBlvelIw6G0rPwFIA== - dependencies: - jest-watch-directories "1.1.0" - -jest-watcher@^26.6.2: - version "26.6.2" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-26.6.2.tgz#a5b683b8f9d68dbcb1d7dae32172d2cca0592975" - integrity sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ== - dependencies: - "@jest/test-result" "^26.6.2" - "@jest/types" "^26.6.2" - "@types/node" "*" - ansi-escapes "^4.2.1" - chalk "^4.0.0" - jest-util "^26.6.2" - string-length "^4.0.1" - jest-worker@27.0.0-next.5: version "27.0.0-next.5" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.0.0-next.5.tgz#5985ee29b12a4e191f4aae4bb73b97971d86ec28" @@ -10425,7 +9606,7 @@ jest-worker@27.0.0-next.5: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^26.2.1, jest-worker@^26.6.2: +jest-worker@^26.2.1: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ== @@ -10434,15 +9615,6 @@ jest-worker@^26.2.1, jest-worker@^26.6.2: merge-stream "^2.0.0" supports-color "^7.0.0" -jest@^26.6.3: - version "26.6.3" - resolved "https://registry.yarnpkg.com/jest/-/jest-26.6.3.tgz#40e8fdbe48f00dfa1f0ce8121ca74b88ac9148ef" - integrity sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q== - dependencies: - "@jest/core" "^26.6.3" - import-local "^3.0.2" - jest-cli "^26.6.3" - "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -10461,37 +9633,37 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdom@^16.4.0: - version "16.5.3" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.5.3.tgz#13a755b3950eb938b4482c407238ddf16f0d2136" - integrity sha512-Qj1H+PEvUsOtdPJ056ewXM4UJPCi4hhLA8wpiz9F2YvsRBhuFsXxtrIFAgGBDynQA9isAMGE91PfUYbdMPXuTA== +jsdom@^20.0.3: + version "20.0.3" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-20.0.3.tgz#886a41ba1d4726f67a8858028c99489fed6ad4db" + integrity sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ== dependencies: - abab "^2.0.5" - acorn "^8.1.0" - acorn-globals "^6.0.0" - cssom "^0.4.4" + abab "^2.0.6" + acorn "^8.8.1" + acorn-globals "^7.0.0" + cssom "^0.5.0" cssstyle "^2.3.0" - data-urls "^2.0.0" - decimal.js "^10.2.1" - domexception "^2.0.1" + data-urls "^3.0.2" + decimal.js "^10.4.2" + domexception "^4.0.0" escodegen "^2.0.0" - html-encoding-sniffer "^2.0.1" - is-potential-custom-element-name "^1.0.0" - nwsapi "^2.2.0" - parse5 "6.0.1" - request "^2.88.2" - request-promise-native "^1.0.9" - saxes "^5.0.1" + form-data "^4.0.0" + html-encoding-sniffer "^3.0.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.1" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.2" + parse5 "^7.1.1" + saxes "^6.0.0" symbol-tree "^3.2.4" - tough-cookie "^4.0.0" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.1.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.5.0" - ws "^7.4.4" - xml-name-validator "^3.0.0" + tough-cookie "^4.1.2" + w3c-xmlserializer "^4.0.0" + webidl-conversions "^7.0.0" + whatwg-encoding "^2.0.0" + whatwg-mimetype "^3.0.0" + whatwg-url "^11.0.0" + ws "^8.11.0" + xml-name-validator "^4.0.0" jsesc@^2.5.1, jsesc@^2.5.2: version "2.5.2" @@ -10669,7 +9841,7 @@ klaw@^1.0.0: optionalDependencies: graceful-fs "^4.1.9" -kleur@^3.0.0, kleur@^3.0.3: +kleur@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== @@ -10703,11 +9875,6 @@ lazy-universal-dotenv@^3.0.1: dotenv "^8.0.0" dotenv-expand "^5.1.0" -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -10719,7 +9886,7 @@ levn@^0.4.1: levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + integrity sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA== dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" @@ -10836,6 +10003,11 @@ loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4 emojis-list "^3.0.0" json5 "^1.0.1" +local-pkg@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.2.tgz#13107310b77e74a0e513147a131a2ba288176c2f" + integrity sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg== + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -10938,7 +10110,7 @@ lodash.uniq@4.5.0, lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.17.5, lodash@^4.7.0: +lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.3, lodash@^4.17.5: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -10978,6 +10150,13 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3 dependencies: js-tokens "^3.0.0 || ^4.0.0" +loupe@^2.3.1: + version "2.3.6" + resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.6.tgz#76e4af498103c532d1ecc9be102036a21f787b53" + integrity sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA== + dependencies: + get-func-name "^2.0.0" + lower-case@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" @@ -11069,20 +10248,6 @@ make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: dependencies: semver "^6.0.0" -make-plural@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/make-plural/-/make-plural-4.3.0.tgz#f23de08efdb0cac2e0c9ba9f315b0dff6b4c2735" - integrity sha512-xTYd4JVHpSCW+aqDof6w/MebaMVNTVYBZhbB/vi513xXdiPT92JMVCo0Jq8W2UZnzYRFeVbQiQ+I25l13JuKvA== - optionalDependencies: - minimist "^1.2.0" - -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" - integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= - dependencies: - tmpl "1.0.x" - map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -11290,25 +10455,6 @@ merge2@^1.2.3, merge2@^1.3.0: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -messageformat-formatters@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/messageformat-formatters/-/messageformat-formatters-2.0.1.tgz#0492c1402a48775f751c9b17c0354e92be012b08" - integrity sha512-E/lQRXhtHwGuiQjI7qxkLp8AHbMD5r2217XNe/SREbBlSawe0lOqsFb7rflZJmlQFSULNLIqlcjjsCPlB3m3Mg== - -messageformat-parser@^4.1.2: - version "4.1.3" - resolved "https://registry.yarnpkg.com/messageformat-parser/-/messageformat-parser-4.1.3.tgz#b824787f57fcda7d50769f5b63e8d4fda68f5b9e" - integrity sha512-2fU3XDCanRqeOCkn7R5zW5VQHWf+T3hH65SzuqRvjatBK7r4uyFa5mEX+k6F9Bd04LVM5G4/BHBTUJsOdW7uyg== - -messageformat@^2.0.4: - version "2.3.0" - resolved "https://registry.yarnpkg.com/messageformat/-/messageformat-2.3.0.tgz#de263c49029d5eae65d7ee25e0754f57f425ad91" - integrity sha512-uTzvsv0lTeQxYI2y1NPa1lItL5VRI8Gb93Y2K2ue5gBPyrbJxfDi/EYWxh2PKv5yO42AJeeqblS9MJSh/IEk4w== - dependencies: - make-plural "^4.3.0" - messageformat-formatters "^2.0.1" - messageformat-parser "^4.1.2" - methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -11461,12 +10607,7 @@ minimist@1.2.3: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.3.tgz#3db5c0765545ab8637be71f333a104a965a9ca3f" integrity sha512-+bMdgqjMN/Z77a6NlY/I3U5LlRDbnmaAk6lDveAPKwSpcPM4tKAuYsvYF8xjhOPXhOYGe/73vVLVez5PW+jqhw== -minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -minimist@^1.2.6: +minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.7" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== @@ -11816,11 +10957,6 @@ node-html-parser@5.3.3: css-select "^4.2.1" he "1.2.0" -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= - node-libs-browser@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" @@ -11855,18 +10991,6 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-notifier@^8.0.0: - version "8.0.2" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-8.0.2.tgz#f3167a38ef0d2c8a866a83e318c1ba0efeb702c5" - integrity sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg== - dependencies: - growly "^1.3.0" - is-wsl "^2.2.0" - semver "^7.3.2" - shellwords "^0.1.1" - uuid "^8.3.0" - which "^2.0.2" - node-releases@^1.1.61, node-releases@^1.1.71: version "1.1.71" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.71.tgz#cb1334b179896b1c89ecfdd4b725fb7bbdfc7dbb" @@ -12009,14 +11133,7 @@ nth-check@^1.0.2: dependencies: boolbase "~1.0.0" -nth-check@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.0.tgz#1bb4f6dac70072fc313e8c9cd1417b5074c0a125" - integrity sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q== - dependencies: - boolbase "^1.0.0" - -nth-check@^2.0.1: +nth-check@^2.0.0, nth-check@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== @@ -12033,10 +11150,10 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -nwsapi@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" - integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== +nwsapi@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.2.tgz#e5418863e7905df67d51ec95938d67bf801f0bb0" + integrity sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw== oauth-sign@~0.9.0: version "0.9.0" @@ -12299,11 +11416,6 @@ p-cancelable@^0.4.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" integrity sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ== -p-each-series@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-2.2.0.tgz#105ab0357ce72b202a8a8b94933672657b5e2a9a" - integrity sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA== - p-event@^2.1.0: version "2.3.1" resolved "https://registry.yarnpkg.com/p-event/-/p-event-2.3.1.tgz#596279ef169ab2c3e0cae88c1cfbb08079993ef6" @@ -12556,11 +11668,18 @@ parse5-htmlparser2-tree-adapter@^6.0.1: dependencies: parse5 "^6.0.1" -parse5@6.0.1, parse5@^6.0.0, parse5@^6.0.1: +parse5@^6.0.0, parse5@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== +parse5@^7.1.1: + version "7.1.2" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32" + integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== + dependencies: + entities "^4.4.0" + parseqs@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/parseqs/-/parseqs-0.0.6.tgz#8e4bb5a19d1cdc844a08ac974d34e273afa670d5" @@ -12688,6 +11807,11 @@ path@^0.12.7: process "^0.11.1" util "^0.10.3" +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + pbkdf2@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" @@ -13251,7 +12375,7 @@ prelude-ls@^1.2.1: prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== prepend-http@^1.0.0: version "1.0.4" @@ -13293,7 +12417,7 @@ pretty-error@^2.0.2, pretty-error@^2.1.1: lodash "^4.17.20" renderkid "^2.0.4" -pretty-format@^26.0.0, pretty-format@^26.6.2: +pretty-format@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" integrity sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg== @@ -13374,15 +12498,7 @@ prompts@2.4.0: kleur "^3.0.3" sisteransi "^1.0.5" -prompts@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-1.2.1.tgz#7fd4116a458d6a62761e3ccb1432d7bbd8b2cb29" - integrity sha512-GE33SMMVO1ISfnq3i6cE+WYK/tLxRWtZiRkl5vdg0KR0owOCPFOsq8BuFajFbW7b2bMHb8krXaQHOpZyUEuvmA== - dependencies: - kleur "^3.0.0" - sisteransi "^1.0.0" - -prompts@^2.0.1, prompts@^2.4.0: +prompts@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61" integrity sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ== @@ -13444,9 +12560,9 @@ pseudomap@^1.0.2: integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= psl@^1.1.28, psl@^1.1.33: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== public-encrypt@^4.0.0: version "4.0.3" @@ -14486,23 +13602,7 @@ request-progress@^3.0.0: dependencies: throttleit "^1.0.0" -request-promise-core@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.4.tgz#3eedd4223208d419867b78ce815167d10593a22f" - integrity sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== - dependencies: - lodash "^4.17.19" - -request-promise-native@^1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.9.tgz#e407120526a5efdc9a39b28a5679bf47b9d9dc28" - integrity sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== - dependencies: - request-promise-core "1.1.4" - stealthy-require "^1.1.1" - tough-cookie "^2.3.3" - -request@^2.88.0, request@^2.88.2: +request@^2.88.0: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== @@ -14555,13 +13655,6 @@ resolve-cwd@^2.0.0: dependencies: resolve-from "^3.0.0" -resolve-cwd@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-3.0.0.tgz#0f0075f1bb2544766cf73ba6a6e2adfebcb13f2d" - integrity sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg== - dependencies: - resolve-from "^5.0.0" - resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -14587,7 +13680,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.1, resolve@^1.3.2: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -14729,11 +13822,6 @@ rst-selector-parser@^2.2.3: lodash.flattendeep "^4.4.0" nearley "^2.7.10" -rsvp@^4.8.4: - version "4.8.5" - resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" - integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== - run-async@^2.2.0, run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" @@ -14794,30 +13882,15 @@ safe-regex@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sane@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" - integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== - dependencies: - "@cnakazawa/watch" "^1.0.3" - anymatch "^2.0.0" - capture-exit "^2.0.0" - exec-sh "^0.3.2" - execa "^1.0.0" - fb-watchman "^2.0.0" - micromatch "^3.1.4" - minimist "^1.1.1" - walker "~1.0.5" - sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -saxes@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" - integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== +saxes@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5" + integrity sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA== dependencies: xmlchars "^2.2.0" @@ -15102,11 +14175,6 @@ shelljs@~0.5.3: resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.5.3.tgz#c54982b996c76ef0c1e6b59fbdc5825f5b713113" integrity sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM= -shellwords@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" - integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== - shorthash@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/shorthash/-/shorthash-0.0.2.tgz#59b268eecbde59038b30da202bcfbddeb2c4a4eb" @@ -15133,7 +14201,7 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sisteransi@^1.0.0, sisteransi@^1.0.5: +sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== @@ -15322,7 +14390,7 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" -source-map-support@^0.5.16, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.20: +source-map-support@^0.5.16, source-map-support@~0.5.12, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -15482,13 +14550,6 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== -stack-utils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277" - integrity sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== - dependencies: - escape-string-regexp "^2.0.0" - stackframe@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.2.0.tgz#52429492d63c62eb989804c11552e3d22e779303" @@ -15519,11 +14580,6 @@ static-extend@^0.1.1: resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= -stealthy-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= - store2@^2.12.0: version "2.12.0" resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" @@ -15608,14 +14664,6 @@ string-hash@1.1.3: resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" integrity sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs= -string-length@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" - integrity sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ== - dependencies: - char-regex "^1.0.2" - strip-ansi "^6.0.0" - string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -15781,11 +14829,6 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= -strip-bom@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" - integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== - strip-dirs@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" @@ -15820,6 +14863,13 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +strip-literal@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-0.4.2.tgz#4f9fa6c38bb157b924e9ace7155ebf8a2342cbcf" + integrity sha512-pv48ybn4iE1O9RLgCAN0iU4Xv7RlBTiit6DKmMiErbs9x1wH6vXBs45tWc0H5wUIF6TLTrKweqkmYF/iraQKNw== + dependencies: + acorn "^8.8.0" + strip-outer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.1.tgz#b2fd2abf6604b9d1e6013057195df836b8a9d631" @@ -15899,7 +14949,7 @@ stylis@3.5.4: resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe" integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q== -sucrase@^3.18.0, sucrase@^3.27.0: +sucrase@^3.27.0: version "3.29.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.29.0.tgz#3207c5bc1b980fdae1e539df3f8a8a518236da7d" integrity sha512-bZPAuGA5SdFHuzqIhTAqt9fvNEo9rESqXIG3oiKdF8K4UmkQxC4KlNL3lVyAErXp+mPvUqZ5l13qx6TrDIGf3A== @@ -15939,14 +14989,6 @@ supports-color@^8.0.0, supports-color@^8.1.1: dependencies: has-flag "^4.0.0" -supports-hyperlinks@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" - integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" - supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" @@ -16132,14 +15174,6 @@ term-size@^2.1.0: resolved "https://registry.yarnpkg.com/term-size/-/term-size-2.2.1.tgz#2a6a54840432c2fb6320fea0f415531e90189f54" integrity sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg== -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - terser-webpack-plugin@^1.4.1, terser-webpack-plugin@^1.4.3: version "1.4.5" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" @@ -16189,15 +15223,6 @@ terser@^5.14.1, terser@^5.15.1: commander "^2.20.0" source-map-support "~0.5.20" -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - text-table@0.2.0, text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -16217,11 +15242,6 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -throat@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-5.0.0.tgz#c5199235803aad18754a667d659b5e72ce16764b" - integrity sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== - throttle-debounce@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-3.0.1.tgz#32f94d84dfa894f786c9a1f290e7a645b6a19abb" @@ -16282,6 +15302,21 @@ tiny-warning@^1.0.0, tiny-warning@^1.0.3: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== +tinybench@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tinybench/-/tinybench-2.3.1.tgz#14f64e6b77d7ef0b1f6ab850c7a808c6760b414d" + integrity sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA== + +tinypool@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.3.0.tgz#c405d8b743509fc28ea4ca358433190be654f819" + integrity sha512-NX5KeqHOBZU6Bc0xj9Vr5Szbb1j8tUHIeD18s41aDJaPeC5QTdEhK0SpdpUrZlj2nv5cctNcSjaKNanXlfcVEQ== + +tinyspy@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/tinyspy/-/tinyspy-1.0.2.tgz#6da0b3918bfd56170fb3cd3a2b5ef832ee1dff0d" + integrity sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q== + tmp-promise@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-3.0.3.tgz#60a1a1cc98c988674fcbfd23b6e3367bdeac4ce7" @@ -16303,11 +15338,6 @@ tmp@^0.2.0, tmp@^0.2.1, tmp@~0.2.1: dependencies: rimraf "^3.0.0" -tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= - to-array@0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890" @@ -16383,7 +15413,17 @@ toposort@^1.0.0: resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" integrity sha1-LmhELZ9k7HILjMieZEOsbKqVACk= -tough-cookie@^2.3.3, tough-cookie@~2.5.0: +tough-cookie@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.2.tgz#e53e84b85f24e0b65dd526f46628db6c85f6b874" + integrity sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + +tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== @@ -16391,15 +15431,6 @@ tough-cookie@^2.3.3, tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" -tough-cookie@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" - integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.1.2" - tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" @@ -16407,10 +15438,10 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" -tr46@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.0.2.tgz#03273586def1595ae08fedb38d7733cee91d2479" - integrity sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg== +tr46@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-3.0.0.tgz#555c4e297a950617e8eeddef633c87d4d9d6cbf9" + integrity sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA== dependencies: punycode "^2.1.1" @@ -16542,11 +15573,11 @@ type-check@^0.4.0, type-check@~0.4.0: type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + integrity sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg== dependencies: prelude-ls "~1.1.2" -type-detect@4.0.8: +type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== @@ -16594,13 +15625,6 @@ type-is@~1.6.17, type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -16844,11 +15868,16 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== -universalify@^0.1.0, universalify@^0.1.2: +universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -16945,10 +15974,10 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" -url-parse@^1.4.3, url-parse@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.1.tgz#d5fa9890af8a5e1f274a2c98376510f6425f6e3b" - integrity sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q== +url-parse@^1.4.3, url-parse@^1.5.1, url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" @@ -17080,7 +16109,7 @@ uuid@^3.3.2, uuid@^3.4.0: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== -uuid@^8.3.0, uuid@^8.3.2: +uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -17090,15 +16119,6 @@ v8-compile-cache@^2.0.3: resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -v8-to-istanbul@^7.0.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.1.tgz#04bfd1026ba4577de5472df4f5e89af49de5edda" - integrity sha512-p0BB09E5FRjx0ELN6RgusIPsSPhtgexSRcKETybEs6IGOTXJSZqfwxp7r//55nnu0f1AxltY5VvdVqy2vZf9AA== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" - validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -17171,6 +16191,26 @@ vite@^3.0.0: optionalDependencies: fsevents "~2.3.2" +vitest@^0.25.3: + version "0.25.3" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-0.25.3.tgz#4e5ed481e4da6a0ce014bdb71dfc9661fd62b722" + integrity sha512-/UzHfXIKsELZhL7OaM2xFlRF8HRZgAHtPctacvNK8H4vOcbJJAMEgbWNGSAK7Y9b1NBe5SeM7VTuz2RsTHFJJA== + dependencies: + "@types/chai" "^4.3.3" + "@types/chai-subset" "^1.3.3" + "@types/node" "*" + acorn "^8.8.0" + acorn-walk "^8.2.0" + chai "^4.3.6" + debug "^4.3.4" + local-pkg "^0.4.2" + source-map "^0.6.1" + strip-literal "^0.4.2" + tinybench "^2.3.1" + tinypool "^0.3.0" + tinyspy "^1.0.2" + vite "^3.0.0" + vm-browserify@1.1.2, vm-browserify@^1.0.1: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -17185,26 +16225,12 @@ vue@^3.0.11: "@vue/runtime-dom" "3.0.11" "@vue/shared" "3.0.11" -w3c-hr-time@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" - integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== - dependencies: - browser-process-hrtime "^1.0.0" - -w3c-xmlserializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" - integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== - dependencies: - xml-name-validator "^3.0.0" - -walker@^1.0.7, walker@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= +w3c-xmlserializer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz#aebdc84920d806222936e3cdce408e32488a3073" + integrity sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw== dependencies: - makeerror "1.0.x" + xml-name-validator "^4.0.0" warning@^4.0.2, warning@^4.0.3: version "4.0.3" @@ -17263,15 +16289,10 @@ webidl-conversions@^4.0.2: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== -webidl-conversions@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" - integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== - -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" - integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== +webidl-conversions@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" + integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== webpack-bundle-analyzer@^3.4.1: version "3.9.0" @@ -17433,17 +16454,25 @@ websocket-extensions@>=0.1.1: resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== -whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== +whatwg-encoding@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz#e7635f597fd87020858626805a2729fa7698ac53" + integrity sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg== dependencies: - iconv-lite "0.4.24" + iconv-lite "0.6.3" -whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== +whatwg-mimetype@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz#5fa1a7623867ff1af6ca3dc72ad6b8a4208beba7" + integrity sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q== + +whatwg-url@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-11.0.0.tgz#0a849eebb5faf2119b901bb76fd795c2848d4018" + integrity sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ== + dependencies: + tr46 "^3.0.0" + webidl-conversions "^7.0.0" whatwg-url@^7.0.0: version "7.1.0" @@ -17454,15 +16483,6 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" -whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.5.0.tgz#7752b8464fc0903fec89aa9846fc9efe07351fd3" - integrity sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg== - dependencies: - lodash "^4.7.0" - tr46 "^2.0.2" - webidl-conversions "^6.1.0" - which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -17512,7 +16532,7 @@ which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" -which@^2.0.1, which@^2.0.2: +which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -17612,16 +16632,6 @@ write-file-atomic@^2.4.2: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-file-atomic@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" - write-json-file@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" @@ -17650,15 +16660,20 @@ ws@^6.0.0, ws@^6.2.1: dependencies: async-limiter "~1.0.0" -ws@^7.4.4, ws@~7.4.2: +ws@^8.11.0: + version "8.11.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143" + integrity sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg== + +ws@~7.4.2: version "7.4.5" resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.5.tgz#a484dd851e9beb6fdb420027e3885e8ce48986c1" integrity sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g== -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== +xml-name-validator@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz#79a006e2e63149a8600f15430f0a4725d1524835" + integrity sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw== xmlchars@^2.2.0: version "2.2.0" @@ -17742,7 +16757,7 @@ yargs@^13.3.2: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^15.1.0, yargs@^15.4.1: +yargs@^15.1.0: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==