From b31f63628dab6f4c0d6876528e677776b028c990 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 27 Aug 2023 19:50:33 +0000 Subject: [PATCH 1/6] chore(devdeps): update dependency @testing-library/jest-dom to v6 --- package.json | 2 +- pnpm-lock.yaml | 33 +++++++++++++++++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index ba24471b5..7c9fd21dd 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@rollup/plugin-node-resolve": "15.2.1", "@scaleway/eslint-config-react": "workspace:*", "@scaleway/tsconfig": "workspace:*", - "@testing-library/jest-dom": "5.17.0", + "@testing-library/jest-dom": "6.0.0", "@testing-library/react": "13.4.0", "@tsd/typescript": "5.1.6", "@types/jest": "29.5.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 22e1056cf..a56bd22ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: workspace:* version: link:packages/tsconfig '@testing-library/jest-dom': - specifier: 5.17.0 - version: 5.17.0 + specifier: 6.0.0 + version: 6.0.0(@types/jest@29.5.4)(jest@29.6.3) '@testing-library/react': specifier: 13.4.0 version: 13.4.0(react-dom@18.2.0)(react@18.2.0) @@ -3947,17 +3947,32 @@ packages: lz-string: 1.5.0 pretty-format: 27.5.1 - /@testing-library/jest-dom@5.17.0: - resolution: {integrity: sha512-ynmNeT7asXyH3aSVv4vvX4Rb+0qjOhdNHnO/3vuZNqPmhDpV/+rCSGwQ7bLcmU2cJ4dvoheIO85LQj0IbJHEtg==} - engines: {node: '>=8', npm: '>=6', yarn: '>=1'} + /@testing-library/jest-dom@6.0.0(@types/jest@29.5.4)(jest@29.6.3): + resolution: {integrity: sha512-Ye2R3+/oM27jir8CzYPmuWdavTaKwNZcu0d22L9pO/vnOYE0wmrtpw79TQJa8H6gV8/i7yd+pLaqeLlA0rTMfg==} + engines: {node: '>=14', npm: '>=6', yarn: '>=1'} + peerDependencies: + '@jest/globals': '>= 28' + '@types/jest': '>= 28' + jest: '>= 28' + vitest: '>= 0.32' + peerDependenciesMeta: + '@jest/globals': + optional: true + '@types/jest': + optional: true + jest: + optional: true + vitest: + optional: true dependencies: '@adobe/css-tools': 4.0.1 '@babel/runtime': 7.22.5 - '@types/testing-library__jest-dom': 5.14.5 + '@types/jest': 29.5.4 aria-query: 5.1.3 chalk: 3.0.0 css.escape: 1.5.1 dom-accessibility-api: 0.5.14 + jest: 29.6.3(@types/node@18.17.9)(ts-node@10.9.1) lodash: 4.17.21 redent: 3.0.0 dev: true @@ -4141,12 +4156,6 @@ packages: /@types/stack-utils@2.0.1: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} - /@types/testing-library__jest-dom@5.14.5: - resolution: {integrity: sha512-SBwbxYoyPIvxHbeHxTZX2Pe/74F/tX2/D3mMvzabdeJ25bBojfW0TyB8BHrbq/9zaaKICJZjLP+8r6AeZMFCuQ==} - dependencies: - '@types/jest': 29.5.4 - dev: true - /@types/tough-cookie@4.0.2: resolution: {integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==} dev: true From 0e4253b54518dee5a35d0a5c1640d09017d7390f Mon Sep 17 00:00:00 2001 From: QuiiBz Date: Mon, 28 Aug 2023 10:28:35 +0200 Subject: [PATCH 2/6] refactor: use jest globals --- .eslintrc | 7 +- package.json | 4 +- .../src/__tests__/generate-changeset.ts | 13 +- .../jest-helpers/src/__tests__/index.test.tsx | 5 +- .../src/helpers/shouldMatchEmotionSnapshot.ts | 1 + .../shouldMatchEmotionSnapshotWithPortal.ts | 1 + packages/jest-helpers/src/index.ts | 1 + .../outdated-browser/src/__tests__/index.ts | 2 + packages/random-name/src/__tests__/index.ts | 1 + packages/regex/src/__tests__/index.ts | 1 + .../src/__tests__/DataLoaderProvider.test.tsx | 7 +- .../src/__tests__/dataloader.test.ts | 1 + .../src/__tests__/helpers.test.ts | 1 + .../src/__tests__/useDataLoader.test.tsx | 15 +- .../src/__tests__/AbTestProvider.tsx | 1 + .../src/__tests__/useAbTestAttributes.ts | 1 + packages/use-gtm/src/__tests__/index.tsx | 1 + packages/use-i18n/src/__tests__/formatDate.ts | 1 + packages/use-i18n/src/__tests__/formatUnit.ts | 1 + packages/use-i18n/src/__tests__/usei18n.tsx | 1 + packages/use-media/src/__tests__/useMedia.tsx | 5 +- .../use-query-params/src/__tests__/index.tsx | 1 + .../use-random-name/src/__tests__/index.ts | 1 + packages/use-segment/src/__tests__/index.tsx | 3 +- .../use-storage/src/__tests__/index.client.ts | 1 + .../use-storage/src/__tests__/index.server.ts | 1 + pnpm-lock.yaml | 232 ++++++++++++++---- 27 files changed, 243 insertions(+), 67 deletions(-) diff --git a/.eslintrc b/.eslintrc index 2787973b0..a0f67c67f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,8 +1,7 @@ { "root": true, "env": { - "browser": true, - "jest": true + "browser": true }, "overrides": [ { @@ -21,6 +20,7 @@ "files": [ "packages/changesets-renovate/**/*.ts{x,}", "packages/validate-icu-locales/**/*.ts{x,}", + "packages/jest-helpers/**/*.ts{x,}", "**/__tests__/**/*.ts{x,}" ], "parserOptions": { @@ -28,7 +28,8 @@ }, "extends": ["@scaleway/react/typescript"], "rules": { - "no-console": "off" + "no-console": "off", + "import/no-extraneous-dependencies": "off" } } ] diff --git a/package.json b/package.json index 7c9fd21dd..51899fb38 100644 --- a/package.json +++ b/package.json @@ -21,14 +21,14 @@ "@changesets/cli": "2.26.2", "@commitlint/cli": "17.7.1", "@commitlint/config-conventional": "17.7.0", + "@jest/globals": "^29.6.4", "@rollup/plugin-babel": "6.0.3", "@rollup/plugin-node-resolve": "15.2.1", "@scaleway/eslint-config-react": "workspace:*", "@scaleway/tsconfig": "workspace:*", - "@testing-library/jest-dom": "6.0.0", + "@testing-library/jest-dom": "6.0.1", "@testing-library/react": "13.4.0", "@tsd/typescript": "5.1.6", - "@types/jest": "29.5.4", "@types/node": "18.17.9", "@types/prop-types": "15.7.5", "@types/react": "18.2.21", diff --git a/packages/changesets-renovate/src/__tests__/generate-changeset.ts b/packages/changesets-renovate/src/__tests__/generate-changeset.ts index a62807068..b20ea4b2e 100644 --- a/packages/changesets-renovate/src/__tests__/generate-changeset.ts +++ b/packages/changesets-renovate/src/__tests__/generate-changeset.ts @@ -1,3 +1,4 @@ +import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals' import fs from 'node:fs/promises' import { simpleGit } from 'simple-git' import { run } from '..' @@ -95,9 +96,9 @@ describe('generate changeset file', () => { }) fs.readFile = jest - .fn() + .fn() .mockResolvedValue(`{"name":"packageName","version":"1.0.0"}`) - fs.writeFile = jest.fn() + fs.writeFile = jest.fn() await run() @@ -129,9 +130,9 @@ describe('generate changeset file', () => { }) fs.readFile = jest - .fn() + .fn() .mockResolvedValue(`{"name":"packageName","workspaces":[]}`) - fs.writeFile = jest.fn() + fs.writeFile = jest.fn() await run() @@ -159,8 +160,8 @@ describe('generate changeset file', () => { `, }) - fs.readFile = jest.fn().mockResolvedValue(`{"name":"packageName"}`) - fs.writeFile = jest.fn() + fs.readFile = jest.fn().mockResolvedValue(`{"name":"packageName"}`) + fs.writeFile = jest.fn() await run() diff --git a/packages/jest-helpers/src/__tests__/index.test.tsx b/packages/jest-helpers/src/__tests__/index.test.tsx index 10fe2f4c0..4bd4c3bd4 100644 --- a/packages/jest-helpers/src/__tests__/index.test.tsx +++ b/packages/jest-helpers/src/__tests__/index.test.tsx @@ -1,3 +1,4 @@ +import { beforeAll, describe, expect, it, jest, test } from '@jest/globals' import makeHelpers from '..' import type { RenderWithThemeFn } from '../helpers/renderWithTheme' import type { ShouldMatchEmotionSnapshotFn } from '../helpers/shouldMatchEmotionSnapshot' @@ -31,7 +32,7 @@ describe('@jest-helpers', () => { }) test('should call tranform with shouldMatchEmotionSnapshot', async () => { - const transform = jest.fn() + const transform = jest.fn() await shouldMatchEmotionSnapshot(
, { transform }) expect(transform).toHaveBeenCalledTimes(1) @@ -42,7 +43,7 @@ describe('@jest-helpers', () => { }) it('should call transform with shouldMatchEmotionSnapshot', async () => { - const transform = jest.fn() + const transform = jest.fn() await shouldMatchEmotionSnapshotWithPortal(
, { transform }) expect(transform).toHaveBeenCalledTimes(1) diff --git a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts index e56159b7f..77603c862 100644 --- a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts +++ b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts @@ -1,3 +1,4 @@ +import { expect } from '@jest/globals' import type { RenderOptions, render } from '@testing-library/react' import type { ReactNode } from 'react' import type { RenderWithThemeFn } from './renderWithTheme' diff --git a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts index 74c0535a7..075db4f5e 100644 --- a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts +++ b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts @@ -1,3 +1,4 @@ +import { expect, jest } from '@jest/globals' import type { RenderOptions, render } from '@testing-library/react' import type { ReactNode } from 'react' import type { RenderWithThemeFn } from './renderWithTheme' diff --git a/packages/jest-helpers/src/index.ts b/packages/jest-helpers/src/index.ts index fafe3ef61..d05f9f427 100644 --- a/packages/jest-helpers/src/index.ts +++ b/packages/jest-helpers/src/index.ts @@ -1,5 +1,6 @@ import type { CreateSerializerOptions } from '@emotion/jest' import { createSerializer } from '@emotion/jest' +import { expect } from '@jest/globals' import type { FC, ReactNode } from 'react' import type { RenderWithThemeFn } from './helpers/renderWithTheme' import makeRenderWithTheme from './helpers/renderWithTheme' diff --git a/packages/outdated-browser/src/__tests__/index.ts b/packages/outdated-browser/src/__tests__/index.ts index 3fe7dedd7..34aa0e91f 100644 --- a/packages/outdated-browser/src/__tests__/index.ts +++ b/packages/outdated-browser/src/__tests__/index.ts @@ -1,3 +1,5 @@ +import { afterEach, beforeAll, describe, expect, jest, test } from '@jest/globals' + /** * @jest-environment jsdom */ diff --git a/packages/random-name/src/__tests__/index.ts b/packages/random-name/src/__tests__/index.ts index 9685efe3a..33ceea3af 100644 --- a/packages/random-name/src/__tests__/index.ts +++ b/packages/random-name/src/__tests__/index.ts @@ -1,3 +1,4 @@ +import { describe, expect, it } from '@jest/globals' import randomName from '..' describe('randomName', () => { diff --git a/packages/regex/src/__tests__/index.ts b/packages/regex/src/__tests__/index.ts index 261db15b2..2814f3e98 100644 --- a/packages/regex/src/__tests__/index.ts +++ b/packages/regex/src/__tests__/index.ts @@ -1,3 +1,4 @@ +import { describe, expect, test } from '@jest/globals' import { absoluteLinuxPath, accessKeyRegex, diff --git a/packages/use-dataloader/src/__tests__/DataLoaderProvider.test.tsx b/packages/use-dataloader/src/__tests__/DataLoaderProvider.test.tsx index 587663e6a..7d2ff6e43 100644 --- a/packages/use-dataloader/src/__tests__/DataLoaderProvider.test.tsx +++ b/packages/use-dataloader/src/__tests__/DataLoaderProvider.test.tsx @@ -1,3 +1,4 @@ +import { describe, expect, jest, test } from '@jest/globals' import { render, renderHook, screen, waitFor } from '@testing-library/react' import type { ReactNode } from 'react' import DataLoaderProvider, { useDataLoaderContext } from '../DataLoaderProvider' @@ -62,7 +63,7 @@ describe('DataLoaderProvider', () => { try { // @ts-expect-error Should throw an error await result.current.reload(3).catch(undefined) - fail('It should throw an error') + throw new Error('It should throw an error') } catch (error) { expect((error as Error).message).toBe(KEY_IS_NOT_STRING_ERROR) } @@ -72,7 +73,7 @@ describe('DataLoaderProvider', () => { try { // @ts-expect-error Should throw an error result.current.clearCachedData(3) - fail('It should throw an error') + throw new Error('It should throw an error') } catch (error) { expect((error as Error).message).toBe(KEY_IS_NOT_STRING_ERROR) expect(result.current.getCachedData(TEST_KEY)).toBe(true) @@ -122,7 +123,7 @@ describe('DataLoaderProvider', () => { if (testReload) { expect(await testReload()).toBeNull() } else { - fail('It shoulded be defined') + throw new Error('It shoulded be defined') } expect(result.current.getCachedData(TEST_KEY)).toBe(null) expect(result.current.getCachedData()).toStrictEqual({ test: null }) diff --git a/packages/use-dataloader/src/__tests__/dataloader.test.ts b/packages/use-dataloader/src/__tests__/dataloader.test.ts index 5fafe0cb1..d0f2f0ba2 100644 --- a/packages/use-dataloader/src/__tests__/dataloader.test.ts +++ b/packages/use-dataloader/src/__tests__/dataloader.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, jest, test } from '@jest/globals' import waitForExpect from 'wait-for-expect' import { StatusEnum } from '../constants' import DataLoader from '../dataloader' diff --git a/packages/use-dataloader/src/__tests__/helpers.test.ts b/packages/use-dataloader/src/__tests__/helpers.test.ts index f4cfb0c12..10c106cf5 100644 --- a/packages/use-dataloader/src/__tests__/helpers.test.ts +++ b/packages/use-dataloader/src/__tests__/helpers.test.ts @@ -1,3 +1,4 @@ +import { describe, expect, test } from '@jest/globals' import { marshalQueryKey } from '../helpers' describe('marshalQueryKey', () => { diff --git a/packages/use-dataloader/src/__tests__/useDataLoader.test.tsx b/packages/use-dataloader/src/__tests__/useDataLoader.test.tsx index 3b0a9e95a..49ec2e8bf 100644 --- a/packages/use-dataloader/src/__tests__/useDataLoader.test.tsx +++ b/packages/use-dataloader/src/__tests__/useDataLoader.test.tsx @@ -1,4 +1,5 @@ /* eslint-disable no-console */ +import { describe, expect, jest, test } from '@jest/globals' import { renderHook, waitFor } from '@testing-library/react' import type { ReactNode } from 'react' import DataLoaderProvider, { useDataLoaderContext } from '../DataLoaderProvider' @@ -501,7 +502,7 @@ describe('useDataLoader', () => { }) test('should call onSuccess', async () => { - const onSuccess = jest.fn() + const onSuccess = jest.fn() const { result } = renderHook( props => useDataLoader(props.key, props.method, props.config), { @@ -523,8 +524,8 @@ describe('useDataLoader', () => { }) test('should call onError', async () => { - const onSuccess = jest.fn() - const onError = jest.fn() + const onSuccess = jest.fn() + const onError = jest.fn() const error = new Error('Test error') const { result } = renderHook( props => useDataLoader(props.key, props.method, props.config), @@ -557,8 +558,8 @@ describe('useDataLoader', () => { }) test('should override onError from Provider', async () => { - const onSuccess = jest.fn() - const onError = jest.fn() + const onSuccess = jest.fn() + const onError = jest.fn() const error = new Error('Test error') const onErrorProvider = jest.fn() const { result } = renderHook( @@ -593,7 +594,7 @@ describe('useDataLoader', () => { }) test('should call onError from Provider', async () => { - const onSuccess = jest.fn() + const onSuccess = jest.fn() const error = new Error('Test error') const onErrorProvider = jest.fn() const { result } = renderHook( @@ -629,7 +630,7 @@ describe('useDataLoader', () => { test('should clear error on new response', async () => { let success = false - const onSuccess = jest.fn() + const onSuccess = jest.fn() const onError = jest.fn(() => { success = true }) diff --git a/packages/use-growthbook/src/__tests__/AbTestProvider.tsx b/packages/use-growthbook/src/__tests__/AbTestProvider.tsx index 573c08323..e8fe8e4f2 100644 --- a/packages/use-growthbook/src/__tests__/AbTestProvider.tsx +++ b/packages/use-growthbook/src/__tests__/AbTestProvider.tsx @@ -1,5 +1,6 @@ // @ts-expect-error TODO: remove once Growthbook is correctly typed and export import { GrowthBook } from '@growthbook/growthbook-react' +import { beforeEach, describe, expect, it, jest } from '@jest/globals' import { render } from '@testing-library/react' import type { TrackingCallback } from '../AbTestProvider' import { AbTestProvider } from '../AbTestProvider' diff --git a/packages/use-growthbook/src/__tests__/useAbTestAttributes.ts b/packages/use-growthbook/src/__tests__/useAbTestAttributes.ts index 5af29cfb7..eb9e730c5 100644 --- a/packages/use-growthbook/src/__tests__/useAbTestAttributes.ts +++ b/packages/use-growthbook/src/__tests__/useAbTestAttributes.ts @@ -1,5 +1,6 @@ // @ts-expect-error TODO: remove once Growthbook is correctly typed and export import { useGrowthBook } from '@growthbook/growthbook-react' +import { beforeEach, describe, expect, it, jest } from '@jest/globals' import { renderHook } from '@testing-library/react' import type { Attributes } from '../types' import { useAbTestAttributes } from '../useAbTestAttributes' diff --git a/packages/use-gtm/src/__tests__/index.tsx b/packages/use-gtm/src/__tests__/index.tsx index 7e0ab4468..3a01a4eb0 100644 --- a/packages/use-gtm/src/__tests__/index.tsx +++ b/packages/use-gtm/src/__tests__/index.tsx @@ -1,3 +1,4 @@ +import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals' import { fireEvent, renderHook } from '@testing-library/react' import mockdate from 'mockdate' import type { ReactNode } from 'react' diff --git a/packages/use-i18n/src/__tests__/formatDate.ts b/packages/use-i18n/src/__tests__/formatDate.ts index 4b2988748..a088586cf 100644 --- a/packages/use-i18n/src/__tests__/formatDate.ts +++ b/packages/use-i18n/src/__tests__/formatDate.ts @@ -1,3 +1,4 @@ +import { describe, expect, test } from '@jest/globals' import type { FormatDateOptions } from '../formatDate' import formatDate, { supportedFormats } from '../formatDate' diff --git a/packages/use-i18n/src/__tests__/formatUnit.ts b/packages/use-i18n/src/__tests__/formatUnit.ts index 0768ba756..d19b35e9c 100644 --- a/packages/use-i18n/src/__tests__/formatUnit.ts +++ b/packages/use-i18n/src/__tests__/formatUnit.ts @@ -1,3 +1,4 @@ +import { describe, expect, test } from '@jest/globals' import type { FormatUnitOptions } from '../formatUnit' import formatUnit, { supportedUnits } from '../formatUnit' diff --git a/packages/use-i18n/src/__tests__/usei18n.tsx b/packages/use-i18n/src/__tests__/usei18n.tsx index f7f74fd85..cebad5660 100644 --- a/packages/use-i18n/src/__tests__/usei18n.tsx +++ b/packages/use-i18n/src/__tests__/usei18n.tsx @@ -1,3 +1,4 @@ +import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals' import { act, renderHook, waitFor } from '@testing-library/react' import mockdate from 'mockdate' import type { ReactNode } from 'react' diff --git a/packages/use-media/src/__tests__/useMedia.tsx b/packages/use-media/src/__tests__/useMedia.tsx index 4b608c05c..14d72d07d 100644 --- a/packages/use-media/src/__tests__/useMedia.tsx +++ b/packages/use-media/src/__tests__/useMedia.tsx @@ -1,3 +1,4 @@ +import { describe, expect, it, jest } from '@jest/globals' import { renderHook } from '@testing-library/react' import { useMedia } from '..' @@ -15,7 +16,7 @@ describe('useMedia hook', () => { callback() Object.defineProperty(window, 'matchMedia', { - value: jest.fn().mockImplementation((query: string) => ({ + value: jest.fn().mockImplementation((query: string) => ({ addEventListener: mockAddEventListener, addListener: jest.fn(), dispatchEvent: jest.fn(), @@ -43,7 +44,7 @@ describe('useMedia hook', () => { } Object.defineProperty(window, 'matchMedia', { - value: jest.fn().mockImplementation((query: string) => ({ + value: jest.fn().mockImplementation((query: string) => ({ addEventListener: mockAddEventListener, addListener: jest.fn(), dispatchEvent: jest.fn(), diff --git a/packages/use-query-params/src/__tests__/index.tsx b/packages/use-query-params/src/__tests__/index.tsx index 370164898..a41bb5720 100644 --- a/packages/use-query-params/src/__tests__/index.tsx +++ b/packages/use-query-params/src/__tests__/index.tsx @@ -1,3 +1,4 @@ +import { describe, expect, it, test } from '@jest/globals' import { act, renderHook } from '@testing-library/react' import type { History } from 'history' import { createMemoryHistory } from 'history' diff --git a/packages/use-random-name/src/__tests__/index.ts b/packages/use-random-name/src/__tests__/index.ts index 4cca2045a..1de9b079c 100644 --- a/packages/use-random-name/src/__tests__/index.ts +++ b/packages/use-random-name/src/__tests__/index.ts @@ -1,3 +1,4 @@ +import { afterAll, beforeAll, describe, expect, it, jest } from '@jest/globals' import { renderHook } from '@testing-library/react' import useRandomName from '..' diff --git a/packages/use-segment/src/__tests__/index.tsx b/packages/use-segment/src/__tests__/index.tsx index 0440ca60d..8e297d0ee 100644 --- a/packages/use-segment/src/__tests__/index.tsx +++ b/packages/use-segment/src/__tests__/index.tsx @@ -1,3 +1,4 @@ +import { beforeEach, describe, expect, it, jest } from '@jest/globals' import type { Context } from '@segment/analytics-next' import { AnalyticsBrowser } from '@segment/analytics-next' import { renderHook, waitFor } from '@testing-library/react' @@ -218,7 +219,7 @@ describe('segment hook', () => { .spyOn(AnalyticsBrowser, 'load') .mockResolvedValue([{} as Analytics, {} as Context]) - const onEventError = jest.fn() + const onEventError = jest.fn() const onError = jest.fn() const settings = { writeKey: 'pleasethrow' } diff --git a/packages/use-storage/src/__tests__/index.client.ts b/packages/use-storage/src/__tests__/index.client.ts index ca48ce272..26d61c661 100644 --- a/packages/use-storage/src/__tests__/index.client.ts +++ b/packages/use-storage/src/__tests__/index.client.ts @@ -2,6 +2,7 @@ * @jest-environment jsdom */ +import { afterEach, describe, expect, it } from '@jest/globals' import { act, renderHook } from '@testing-library/react' import { useLocalStorage, useSessionStorage } from '..' diff --git a/packages/use-storage/src/__tests__/index.server.ts b/packages/use-storage/src/__tests__/index.server.ts index d277c42f9..f4ec8f6ce 100644 --- a/packages/use-storage/src/__tests__/index.server.ts +++ b/packages/use-storage/src/__tests__/index.server.ts @@ -2,6 +2,7 @@ * @jest-environment node */ +import { describe, expect, it } from '@jest/globals' import { act, renderHook } from '@testing-library/react/pure' import { useLocalStorage, useSessionStorage } from '..' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a56bd22ab..15b25e393 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: '@commitlint/config-conventional': specifier: 17.7.0 version: 17.7.0 + '@jest/globals': + specifier: ^29.6.4 + version: 29.6.4 '@rollup/plugin-babel': specifier: 6.0.3 version: 6.0.3(@babel/core@7.22.10)(rollup@3.28.1) @@ -51,17 +54,14 @@ importers: specifier: workspace:* version: link:packages/tsconfig '@testing-library/jest-dom': - specifier: 6.0.0 - version: 6.0.0(@types/jest@29.5.4)(jest@29.6.3) + specifier: 6.0.1 + version: 6.0.1(@jest/globals@29.6.4)(jest@29.6.3) '@testing-library/react': specifier: 13.4.0 version: 13.4.0(react-dom@18.2.0)(react@18.2.0) '@tsd/typescript': specifier: 5.1.6 version: 5.1.6 - '@types/jest': - specifier: 29.5.4 - version: 29.5.4 '@types/node': specifier: 18.17.9 version: 18.17.9 @@ -200,7 +200,7 @@ importers: version: 11.11.0 '@emotion/jest': specifier: 11.11.0 - version: 11.11.0(@types/jest@29.5.4) + version: 11.11.0 '@emotion/react': specifier: 11.11.1 version: 11.11.1(@types/react@18.2.21)(react@18.2.0) @@ -343,8 +343,8 @@ packages: resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} - /@adobe/css-tools@4.0.1: - resolution: {integrity: sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g==} + /@adobe/css-tools@4.3.1: + resolution: {integrity: sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==} dev: true /@ampproject/remapping@2.2.1: @@ -367,6 +367,7 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.22.5 + dev: true /@babel/compat-data@7.22.9: resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} @@ -537,7 +538,7 @@ packages: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 dev: true /@babel/helper-module-imports@7.21.4: @@ -703,6 +704,7 @@ packages: '@babel/helper-validator-identifier': 7.22.5 chalk: 2.4.2 js-tokens: 4.0.0 + dev: true /@babel/parser@7.22.10: resolution: {integrity: sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==} @@ -2224,7 +2226,7 @@ packages: resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} dev: false - /@emotion/jest@11.11.0(@types/jest@29.5.4): + /@emotion/jest@11.11.0: resolution: {integrity: sha512-XZlnmdUZ32YjQnInsCFk/plKpkV/NXN1Ab4YoNvXN887MeR3Hr5ZsTyoblIW8AWwdfQiZHHphaPMb56lk6Ofdw==} peerDependencies: '@types/jest': ^26.0.14 || ^27.0.0 || ^28.0.0 || ^29.0.0 @@ -2237,7 +2239,6 @@ packages: dependencies: '@babel/runtime': 7.21.5 '@emotion/css-prettifier': 1.1.3 - '@types/jest': 29.5.4 chalk: 4.1.2 specificity: 0.4.1 stylis: 4.2.0 @@ -2507,11 +2508,29 @@ packages: jest-mock: 29.6.3 dev: true + /@jest/environment@29.6.4: + resolution: {integrity: sha512-sQ0SULEjA1XUTHmkBRl7A1dyITM9yb1yb3ZNKPX3KlTd6IG7mWUe3e2yfExtC2Zz1Q+mMckOLHmL/qLiuQJrBQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/fake-timers': 29.6.4 + '@jest/types': 29.6.3 + '@types/node': 18.17.9 + jest-mock: 29.6.3 + dev: true + /@jest/expect-utils@29.6.3: resolution: {integrity: sha512-nvOEW4YoqRKD9HBJ9OJ6przvIvP9qilp5nAn1462P5ZlL/MM9SgPEZFyjTGPfs7QkocdUsJa6KjHhyRn4ueItA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: jest-get-type: 29.6.3 + dev: true + + /@jest/expect-utils@29.6.4: + resolution: {integrity: sha512-FEhkJhqtvBwgSpiTrocquJCdXPsyvNKcl/n7A3u7X4pVoF4bswm11c9d4AV+kfq2Gpv/mM8x7E7DsRvH+djkrg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + jest-get-type: 29.6.3 + dev: true /@jest/expect@29.6.3: resolution: {integrity: sha512-Ic08XbI2jlg6rECy+CGwk/8NDa6VE7UmIG6++9OTPAMnQmNGY28hu69Nf629CWv6T7YMODLbONxDFKdmQeI9FA==} @@ -2523,6 +2542,16 @@ packages: - supports-color dev: true + /@jest/expect@29.6.4: + resolution: {integrity: sha512-Warhsa7d23+3X5bLbrbYvaehcgX5TLYhI03JKoedTiI8uJU4IhqYBWF7OSSgUyz4IgLpUYPkK0AehA5/fRclAA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + expect: 29.6.4 + jest-snapshot: 29.6.4 + transitivePeerDependencies: + - supports-color + dev: true + /@jest/fake-timers@29.6.3: resolution: {integrity: sha512-pa1wmqvbj6eX0nMvOM2VDAWvJOI5A/Mk3l8O7n7EsAh71sMZblaKO9iT4GjIj0LwwK3CP/Jp1ypEV0x3m89RvA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2535,12 +2564,24 @@ packages: jest-util: 29.6.3 dev: true - /@jest/globals@29.6.3: - resolution: {integrity: sha512-RB+uI+CZMHntzlnOPlll5x/jgRff3LEPl/td/jzMXiIgR0iIhKq9qm1HLU+EC52NuoVy/1swit/sDGjVn4bc6A==} + /@jest/fake-timers@29.6.4: + resolution: {integrity: sha512-6UkCwzoBK60edXIIWb0/KWkuj7R7Qq91vVInOe3De6DSpaEiqjKcJw4F7XUet24Wupahj9J6PlR09JqJ5ySDHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@jest/environment': 29.6.3 - '@jest/expect': 29.6.3 + '@jest/types': 29.6.3 + '@sinonjs/fake-timers': 10.0.2 + '@types/node': 18.17.9 + jest-message-util: 29.6.3 + jest-mock: 29.6.3 + jest-util: 29.6.3 + dev: true + + /@jest/globals@29.6.4: + resolution: {integrity: sha512-wVIn5bdtjlChhXAzVXavcY/3PEjf4VqM174BM3eGL5kMxLiZD5CLnbmkEyA1Dwh9q8XjP6E8RwjBsY/iCWrWsA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/environment': 29.6.4 + '@jest/expect': 29.6.4 '@jest/types': 29.6.3 jest-mock: 29.6.3 transitivePeerDependencies: @@ -2589,6 +2630,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@sinclair/typebox': 0.27.8 + dev: true /@jest/source-map@29.6.3: resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} @@ -2642,6 +2684,29 @@ packages: - supports-color dev: true + /@jest/transform@29.6.4: + resolution: {integrity: sha512-8thgRSiXUqtr/pPGY/OsyHuMjGyhVnWrFAwoxmIemlBuiMyU1WFs0tXoNxzcr4A4uErs/ABre76SGmrr5ab/AA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/core': 7.22.10 + '@jest/types': 29.6.3 + '@jridgewell/trace-mapping': 0.3.18 + babel-plugin-istanbul: 6.1.1 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.11 + jest-haste-map: 29.6.4 + jest-regex-util: 29.6.3 + jest-util: 29.6.3 + micromatch: 4.0.5 + pirates: 4.0.5 + slash: 3.0.0 + write-file-atomic: 4.0.2 + transitivePeerDependencies: + - supports-color + dev: true + /@jest/types@29.6.3: resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -2652,6 +2717,7 @@ packages: '@types/node': 18.17.9 '@types/yargs': 17.0.22 chalk: 4.1.2 + dev: true /@jridgewell/gen-mapping@0.3.3: resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} @@ -2890,6 +2956,7 @@ packages: /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + dev: true /@sinonjs/commons@2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} @@ -3938,7 +4005,7 @@ packages: resolution: {integrity: sha512-d9ULIT+a4EXLX3UU8FBjauG9NnsZHkHztXoIcTsOKoOw030fyjheN9svkTULjJxtYag9DZz5Jz5qkWZDPxTFwA==} engines: {node: '>=12'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 '@babel/runtime': 7.22.5 '@types/aria-query': 5.0.1 aria-query: 5.1.3 @@ -3947,8 +4014,8 @@ packages: lz-string: 1.5.0 pretty-format: 27.5.1 - /@testing-library/jest-dom@6.0.0(@types/jest@29.5.4)(jest@29.6.3): - resolution: {integrity: sha512-Ye2R3+/oM27jir8CzYPmuWdavTaKwNZcu0d22L9pO/vnOYE0wmrtpw79TQJa8H6gV8/i7yd+pLaqeLlA0rTMfg==} + /@testing-library/jest-dom@6.0.1(@jest/globals@29.6.4)(jest@29.6.3): + resolution: {integrity: sha512-0hx/AWrJp8EKr8LmC5jrV3Lx8TZySH7McU1Ix2czBPQnLd458CefSEGjZy7w8kaBRA6LhoPkGjoZ3yqSs338IQ==} engines: {node: '>=14', npm: '>=6', yarn: '>=1'} peerDependencies: '@jest/globals': '>= 28' @@ -3965,9 +4032,9 @@ packages: vitest: optional: true dependencies: - '@adobe/css-tools': 4.0.1 + '@adobe/css-tools': 4.3.1 '@babel/runtime': 7.22.5 - '@types/jest': 29.5.4 + '@jest/globals': 29.6.4 aria-query: 5.1.3 chalk: 3.0.0 css.escape: 1.5.1 @@ -4066,22 +4133,19 @@ packages: /@types/istanbul-lib-coverage@2.0.4: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} + dev: true /@types/istanbul-lib-report@3.0.0: resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} dependencies: '@types/istanbul-lib-coverage': 2.0.4 + dev: true /@types/istanbul-reports@3.0.1: resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} dependencies: '@types/istanbul-lib-report': 3.0.0 - - /@types/jest@29.5.4: - resolution: {integrity: sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A==} - dependencies: - expect: 29.6.3 - pretty-format: 29.6.3 + dev: true /@types/jsdom@20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} @@ -4109,6 +4173,7 @@ packages: /@types/node@18.17.9: resolution: {integrity: sha512-fxaKquqYcPOGwE7tC1anJaPJ0GHyOVzfA2oUoXECjBjrtsIz4YJvtNYsq8LUcjEUehEF+jGpx8Z+lFrtT6z0tg==} + dev: true /@types/node@20.4.7: resolution: {integrity: sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==} @@ -4155,6 +4220,7 @@ packages: /@types/stack-utils@2.0.1: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} + dev: true /@types/tough-cookie@4.0.2: resolution: {integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==} @@ -4162,11 +4228,13 @@ packages: /@types/yargs-parser@21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} + dev: true /@types/yargs@17.0.22: resolution: {integrity: sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==} dependencies: '@types/yargs-parser': 21.0.0 + dev: true /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.1.6): resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} @@ -4789,6 +4857,7 @@ packages: /ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} + dev: true /cjs-module-lexer@1.2.2: resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} @@ -5183,13 +5252,6 @@ packages: engines: {node: '>=8'} dev: true - /define-properties@1.1.4: - resolution: {integrity: sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==} - engines: {node: '>= 0.4'} - dependencies: - has-property-descriptors: 1.0.0 - object-keys: 1.1.1 - /define-properties@1.2.0: resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} engines: {node: '>= 0.4'} @@ -5220,6 +5282,7 @@ packages: /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true /diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} @@ -5637,6 +5700,7 @@ packages: /escape-string-regexp@2.0.0: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} engines: {node: '>=8'} + dev: true /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -6036,6 +6100,18 @@ packages: jest-matcher-utils: 29.6.3 jest-message-util: 29.6.3 jest-util: 29.6.3 + dev: true + + /expect@29.6.4: + resolution: {integrity: sha512-F2W2UyQ8XYyftHT57dtfg8Ue3X5qLgm2sSug0ivvLRH/VKNRL/pDxg/TH7zVzbQB0tu80clNFy6LU7OS/VSEKA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/expect-utils': 29.6.4 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.6.4 + jest-message-util: 29.6.3 + jest-util: 29.6.3 + dev: true /extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} @@ -6327,6 +6403,7 @@ packages: /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true /grapheme-splitter@1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} @@ -6966,6 +7043,17 @@ packages: diff-sequences: 29.6.3 jest-get-type: 29.6.3 pretty-format: 29.6.3 + dev: true + + /jest-diff@29.6.4: + resolution: {integrity: sha512-9F48UxR9e4XOEZvoUXEHSWY4qC4zERJaOfrbBg9JpbJOO43R1vN76REt/aMGZoY6GD5g84nnJiBIVlscegefpw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + diff-sequences: 29.6.3 + jest-get-type: 29.6.3 + pretty-format: 29.6.3 + dev: true /jest-docblock@29.6.3: resolution: {integrity: sha512-2+H+GOTQBEm2+qFSQ7Ma+BvyV+waiIFxmZF5LdpBsAEjWX8QYjSCa4FrkIYtbfXUJJJnFCYrOtt6TZ+IAiTjBQ==} @@ -7023,6 +7111,7 @@ packages: /jest-get-type@29.6.3: resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true /jest-haste-map@29.6.3: resolution: {integrity: sha512-GecR5YavfjkhOytEFHAeI6aWWG3f/cOKNB1YJvj/B76xAmeVjy4zJUYobGF030cRmKaO1FBw3V8CZZ6KVh9ZSw==} @@ -7043,6 +7132,25 @@ packages: fsevents: 2.3.2 dev: true + /jest-haste-map@29.6.4: + resolution: {integrity: sha512-12Ad+VNTDHxKf7k+M65sviyynRoZYuL1/GTuhEVb8RYsNSNln71nANRb/faSyWvx0j+gHcivChXHIoMJrGYjog==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.6.3 + '@types/graceful-fs': 4.1.6 + '@types/node': 18.17.9 + anymatch: 3.1.3 + fb-watchman: 2.0.2 + graceful-fs: 4.2.11 + jest-regex-util: 29.6.3 + jest-util: 29.6.3 + jest-worker: 29.6.4 + micromatch: 4.0.5 + walker: 1.0.8 + optionalDependencies: + fsevents: 2.3.2 + dev: true + /jest-junit@16.0.0: resolution: {integrity: sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ==} engines: {node: '>=10.12.0'} @@ -7074,6 +7182,17 @@ packages: jest-diff: 29.6.3 jest-get-type: 29.6.3 pretty-format: 29.6.3 + dev: true + + /jest-matcher-utils@29.6.4: + resolution: {integrity: sha512-KSzwyzGvK4HcfnserYqJHYi7sZVqdREJ9DMPAKVbS98JsIAvumihaNUbjrWw0St7p9IY7A9UskCW5MYlGmBQFQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + jest-diff: 29.6.4 + jest-get-type: 29.6.3 + pretty-format: 29.6.3 + dev: true /jest-message-util@29.6.3: resolution: {integrity: sha512-FtzaEEHzjDpQp51HX4UMkPZjy46ati4T5pEMyM6Ik48ztu4T9LQplZ6OsimHx7EuM9dfEh5HJa6D3trEftu3dA==} @@ -7088,6 +7207,7 @@ packages: pretty-format: 29.6.3 slash: 3.0.0 stack-utils: 2.0.6 + dev: true /jest-mock@29.6.3: resolution: {integrity: sha512-Z7Gs/mOyTSR4yPsaZ72a/MtuK6RnC3JYqWONe48oLaoEcYwEDxqvbXz85G4SJrm2Z5Ar9zp6MiHF4AlFlRM4Pg==} @@ -7191,7 +7311,7 @@ packages: dependencies: '@jest/environment': 29.6.3 '@jest/fake-timers': 29.6.3 - '@jest/globals': 29.6.3 + '@jest/globals': 29.6.4 '@jest/source-map': 29.6.3 '@jest/test-result': 29.6.3 '@jest/transform': 29.6.3 @@ -7243,16 +7363,32 @@ packages: - supports-color dev: true - /jest-util@29.6.2: - resolution: {integrity: sha512-3eX1qb6L88lJNCFlEADKOkjpXJQyZRiavX1INZ4tRnrBVr2COd3RgcTLyUiEXMNBlDU/cgYq6taUS0fExrWW4w==} + /jest-snapshot@29.6.4: + resolution: {integrity: sha512-VC1N8ED7+4uboUKGIDsbvNAZb6LakgIPgAF4RSpF13dN6YaMokfRqO+BaqK4zIh6X3JffgwbzuGqDEjHm/MrvA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: + '@babel/core': 7.22.10 + '@babel/generator': 7.22.10 + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.10) + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.10) + '@babel/types': 7.22.10 + '@jest/expect-utils': 29.6.4 + '@jest/transform': 29.6.4 '@jest/types': 29.6.3 - '@types/node': 18.17.9 + babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.10) chalk: 4.1.2 - ci-info: 3.8.0 + expect: 29.6.4 graceful-fs: 4.2.11 - picomatch: 2.3.1 + jest-diff: 29.6.4 + jest-get-type: 29.6.3 + jest-matcher-utils: 29.6.4 + jest-message-util: 29.6.3 + jest-util: 29.6.3 + natural-compare: 1.4.0 + pretty-format: 29.6.3 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color dev: true /jest-util@29.6.3: @@ -7265,6 +7401,7 @@ packages: ci-info: 3.8.0 graceful-fs: 4.2.11 picomatch: 2.3.1 + dev: true /jest-validate@29.6.3: resolution: {integrity: sha512-e7KWZcAIX+2W1o3cHfnqpGajdCs1jSM3DkXjGeLSNmCazv1EeI1ggTeK5wdZhF+7N+g44JI2Od3veojoaumlfg==} @@ -7297,7 +7434,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@types/node': 18.17.9 - jest-util: 29.6.2 + jest-util: 29.6.3 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true @@ -7312,6 +7449,16 @@ packages: supports-color: 8.1.1 dev: true + /jest-worker@29.6.4: + resolution: {integrity: sha512-6dpvFV4WjcWbDVGgHTWo/aupl8/LbBx2NSKfiwqf79xC/yeJjKHT1+StcKy/2KTmW16hE68ccKVOtXf+WZGz7Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@types/node': 18.17.9 + jest-util: 29.6.3 + merge-stream: 2.0.0 + supports-color: 8.1.1 + dev: true + /jest@29.6.3(@types/node@18.17.9)(ts-node@10.9.1): resolution: {integrity: sha512-alueLuoPCDNHFcFGmgETR4KpQ+0ff3qVaiJwxQM4B5sC0CvXcgg4PEi7xrDkxuItDmdz/FVc7SSit4KEu8GRvw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -7960,7 +8107,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - define-properties: 1.1.4 + define-properties: 1.2.0 has-symbols: 1.0.3 object-keys: 1.1.1 @@ -8243,6 +8390,7 @@ packages: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 + dev: true /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} @@ -8315,6 +8463,7 @@ packages: /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + dev: true /react-router-dom@6.15.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-aR42t0fs7brintwBGAv2+mGlCtgtFQeOzK0BM1/OiqEzRejOZtpMZepvgkscpMUnKb8YO84G7s3LsHnnDNonbQ==} @@ -8823,6 +8972,7 @@ packages: engines: {node: '>=10'} dependencies: escape-string-regexp: 2.0.0 + dev: true /stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} From 86a6a11b66d79c177b0ae9e31dea462a232253ec Mon Sep 17 00:00:00 2001 From: QuiiBz Date: Mon, 28 Aug 2023 10:46:04 +0200 Subject: [PATCH 3/6] fix: build --- .../jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts | 2 +- .../src/helpers/shouldMatchEmotionSnapshotWithPortal.ts | 3 ++- packages/jest-helpers/src/index.ts | 2 +- packages/use-growthbook/src/__tests__/useAbTestAttributes.ts | 4 +--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts index 77603c862..8cd22d531 100644 --- a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts +++ b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts @@ -1,4 +1,3 @@ -import { expect } from '@jest/globals' import type { RenderOptions, render } from '@testing-library/react' import type { ReactNode } from 'react' import type { RenderWithThemeFn } from './renderWithTheme' @@ -21,6 +20,7 @@ export default function makeShouldMatchEmotionSnapshot( const node = renderWithTheme(component, options, theme) if (transform) await transform(node) + // @ts-expect-error can't import because rollup fails expect(node.asFragment()).toMatchSnapshot() node.unmount() } diff --git a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts index 075db4f5e..7c1572a29 100644 --- a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts +++ b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts @@ -1,4 +1,3 @@ -import { expect, jest } from '@jest/globals' import type { RenderOptions, render } from '@testing-library/react' import type { ReactNode } from 'react' import type { RenderWithThemeFn } from './renderWithTheme' @@ -20,6 +19,7 @@ export default function makeShouldMatchEmotionSnapshotWithPortal( return async (component, { options, transform, theme } = {}) => { // Save the instance of console (disable warning about adding element directly to document.body which is necessary when testing portal components) const { console } = global + // @ts-expect-error can't import because rollup fails global.console = { ...console, error: jest.fn() } const node = renderWithTheme( @@ -31,6 +31,7 @@ export default function makeShouldMatchEmotionSnapshotWithPortal( theme, ) if (transform) await transform(node) + // @ts-expect-error can't import because rollup fails expect(node.asFragment()).toMatchSnapshot() // Unmounting to don't see the warning message described above diff --git a/packages/jest-helpers/src/index.ts b/packages/jest-helpers/src/index.ts index d05f9f427..a79b49541 100644 --- a/packages/jest-helpers/src/index.ts +++ b/packages/jest-helpers/src/index.ts @@ -1,6 +1,5 @@ import type { CreateSerializerOptions } from '@emotion/jest' import { createSerializer } from '@emotion/jest' -import { expect } from '@jest/globals' import type { FC, ReactNode } from 'react' import type { RenderWithThemeFn } from './helpers/renderWithTheme' import makeRenderWithTheme from './helpers/renderWithTheme' @@ -21,6 +20,7 @@ export default function makeHelpers( Wrapper: FC<{ theme?: Theme; children: ReactNode }>, createSerializerOptions?: CreateSerializerOptions, ): Helpers { + // @ts-expect-error can't import because rollup fails expect.addSnapshotSerializer(createSerializer(createSerializerOptions)) const renderWithTheme = makeRenderWithTheme(Wrapper) diff --git a/packages/use-growthbook/src/__tests__/useAbTestAttributes.ts b/packages/use-growthbook/src/__tests__/useAbTestAttributes.ts index eb9e730c5..7e5217799 100644 --- a/packages/use-growthbook/src/__tests__/useAbTestAttributes.ts +++ b/packages/use-growthbook/src/__tests__/useAbTestAttributes.ts @@ -5,9 +5,7 @@ import { renderHook } from '@testing-library/react' import type { Attributes } from '../types' import { useAbTestAttributes } from '../useAbTestAttributes' -jest.mock('@growthbook/growthbook-react', () => ({ - useGrowthBook: jest.fn(), -})) +jest.mock('@growthbook/growthbook-react') describe('useAbTestAttributes', () => { let getAttributes: () => Attributes From a3816d601de1d7156a0e6276bbc21780e1bad23a Mon Sep 17 00:00:00 2001 From: QuiiBz Date: Mon, 28 Aug 2023 14:06:02 +0200 Subject: [PATCH 4/6] fix: typecheck & lint --- .../src/helpers/shouldMatchEmotionSnapshot.ts | 2 +- .../shouldMatchEmotionSnapshotWithPortal.ts | 3 +- packages/jest-helpers/src/index.ts | 2 +- pnpm-lock.yaml | 86 ++++--------------- rollup.config.mjs | 14 +-- 5 files changed, 26 insertions(+), 81 deletions(-) diff --git a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts index 8cd22d531..77603c862 100644 --- a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts +++ b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshot.ts @@ -1,3 +1,4 @@ +import { expect } from '@jest/globals' import type { RenderOptions, render } from '@testing-library/react' import type { ReactNode } from 'react' import type { RenderWithThemeFn } from './renderWithTheme' @@ -20,7 +21,6 @@ export default function makeShouldMatchEmotionSnapshot( const node = renderWithTheme(component, options, theme) if (transform) await transform(node) - // @ts-expect-error can't import because rollup fails expect(node.asFragment()).toMatchSnapshot() node.unmount() } diff --git a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts index 7c1572a29..075db4f5e 100644 --- a/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts +++ b/packages/jest-helpers/src/helpers/shouldMatchEmotionSnapshotWithPortal.ts @@ -1,3 +1,4 @@ +import { expect, jest } from '@jest/globals' import type { RenderOptions, render } from '@testing-library/react' import type { ReactNode } from 'react' import type { RenderWithThemeFn } from './renderWithTheme' @@ -19,7 +20,6 @@ export default function makeShouldMatchEmotionSnapshotWithPortal( return async (component, { options, transform, theme } = {}) => { // Save the instance of console (disable warning about adding element directly to document.body which is necessary when testing portal components) const { console } = global - // @ts-expect-error can't import because rollup fails global.console = { ...console, error: jest.fn() } const node = renderWithTheme( @@ -31,7 +31,6 @@ export default function makeShouldMatchEmotionSnapshotWithPortal( theme, ) if (transform) await transform(node) - // @ts-expect-error can't import because rollup fails expect(node.asFragment()).toMatchSnapshot() // Unmounting to don't see the warning message described above diff --git a/packages/jest-helpers/src/index.ts b/packages/jest-helpers/src/index.ts index a79b49541..d05f9f427 100644 --- a/packages/jest-helpers/src/index.ts +++ b/packages/jest-helpers/src/index.ts @@ -1,5 +1,6 @@ import type { CreateSerializerOptions } from '@emotion/jest' import { createSerializer } from '@emotion/jest' +import { expect } from '@jest/globals' import type { FC, ReactNode } from 'react' import type { RenderWithThemeFn } from './helpers/renderWithTheme' import makeRenderWithTheme from './helpers/renderWithTheme' @@ -20,7 +21,6 @@ export default function makeHelpers( Wrapper: FC<{ theme?: Theme; children: ReactNode }>, createSerializerOptions?: CreateSerializerOptions, ): Helpers { - // @ts-expect-error can't import because rollup fails expect.addSnapshotSerializer(createSerializer(createSerializerOptions)) const renderWithTheme = makeRenderWithTheme(Wrapper) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15b25e393..4dbc9dd70 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -200,7 +200,7 @@ importers: version: 11.11.0 '@emotion/jest': specifier: 11.11.0 - version: 11.11.0 + version: 11.11.0(@types/jest@29.5.4) '@emotion/react': specifier: 11.11.1 version: 11.11.1(@types/react@18.2.21)(react@18.2.0) @@ -2226,7 +2226,7 @@ packages: resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} dev: false - /@emotion/jest@11.11.0: + /@emotion/jest@11.11.0(@types/jest@29.5.4): resolution: {integrity: sha512-XZlnmdUZ32YjQnInsCFk/plKpkV/NXN1Ab4YoNvXN887MeR3Hr5ZsTyoblIW8AWwdfQiZHHphaPMb56lk6Ofdw==} peerDependencies: '@types/jest': ^26.0.14 || ^27.0.0 || ^28.0.0 || ^29.0.0 @@ -2239,6 +2239,7 @@ packages: dependencies: '@babel/runtime': 7.21.5 '@emotion/css-prettifier': 1.1.3 + '@types/jest': 29.5.4 chalk: 4.1.2 specificity: 0.4.1 stylis: 4.2.0 @@ -2518,25 +2519,17 @@ packages: jest-mock: 29.6.3 dev: true - /@jest/expect-utils@29.6.3: - resolution: {integrity: sha512-nvOEW4YoqRKD9HBJ9OJ6przvIvP9qilp5nAn1462P5ZlL/MM9SgPEZFyjTGPfs7QkocdUsJa6KjHhyRn4ueItA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - jest-get-type: 29.6.3 - dev: true - /@jest/expect-utils@29.6.4: resolution: {integrity: sha512-FEhkJhqtvBwgSpiTrocquJCdXPsyvNKcl/n7A3u7X4pVoF4bswm11c9d4AV+kfq2Gpv/mM8x7E7DsRvH+djkrg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: jest-get-type: 29.6.3 - dev: true /@jest/expect@29.6.3: resolution: {integrity: sha512-Ic08XbI2jlg6rECy+CGwk/8NDa6VE7UmIG6++9OTPAMnQmNGY28hu69Nf629CWv6T7YMODLbONxDFKdmQeI9FA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - expect: 29.6.3 + expect: 29.6.4 jest-snapshot: 29.6.3 transitivePeerDependencies: - supports-color @@ -2630,7 +2623,6 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@sinclair/typebox': 0.27.8 - dev: true /@jest/source-map@29.6.3: resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} @@ -2717,7 +2709,6 @@ packages: '@types/node': 18.17.9 '@types/yargs': 17.0.22 chalk: 4.1.2 - dev: true /@jridgewell/gen-mapping@0.3.3: resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} @@ -2956,7 +2947,6 @@ packages: /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - dev: true /@sinonjs/commons@2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} @@ -4133,19 +4123,23 @@ packages: /@types/istanbul-lib-coverage@2.0.4: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} - dev: true /@types/istanbul-lib-report@3.0.0: resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} dependencies: '@types/istanbul-lib-coverage': 2.0.4 - dev: true /@types/istanbul-reports@3.0.1: resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} dependencies: '@types/istanbul-lib-report': 3.0.0 - dev: true + + /@types/jest@29.5.4: + resolution: {integrity: sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A==} + dependencies: + expect: 29.6.4 + pretty-format: 29.6.3 + dev: false /@types/jsdom@20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} @@ -4173,7 +4167,6 @@ packages: /@types/node@18.17.9: resolution: {integrity: sha512-fxaKquqYcPOGwE7tC1anJaPJ0GHyOVzfA2oUoXECjBjrtsIz4YJvtNYsq8LUcjEUehEF+jGpx8Z+lFrtT6z0tg==} - dev: true /@types/node@20.4.7: resolution: {integrity: sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==} @@ -4220,7 +4213,6 @@ packages: /@types/stack-utils@2.0.1: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} - dev: true /@types/tough-cookie@4.0.2: resolution: {integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==} @@ -4228,13 +4220,11 @@ packages: /@types/yargs-parser@21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} - dev: true /@types/yargs@17.0.22: resolution: {integrity: sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==} dependencies: '@types/yargs-parser': 21.0.0 - dev: true /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.1.6): resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} @@ -4857,7 +4847,6 @@ packages: /ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} - dev: true /cjs-module-lexer@1.2.2: resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} @@ -5282,7 +5271,6 @@ packages: /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true /diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} @@ -5700,7 +5688,6 @@ packages: /escape-string-regexp@2.0.0: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} engines: {node: '>=8'} - dev: true /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -6091,17 +6078,6 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /expect@29.6.3: - resolution: {integrity: sha512-x1vY4LlEMWUYVZQrFi4ZANXFwqYbJ/JNQspLVvzhW2BNY28aNcXMQH6imBbt+RBf5sVRTodYHXtSP/TLEU0Dxw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/expect-utils': 29.6.3 - jest-get-type: 29.6.3 - jest-matcher-utils: 29.6.3 - jest-message-util: 29.6.3 - jest-util: 29.6.3 - dev: true - /expect@29.6.4: resolution: {integrity: sha512-F2W2UyQ8XYyftHT57dtfg8Ue3X5qLgm2sSug0ivvLRH/VKNRL/pDxg/TH7zVzbQB0tu80clNFy6LU7OS/VSEKA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -6111,7 +6087,6 @@ packages: jest-matcher-utils: 29.6.4 jest-message-util: 29.6.3 jest-util: 29.6.3 - dev: true /extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} @@ -6403,7 +6378,6 @@ packages: /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - dev: true /grapheme-splitter@1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} @@ -6950,7 +6924,7 @@ packages: dedent: 1.5.0 is-generator-fn: 2.1.0 jest-each: 29.6.3 - jest-matcher-utils: 29.6.3 + jest-matcher-utils: 29.6.4 jest-message-util: 29.6.3 jest-runtime: 29.6.3 jest-snapshot: 29.6.3 @@ -7035,16 +7009,6 @@ packages: - supports-color dev: true - /jest-diff@29.6.3: - resolution: {integrity: sha512-3sw+AdWnwH9sSNohMRKA7JiYUJSRr/WS6+sEFfBuhxU5V5GlEVKfvUn8JuMHE0wqKowemR1C2aHy8VtXbaV8dQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 29.6.3 - jest-get-type: 29.6.3 - pretty-format: 29.6.3 - dev: true - /jest-diff@29.6.4: resolution: {integrity: sha512-9F48UxR9e4XOEZvoUXEHSWY4qC4zERJaOfrbBg9JpbJOO43R1vN76REt/aMGZoY6GD5g84nnJiBIVlscegefpw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -7053,7 +7017,6 @@ packages: diff-sequences: 29.6.3 jest-get-type: 29.6.3 pretty-format: 29.6.3 - dev: true /jest-docblock@29.6.3: resolution: {integrity: sha512-2+H+GOTQBEm2+qFSQ7Ma+BvyV+waiIFxmZF5LdpBsAEjWX8QYjSCa4FrkIYtbfXUJJJnFCYrOtt6TZ+IAiTjBQ==} @@ -7111,7 +7074,6 @@ packages: /jest-get-type@29.6.3: resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true /jest-haste-map@29.6.3: resolution: {integrity: sha512-GecR5YavfjkhOytEFHAeI6aWWG3f/cOKNB1YJvj/B76xAmeVjy4zJUYobGF030cRmKaO1FBw3V8CZZ6KVh9ZSw==} @@ -7174,16 +7136,6 @@ packages: engines: {node: '>=6.16.0'} dev: true - /jest-matcher-utils@29.6.3: - resolution: {integrity: sha512-6ZrMYINZdwduSt5Xu18/n49O1IgXdjsfG7NEZaQws9k69eTKWKcVbJBw/MZsjOZe2sSyJFmuzh8042XWwl54Zg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - jest-diff: 29.6.3 - jest-get-type: 29.6.3 - pretty-format: 29.6.3 - dev: true - /jest-matcher-utils@29.6.4: resolution: {integrity: sha512-KSzwyzGvK4HcfnserYqJHYi7sZVqdREJ9DMPAKVbS98JsIAvumihaNUbjrWw0St7p9IY7A9UskCW5MYlGmBQFQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -7192,7 +7144,6 @@ packages: jest-diff: 29.6.4 jest-get-type: 29.6.3 pretty-format: 29.6.3 - dev: true /jest-message-util@29.6.3: resolution: {integrity: sha512-FtzaEEHzjDpQp51HX4UMkPZjy46ati4T5pEMyM6Ik48ztu4T9LQplZ6OsimHx7EuM9dfEh5HJa6D3trEftu3dA==} @@ -7207,7 +7158,6 @@ packages: pretty-format: 29.6.3 slash: 3.0.0 stack-utils: 2.0.6 - dev: true /jest-mock@29.6.3: resolution: {integrity: sha512-Z7Gs/mOyTSR4yPsaZ72a/MtuK6RnC3JYqWONe48oLaoEcYwEDxqvbXz85G4SJrm2Z5Ar9zp6MiHF4AlFlRM4Pg==} @@ -7344,16 +7294,16 @@ packages: '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.10) '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.10) '@babel/types': 7.22.10 - '@jest/expect-utils': 29.6.3 + '@jest/expect-utils': 29.6.4 '@jest/transform': 29.6.3 '@jest/types': 29.6.3 babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.10) chalk: 4.1.2 - expect: 29.6.3 + expect: 29.6.4 graceful-fs: 4.2.11 - jest-diff: 29.6.3 + jest-diff: 29.6.4 jest-get-type: 29.6.3 - jest-matcher-utils: 29.6.3 + jest-matcher-utils: 29.6.4 jest-message-util: 29.6.3 jest-util: 29.6.3 natural-compare: 1.4.0 @@ -7401,7 +7351,6 @@ packages: ci-info: 3.8.0 graceful-fs: 4.2.11 picomatch: 2.3.1 - dev: true /jest-validate@29.6.3: resolution: {integrity: sha512-e7KWZcAIX+2W1o3cHfnqpGajdCs1jSM3DkXjGeLSNmCazv1EeI1ggTeK5wdZhF+7N+g44JI2Od3veojoaumlfg==} @@ -8390,7 +8339,6 @@ packages: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 - dev: true /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} @@ -8463,7 +8411,6 @@ packages: /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - dev: true /react-router-dom@6.15.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-aR42t0fs7brintwBGAv2+mGlCtgtFQeOzK0BM1/OiqEzRejOZtpMZepvgkscpMUnKb8YO84G7s3LsHnnDNonbQ==} @@ -8972,7 +8919,6 @@ packages: engines: {node: '>=10'} dependencies: escape-string-regexp: 2.0.0 - dev: true /stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} diff --git a/rollup.config.mjs b/rollup.config.mjs index d7f4bdb67..b0e19160f 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -21,7 +21,7 @@ const external = id => [ ...Object.keys(pkg.dependencies || {}), ...Object.keys(pkg.peerDependencies || {}), - ...[], + ...['@jest/globals'], ].find(dep => new RegExp(`^${dep}`).test(id)) export default [ @@ -58,12 +58,12 @@ export default [ }), preserveShebangs(), PROFILE && - visualizer({ - brotliSize: true, - filename: '.reports/report.html', - gzipSize: true, - open: true, - }), + visualizer({ + brotliSize: true, + filename: '.reports/report.html', + gzipSize: true, + open: true, + }), ].filter(Boolean), }, { From c242dbfb1512751bda14ef22821f957f0b184cf2 Mon Sep 17 00:00:00 2001 From: QuiiBz Date: Mon, 28 Aug 2023 15:13:02 +0200 Subject: [PATCH 5/6] fix: review --- .eslintrc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index a0f67c67f..deabf7514 100644 --- a/.eslintrc +++ b/.eslintrc @@ -20,7 +20,6 @@ "files": [ "packages/changesets-renovate/**/*.ts{x,}", "packages/validate-icu-locales/**/*.ts{x,}", - "packages/jest-helpers/**/*.ts{x,}", "**/__tests__/**/*.ts{x,}" ], "parserOptions": { @@ -28,7 +27,15 @@ }, "extends": ["@scaleway/react/typescript"], "rules": { - "no-console": "off", + "no-console": "off" + } + }, + { + "files": [ + "packages/jest-helpers/**/*.ts{x,}", + "**/__tests__/**/*.ts{x,}" + ], + "rules": { "import/no-extraneous-dependencies": "off" } } From e6794fd153ee091b2c35295e1e0666050d3a4343 Mon Sep 17 00:00:00 2001 From: QuiiBz Date: Tue, 29 Aug 2023 15:02:19 +0200 Subject: [PATCH 6/6] fix: lockfile --- pnpm-lock.yaml | 36 ++++++++++-------------------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8af2a6e22..b48373b80 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -200,7 +200,7 @@ importers: version: 11.11.0 '@emotion/jest': specifier: 11.11.0 - version: 11.11.0 + version: 11.11.0(@types/jest@29.5.4) '@emotion/react': specifier: 11.11.1 version: 11.11.1(@types/react@18.2.21)(react@18.2.0) @@ -2217,7 +2217,7 @@ packages: resolution: {integrity: sha512-gJB6HLm5rYwSLI6PQa+X1t5CFGrv1J1TWG+sOyMCeKz2ojaj6Fnl/rZEspogG+cvqbt4AE/2eIyD2QfLKTBNlQ==} dev: false - /@emotion/jest@11.11.0: + /@emotion/jest@11.11.0(@types/jest@29.5.4): resolution: {integrity: sha512-XZlnmdUZ32YjQnInsCFk/plKpkV/NXN1Ab4YoNvXN887MeR3Hr5ZsTyoblIW8AWwdfQiZHHphaPMb56lk6Ofdw==} peerDependencies: '@types/jest': ^26.0.14 || ^27.0.0 || ^28.0.0 || ^29.0.0 @@ -2230,6 +2230,7 @@ packages: dependencies: '@babel/runtime': 7.21.5 '@emotion/css-prettifier': 1.1.3 + '@types/jest': 29.5.4 chalk: 4.1.2 specificity: 0.4.1 stylis: 4.2.0 @@ -2504,7 +2505,6 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: jest-get-type: 29.6.3 - dev: true /@jest/expect@29.6.4: resolution: {integrity: sha512-Warhsa7d23+3X5bLbrbYvaehcgX5TLYhI03JKoedTiI8uJU4IhqYBWF7OSSgUyz4IgLpUYPkK0AehA5/fRclAA==} @@ -2582,7 +2582,6 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@sinclair/typebox': 0.27.8 - dev: true /@jest/source-map@29.6.3: resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} @@ -2646,7 +2645,6 @@ packages: '@types/node': 18.17.9 '@types/yargs': 17.0.22 chalk: 4.1.2 - dev: true /@jridgewell/gen-mapping@0.3.3: resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} @@ -2885,7 +2883,6 @@ packages: /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - dev: true /@sinonjs/commons@2.0.0: resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} @@ -4062,19 +4059,23 @@ packages: /@types/istanbul-lib-coverage@2.0.4: resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} - dev: true /@types/istanbul-lib-report@3.0.0: resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} dependencies: '@types/istanbul-lib-coverage': 2.0.4 - dev: true /@types/istanbul-reports@3.0.1: resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} dependencies: '@types/istanbul-lib-report': 3.0.0 - dev: true + + /@types/jest@29.5.4: + resolution: {integrity: sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A==} + dependencies: + expect: 29.6.4 + pretty-format: 29.6.3 + dev: false /@types/jsdom@20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} @@ -4102,7 +4103,6 @@ packages: /@types/node@18.17.9: resolution: {integrity: sha512-fxaKquqYcPOGwE7tC1anJaPJ0GHyOVzfA2oUoXECjBjrtsIz4YJvtNYsq8LUcjEUehEF+jGpx8Z+lFrtT6z0tg==} - dev: true /@types/node@20.4.7: resolution: {integrity: sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==} @@ -4149,7 +4149,6 @@ packages: /@types/stack-utils@2.0.1: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} - dev: true /@types/tough-cookie@4.0.2: resolution: {integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==} @@ -4157,13 +4156,11 @@ packages: /@types/yargs-parser@21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} - dev: true /@types/yargs@17.0.22: resolution: {integrity: sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==} dependencies: '@types/yargs-parser': 21.0.0 - dev: true /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.1.6): resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} @@ -4786,7 +4783,6 @@ packages: /ci-info@3.8.0: resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} engines: {node: '>=8'} - dev: true /cjs-module-lexer@1.2.2: resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} @@ -5211,7 +5207,6 @@ packages: /diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true /diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} @@ -5629,7 +5624,6 @@ packages: /escape-string-regexp@2.0.0: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} engines: {node: '>=8'} - dev: true /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -6029,7 +6023,6 @@ packages: jest-matcher-utils: 29.6.4 jest-message-util: 29.6.3 jest-util: 29.6.3 - dev: true /extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} @@ -6321,7 +6314,6 @@ packages: /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - dev: true /grapheme-splitter@1.0.4: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} @@ -6961,7 +6953,6 @@ packages: diff-sequences: 29.6.3 jest-get-type: 29.6.3 pretty-format: 29.6.3 - dev: true /jest-docblock@29.6.3: resolution: {integrity: sha512-2+H+GOTQBEm2+qFSQ7Ma+BvyV+waiIFxmZF5LdpBsAEjWX8QYjSCa4FrkIYtbfXUJJJnFCYrOtt6TZ+IAiTjBQ==} @@ -7019,7 +7010,6 @@ packages: /jest-get-type@29.6.3: resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dev: true /jest-haste-map@29.6.4: resolution: {integrity: sha512-12Ad+VNTDHxKf7k+M65sviyynRoZYuL1/GTuhEVb8RYsNSNln71nANRb/faSyWvx0j+gHcivChXHIoMJrGYjog==} @@ -7071,7 +7061,6 @@ packages: jest-diff: 29.6.4 jest-get-type: 29.6.3 pretty-format: 29.6.3 - dev: true /jest-message-util@29.6.3: resolution: {integrity: sha512-FtzaEEHzjDpQp51HX4UMkPZjy46ati4T5pEMyM6Ik48ztu4T9LQplZ6OsimHx7EuM9dfEh5HJa6D3trEftu3dA==} @@ -7086,7 +7075,6 @@ packages: pretty-format: 29.6.3 slash: 3.0.0 stack-utils: 2.0.6 - dev: true /jest-mock@29.6.3: resolution: {integrity: sha512-Z7Gs/mOyTSR4yPsaZ72a/MtuK6RnC3JYqWONe48oLaoEcYwEDxqvbXz85G4SJrm2Z5Ar9zp6MiHF4AlFlRM4Pg==} @@ -7252,7 +7240,6 @@ packages: ci-info: 3.8.0 graceful-fs: 4.2.11 picomatch: 2.3.1 - dev: true /jest-validate@29.6.3: resolution: {integrity: sha512-e7KWZcAIX+2W1o3cHfnqpGajdCs1jSM3DkXjGeLSNmCazv1EeI1ggTeK5wdZhF+7N+g44JI2Od3veojoaumlfg==} @@ -8221,7 +8208,6 @@ packages: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 react-is: 18.2.0 - dev: true /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} @@ -8294,7 +8280,6 @@ packages: /react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} - dev: true /react-router-dom@6.15.0(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-aR42t0fs7brintwBGAv2+mGlCtgtFQeOzK0BM1/OiqEzRejOZtpMZepvgkscpMUnKb8YO84G7s3LsHnnDNonbQ==} @@ -8803,7 +8788,6 @@ packages: engines: {node: '>=10'} dependencies: escape-string-regexp: 2.0.0 - dev: true /stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==}