From cad000c62f7fba750ef775a8005dd2fb3098bd2f Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Sun, 14 Jul 2024 20:11:14 +0200 Subject: [PATCH 1/9] prepare running jest & vitest in CI --- package.json | 2 +- packages/benchmark/package.json | 4 +- packages/example/app/__tests__/Clock.test.tsx | 9 + .../example/app/__tests__/ClockHands.test.tsx | 9 + .../__snapshots__/Clock.test.tsx.snap | 98 +++++++++ .../__snapshots__/ClockHands.test.tsx.snap | 15 ++ packages/example/jest.config.js | 1 + packages/example/package.json | 18 +- packages/next-yak/package.json | 4 +- packages/playground/package.json | 4 +- pnpm-lock.yaml | 197 ++++++------------ 11 files changed, 217 insertions(+), 144 deletions(-) create mode 100644 packages/example/app/__tests__/Clock.test.tsx create mode 100644 packages/example/app/__tests__/ClockHands.test.tsx create mode 100644 packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap create mode 100644 packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap diff --git a/package.json b/package.json index 06d35393..ee933bec 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "build": "pnpm run --filter=next-yak build", "watch": "pnpm run --filter=next-yak watch", "example": "pnpm --filter=next-yak-example run dev", - "test": "pnpm --filter=next-yak --filter=webpack-tests run \"/test($|:types)/\"", + "test": "pnpm run build && pnpm --filter=next-yak --filter=webpack-tests --filter=next-yak-example run \"/test($|:types)/\"", "test:watch": "pnpm --filter=next-yak run test:watch", "package:types": "npx --package=@arethetypeswrong/cli attw --pack packages/next-yak", "prettier": "pnpm run --recursive --if-present prettier" diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index 961886aa..83a3b0e5 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -16,8 +16,8 @@ }, "dependencies": { "next": "14.2.4", - "react": "18.2.0", - "react-dom": "18.2.0", + "react": "18.3.1", + "react-dom": "18.3.1", "next-yak": "workspace:*", "styled-components": "6.1.1" }, diff --git a/packages/example/app/__tests__/Clock.test.tsx b/packages/example/app/__tests__/Clock.test.tsx new file mode 100644 index 00000000..ec94f82e --- /dev/null +++ b/packages/example/app/__tests__/Clock.test.tsx @@ -0,0 +1,9 @@ +/// +import React from 'react'; +import { render } from '@testing-library/react'; +import { Clock } from '../Clock'; + +test('renders Clock component', () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); +}); \ No newline at end of file diff --git a/packages/example/app/__tests__/ClockHands.test.tsx b/packages/example/app/__tests__/ClockHands.test.tsx new file mode 100644 index 00000000..3a6448e0 --- /dev/null +++ b/packages/example/app/__tests__/ClockHands.test.tsx @@ -0,0 +1,9 @@ +/// +import React from 'react'; +import { render } from '@testing-library/react'; +import { ClockHands } from '../ClockHands'; + +test('renders ClockHands component', () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); +}); \ No newline at end of file diff --git a/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap b/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap new file mode 100644 index 00000000..6ff50864 --- /dev/null +++ b/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap @@ -0,0 +1,98 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`renders Clock component 1`] = ` + +
+
+
+
+ 12 +
+
+ 1 +
+
+ 2 +
+
+ 3 +
+
+ 4 +
+
+ 5 +
+
+ 6 +
+
+ 7 +
+
+ 8 +
+
+ 9 +
+
+ 10 +
+
+ 11 +
+
+
+
+
+
+ +`; diff --git a/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap b/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap new file mode 100644 index 00000000..2caacfdd --- /dev/null +++ b/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap @@ -0,0 +1,15 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`renders ClockHands component 1`] = ` + +
+
+
+ +`; diff --git a/packages/example/jest.config.js b/packages/example/jest.config.js index e125f856..9fea2c53 100644 --- a/packages/example/jest.config.js +++ b/packages/example/jest.config.js @@ -6,6 +6,7 @@ const createJestConfig = nextJest({ dir: './' }) // Any custom config you want to pass to Jest const customJestConfig = { setupFilesAfterEnv: [], + testEnvironment: 'jsdom', } // createJestConfig is exported in this way to ensure that next/jest can load the Next.js configuration, which is async diff --git a/packages/example/package.json b/packages/example/package.json index aa1bc1d0..56a27861 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -9,7 +9,9 @@ "build:yak": "pnpm run --filter next-yak build", "start": "next start", "lint": "next lint", - "test": "jest", + "test": "pnpm run test:vitest && pnpm run test:jest", + "test:vitest": "vitest run --globals --environment=jsdom", + "test:jest": "jest", "test:watch": "jest --watch -u" }, "dependencies": { @@ -17,15 +19,19 @@ "@types/react": "18.2.28", "@types/react-dom": "18.2.7", "next": "14.2.4", - "react": "18.2.0", - "react-dom": "18.2.0", - "typescript": "5.5.2", - "next-yak": "workspace:*" + "next-yak": "workspace:*", + "react": "18.3.1", + "react-dom": "18.3.1", + "typescript": "5.5.2" }, "devDependencies": { "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^14.0.0", + "@vitejs/plugin-react": "^4.2.1", + "@types/jest": "^29.5.12", "jest": "^29.6.2", - "jest-environment-jsdom": "^29.6.2" + "vitest": "0.34.5", + "jest-environment-jsdom": "^29.6.2", + "jsdom": "^22.1.0" } } diff --git a/packages/next-yak/package.json b/packages/next-yak/package.json index 48246517..03164748 100644 --- a/packages/next-yak/package.json +++ b/packages/next-yak/package.json @@ -87,8 +87,8 @@ "@types/react-test-renderer": "^18.0.3", "jsdom": "^22.1.0", "next": "14.2.4", - "react": "^18.2.0", - "react-test-renderer": "^18.2.0", + "react": "18.3.1", + "react-test-renderer": "18.3.1", "typescript": "5.5.2", "vite": "^4.4.9", "vitest": "0.34.5", diff --git a/packages/playground/package.json b/packages/playground/package.json index 840b1306..b9e423ab 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -25,8 +25,8 @@ "@babel/standalone": "^7.24.4", "monaco-editor": "^0.46.0", "next-yak": "workspace:*", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "react": "18.3.1", + "react-dom": "18.3.1", "react-resizable-panels": "^2.0.16" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ce06a184..4a416c46 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,19 +16,19 @@ importers: dependencies: next: specifier: 14.2.4 - version: 14.2.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + version: 14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1) next-yak: specifier: workspace:* version: link:../next-yak react: - specifier: 18.2.0 - version: 18.2.0 + specifier: 18.3.1 + version: 18.3.1 react-dom: - specifier: 18.2.0 - version: 18.2.0(react@18.2.0) + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) styled-components: specifier: 6.1.1 - version: 6.1.1(react-dom@18.2.0)(react@18.2.0) + version: 6.1.1(react-dom@18.3.1)(react@18.3.1) devDependencies: '@codspeed/benchmark.js-plugin': specifier: 2.2.0 @@ -86,16 +86,16 @@ importers: version: 18.2.7 next: specifier: 14.2.4 - version: 14.2.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + version: 14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1) next-yak: specifier: workspace:* version: link:../next-yak react: - specifier: 18.2.0 - version: 18.2.0 + specifier: 18.3.1 + version: 18.3.1 react-dom: - specifier: 18.2.0 - version: 18.2.0(react@18.2.0) + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) typescript: specifier: 5.5.2 version: 5.5.2 @@ -105,13 +105,25 @@ importers: version: 5.17.0 '@testing-library/react': specifier: ^14.0.0 - version: 14.0.0(react-dom@18.2.0)(react@18.2.0) + version: 14.0.0(react-dom@18.3.1)(react@18.3.1) + '@types/jest': + specifier: ^29.5.12 + version: 29.5.12 + '@vitejs/plugin-react': + specifier: ^4.2.1 + version: 4.2.1(vite@5.1.0) jest: specifier: ^29.6.2 version: 29.6.2(@types/node@20.4.5) jest-environment-jsdom: specifier: ^29.6.2 version: 29.6.2 + jsdom: + specifier: ^22.1.0 + version: 22.1.0 + vitest: + specifier: 0.34.5 + version: 0.34.5(jsdom@22.1.0) packages/next-yak: dependencies: @@ -130,7 +142,7 @@ importers: version: 5.17.0 '@testing-library/react': specifier: ^14.0.0 - version: 14.0.0(react-dom@18.3.1)(react@18.2.0) + version: 14.0.0(react-dom@18.3.1)(react@18.3.1) '@types/babel__core': specifier: ^7.1.14 version: 7.1.14 @@ -157,13 +169,13 @@ importers: version: 22.1.0 next: specifier: 14.2.4 - version: 14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.2.0) + version: 14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1) react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: 18.3.1 + version: 18.3.1 react-test-renderer: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) tsup: specifier: 7.2.0 version: 7.2.0(typescript@5.5.2) @@ -195,14 +207,14 @@ importers: specifier: workspace:* version: link:../next-yak react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: 18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) react-resizable-panels: specifier: ^2.0.16 - version: 2.0.16(react-dom@18.2.0)(react@18.2.0) + version: 2.0.16(react-dom@18.3.1)(react@18.3.1) devDependencies: '@shikijs/monaco': specifier: ^1.1.1 @@ -2660,21 +2672,7 @@ packages: redent: 3.0.0 dev: true - /@testing-library/react@14.0.0(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==} - engines: {node: '>=14'} - peerDependencies: - react: ^18.0.0 - react-dom: ^18.0.0 - dependencies: - '@babel/runtime': 7.24.7 - '@testing-library/dom': 9.3.4 - '@types/react-dom': 18.2.13 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: true - - /@testing-library/react@14.0.0(react-dom@18.3.1)(react@18.2.0): + /@testing-library/react@14.0.0(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==} engines: {node: '>=14'} peerDependencies: @@ -2684,8 +2682,8 @@ packages: '@babel/runtime': 7.24.7 '@testing-library/dom': 9.3.4 '@types/react-dom': 18.2.13 - react: 18.2.0 - react-dom: 18.3.1(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) dev: true /@tootallnate/once@2.0.0: @@ -2815,6 +2813,13 @@ packages: '@types/istanbul-lib-report': 3.0.3 dev: true + /@types/jest@29.5.12: + resolution: {integrity: sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==} + dependencies: + expect: 29.7.0 + pretty-format: 29.7.0 + dev: true + /@types/jest@29.5.5: resolution: {integrity: sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg==} dependencies: @@ -2903,7 +2908,7 @@ packages: /@types/testing-library__jest-dom@5.14.9: resolution: {integrity: sha512-FSYhIjFlfOpGSRyVoMBMuS3ws5ehFQODymf3vlI7U1K8c7PHwWwFY7VREfmsuzHSOnoKs/9/Y983ayOs7eRzqw==} dependencies: - '@types/jest': 29.5.5 + '@types/jest': 29.5.12 dev: true /@types/tough-cookie@4.0.5: @@ -3211,7 +3216,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.24.7) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.1.0(terser@5.28.1) + vite: 5.1.0(@types/node@20.4.5) transitivePeerDependencies: - supports-color dev: true @@ -7370,49 +7375,7 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - /next@14.2.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-R8/V7vugY+822rsQGQCjoLhMuC9oFj9SOi4Cl4b2wjDrseD0LRZ10W7R6Czo4w9ZznVSshKjuIomsRjvm9EKJQ==} - engines: {node: '>=18.17.0'} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.41.2 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - '@playwright/test': - optional: true - sass: - optional: true - dependencies: - '@next/env': 14.2.4 - '@swc/helpers': 0.5.5 - busboy: 1.6.0 - caniuse-lite: 1.0.30001640 - graceful-fs: 4.2.11 - postcss: 8.4.31 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.23.2)(react@18.2.0) - optionalDependencies: - '@next/swc-darwin-arm64': 14.2.4 - '@next/swc-darwin-x64': 14.2.4 - '@next/swc-linux-arm64-gnu': 14.2.4 - '@next/swc-linux-arm64-musl': 14.2.4 - '@next/swc-linux-x64-gnu': 14.2.4 - '@next/swc-linux-x64-musl': 14.2.4 - '@next/swc-win32-arm64-msvc': 14.2.4 - '@next/swc-win32-ia32-msvc': 14.2.4 - '@next/swc-win32-x64-msvc': 14.2.4 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - dev: false - - /next@14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.2.0): + /next@14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-R8/V7vugY+822rsQGQCjoLhMuC9oFj9SOi4Cl4b2wjDrseD0LRZ10W7R6Czo4w9ZznVSshKjuIomsRjvm9EKJQ==} engines: {node: '>=18.17.0'} hasBin: true @@ -7436,9 +7399,9 @@ packages: caniuse-lite: 1.0.30001640 graceful-fs: 4.2.11 postcss: 8.4.31 - react: 18.2.0 - react-dom: 18.3.1(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.23.2)(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.23.2)(react@18.3.1) optionalDependencies: '@next/swc-darwin-arm64': 14.2.4 '@next/swc-darwin-x64': 14.2.4 @@ -7452,7 +7415,6 @@ packages: transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - dev: true /node-gyp-build@4.8.1: resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} @@ -8078,25 +8040,6 @@ packages: engines: {node: '>= 0.6'} dev: false - /react-dom@18.2.0(react@18.2.0): - resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} - peerDependencies: - react: ^18.2.0 - dependencies: - loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.2 - - /react-dom@18.3.1(react@18.2.0): - resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} - peerDependencies: - react: ^18.3.1 - dependencies: - loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.2 - dev: true - /react-dom@18.3.1(react@18.3.1): resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} peerDependencies: @@ -8105,7 +8048,6 @@ packages: loose-envify: 1.4.0 react: 18.3.1 scheduler: 0.23.2 - dev: false /react-fast-compare@3.2.2: resolution: {integrity: sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==} @@ -8187,14 +8129,14 @@ packages: use-sidecar: 1.1.2(@types/react@18.2.29)(react@18.3.1) dev: false - /react-resizable-panels@2.0.16(react-dom@18.2.0)(react@18.2.0): + /react-resizable-panels@2.0.16(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-UrnxmTZaTnbCl/xIOX38ig35RicqGfLuqt2x5fytpNlQvCRuxyXZwIBEhmF+pmrEGxfajyXFBoCplNxLvhF0CQ==} peerDependencies: react: ^16.14.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.14.0 || ^17.0.0 || ^18.0.0 dependencies: - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) dev: false /react-router-dom@6.24.1(react-dom@18.3.1)(react@18.3.1): @@ -8220,13 +8162,13 @@ packages: react: 18.3.1 dev: false - /react-shallow-renderer@16.15.0(react@18.2.0): + /react-shallow-renderer@16.15.0(react@18.3.1): resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==} peerDependencies: react: ^16.0.0 || ^17.0.0 || ^18.0.0 dependencies: object-assign: 4.1.1 - react: 18.2.0 + react: 18.3.1 react-is: 18.3.1 dev: true @@ -8255,29 +8197,22 @@ packages: tslib: 2.6.3 dev: false - /react-test-renderer@18.2.0(react@18.2.0): - resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==} + /react-test-renderer@18.3.1(react@18.3.1): + resolution: {integrity: sha512-KkAgygexHUkQqtvvx/otwxtuFu5cVjfzTCtjXLH9boS19/Nbtg84zS7wIQn39G8IlrhThBpQsMKkq5ZHZIYFXA==} peerDependencies: - react: ^18.2.0 + react: ^18.3.1 dependencies: - react: 18.2.0 + react: 18.3.1 react-is: 18.3.1 - react-shallow-renderer: 16.15.0(react@18.2.0) + react-shallow-renderer: 16.15.0(react@18.3.1) scheduler: 0.23.2 dev: true - /react@18.2.0: - resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} - engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - /react@18.3.1: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} dependencies: loose-envify: 1.4.0 - dev: false /read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} @@ -8952,7 +8887,7 @@ packages: inline-style-parser: 0.2.3 dev: false - /styled-components@6.1.1(react-dom@18.2.0)(react@18.2.0): + /styled-components@6.1.1(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-cpZZP5RrKRIClBW5Eby4JM1wElLVP4NQrJbJ0h10TidTyJf4SIIwa3zLXOoPb4gJi8MsJ8mjq5mu2IrEhZIAcQ==} engines: {node: '>= 16'} peerDependencies: @@ -8965,14 +8900,14 @@ packages: css-to-react-native: 3.2.0 csstype: 3.1.3 postcss: 8.4.39 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) shallowequal: 1.1.0 stylis: 4.3.2 tslib: 2.6.3 dev: false - /styled-jsx@5.1.1(@babel/core@7.23.2)(react@18.2.0): + /styled-jsx@5.1.1(@babel/core@7.23.2)(react@18.3.1): resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} peerDependencies: @@ -8987,7 +8922,7 @@ packages: dependencies: '@babel/core': 7.23.2 client-only: 0.0.1 - react: 18.2.0 + react: 18.3.1 /stylis@4.3.2: resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==} From da8eb5494b48cc372fb230d0f9f36e40e8c236e6 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 14 Jul 2024 18:14:48 +0000 Subject: [PATCH 2/9] [autofix.ci] apply automated fixes --- packages/example/app/__tests__/Clock.test.tsx | 14 +++++++------- packages/example/app/__tests__/ClockHands.test.tsx | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/packages/example/app/__tests__/Clock.test.tsx b/packages/example/app/__tests__/Clock.test.tsx index ec94f82e..81dc7fa9 100644 --- a/packages/example/app/__tests__/Clock.test.tsx +++ b/packages/example/app/__tests__/Clock.test.tsx @@ -1,9 +1,9 @@ /// -import React from 'react'; -import { render } from '@testing-library/react'; -import { Clock } from '../Clock'; +import React from "react"; +import { render } from "@testing-library/react"; +import { Clock } from "../Clock"; -test('renders Clock component', () => { - const { asFragment } = render(); - expect(asFragment()).toMatchSnapshot(); -}); \ No newline at end of file +test("renders Clock component", () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); +}); diff --git a/packages/example/app/__tests__/ClockHands.test.tsx b/packages/example/app/__tests__/ClockHands.test.tsx index 3a6448e0..9ffa7357 100644 --- a/packages/example/app/__tests__/ClockHands.test.tsx +++ b/packages/example/app/__tests__/ClockHands.test.tsx @@ -1,9 +1,9 @@ /// -import React from 'react'; -import { render } from '@testing-library/react'; -import { ClockHands } from '../ClockHands'; +import React from "react"; +import { render } from "@testing-library/react"; +import { ClockHands } from "../ClockHands"; -test('renders ClockHands component', () => { - const { asFragment } = render(); - expect(asFragment()).toMatchSnapshot(); -}); \ No newline at end of file +test("renders ClockHands component", () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); +}); From 451833dd680a26ba3079fde3bc72e10ab01e5115 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Mon, 22 Jul 2024 15:44:34 +0200 Subject: [PATCH 3/9] upgrade vite --- .../loaders/__tests__/cssloader.test.ts | 6 +- .../loaders/__tests__/parseCss.test.ts | 18 +- .../next-yak/loaders/__tests__/toCss.test.ts | 4 +- .../loaders/__tests__/tsloader.test.ts | 324 +++++------ packages/next-yak/package.json | 6 +- packages/playground/package.json | 2 +- packages/webpack-tests/package.json | 4 +- pnpm-lock.yaml | 548 ++++++++++-------- 8 files changed, 481 insertions(+), 431 deletions(-) diff --git a/packages/next-yak/loaders/__tests__/cssloader.test.ts b/packages/next-yak/loaders/__tests__/cssloader.test.ts index e71e074a..4d511543 100644 --- a/packages/next-yak/loaders/__tests__/cssloader.test.ts +++ b/packages/next-yak/loaders/__tests__/cssloader.test.ts @@ -358,12 +358,12 @@ const headline = css\` ).toMatchInlineSnapshot(` ".headline { :before { - content: \\"\\\\2022\\"; + content: "\\2022"; } :after { - content: \\"\\\\2022\\"; + content: "\\2022"; } - content: \\"\\\\\\\\\\" + content: "\\\\" ; }" `); diff --git a/packages/next-yak/loaders/__tests__/parseCss.test.ts b/packages/next-yak/loaders/__tests__/parseCss.test.ts index 851f8f6e..cdb32799 100644 --- a/packages/next-yak/loaders/__tests__/parseCss.test.ts +++ b/packages/next-yak/loaders/__tests__/parseCss.test.ts @@ -184,7 +184,7 @@ test("parseCss inComplete css 1 ending inside a double quote string", () => { "type": "selector", }, ], - "value": "url(\\"https://example.com + "value": "url("https://example.com ", }, ], @@ -203,7 +203,7 @@ test("parseCss inComplete css 1 ending inside a double quote string", () => { "type": "selector", }, ], - "value": "url(\\"https://example.com + "value": "url("https://example.com ", }, "currentScopes": [ @@ -218,7 +218,7 @@ test("parseCss inComplete css 1 ending inside a double quote string", () => { ], "isInsideAtRule": false, "isInsidePropertyValue": true, - "isInsideString": "\\"", + "isInsideString": """, }, } `); @@ -413,7 +413,7 @@ test("parseCss complete css with @media rule", () => { "type": "selector", }, ], - "value": "url(\\"https://example.com\\")", + "value": "url("https://example.com")", }, { "closed": true, @@ -447,7 +447,7 @@ test("parseCss complete css with @media rule", () => { "type": "selector", }, ], - "value": "url(\\"https://example.com\\")", + "value": "url("https://example.com")", }, { "closed": true, @@ -633,7 +633,7 @@ test("parseCss inComplete css 1 ending outside a // comment", () => { test("Handles escaped backslashes in strings", () => { expect( parseCss(`a { content: "\\\\"; }`).declarations[0].value, - ).toMatchInlineSnapshot('"\\"\\\\\\\\\\""'); + ).toMatchInlineSnapshot(`""\\\\""`); }); test("Handles empty declarations", () => { @@ -651,7 +651,7 @@ test("Handles empty declarations", () => { "type": "selector", }, ], - "value": "\\"blue\\"", + "value": ""blue"", }, { "closed": true, @@ -706,8 +706,8 @@ test("Handles newlines in property values", () => { "type": "selector", }, ], - "value": "\\"line1 - line2\\"", + "value": ""line1 + line2"", }, ] `); diff --git a/packages/next-yak/loaders/__tests__/toCss.test.ts b/packages/next-yak/loaders/__tests__/toCss.test.ts index 0b6c0fa7..e6720e06 100644 --- a/packages/next-yak/loaders/__tests__/toCss.test.ts +++ b/packages/next-yak/loaders/__tests__/toCss.test.ts @@ -131,8 +131,8 @@ test("handles escapes correctly", () => { ).toMatchInlineSnapshot(` " .foo { - content: \\"line1\\\\ - line2\\"; + content: "line1\\ + line2"; }" `); }); diff --git a/packages/next-yak/loaders/__tests__/tsloader.test.ts b/packages/next-yak/loaders/__tests__/tsloader.test.ts index 3829b60a..448f4aab 100644 --- a/packages/next-yak/loaders/__tests__/tsloader.test.ts +++ b/packages/next-yak/loaders/__tests__/tsloader.test.ts @@ -56,11 +56,11 @@ export const Main = () =>

Hello World

$primary ? /*#__PURE__*/css(__styleYak.Button__$primary) : /*#__PURE__*/css(__styleYak.Button__not_$primary), { - \\"style\\": { - \\"--Button__width_18fi82j\\": __yak_unitPostFix(({ + "style": { + "--Button__width_18fi82j": __yak_unitPostFix(({ $iconWidth - }) => $iconWidth, \\"px\\") + }) => $iconWidth, "px") } }); const FancyButton = @@ -278,9 +278,9 @@ const FancyButton = styled(Button)\` `, ), ).toMatchInlineSnapshot(` - "import styles from \\"./page.module.css\\"; - import { styled, css } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import styles from "./page.module.css"; + import { styled, css } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const x = Math.random(); const Button = /*YAK Extracted CSS: @@ -300,7 +300,7 @@ const FancyButton = styled(Button)\` /*#__PURE__*/ styled.button(__styleYak.Button, ({ theme - }) => theme.mode === \\"dark\\" && /*#__PURE__*/css(__styleYak.Button__Button)); + }) => theme.mode === "dark" && /*#__PURE__*/css(__styleYak.Button__Button)); const FancyButton = /*YAK Extracted CSS: .FancyButton { @@ -326,8 +326,8 @@ const headline = styled.input.attrs({ `, ), ).toMatchInlineSnapshot(` - "import { styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const headline = /*YAK Extracted CSS: .headline { @@ -335,7 +335,7 @@ const headline = styled.input.attrs({ }*/ /*#__PURE__*/ styled.input.attrs({ - type: \\"text\\" + type: "text" })(__styleYak.headline);" `); }); @@ -359,8 +359,8 @@ const newHeadline = styled(headline).attrs({ `, ), ).toMatchInlineSnapshot(` - "import { styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const headline = /*YAK Extracted CSS: .headline { @@ -375,7 +375,7 @@ const newHeadline = styled(headline).attrs({ }*/ /*#__PURE__*/ styled(headline).attrs({ - type: \\"text\\" + type: "text" })(__styleYak.newHeadline);" `); }); @@ -398,10 +398,10 @@ const headline = css\` `, ), ).toMatchInlineSnapshot(` - "import styles from \\"./page.module.css\\"; - import { css } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; - import { easing } from \\"styleguide\\"; + "import styles from "./page.module.css"; + import { css } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; + import { easing } from "styleguide"; const headline = /*YAK Extracted CSS: .headline { @@ -416,11 +416,11 @@ const headline = css\` }*/ /*#__PURE__*/ css(__styleYak.headline, css\`color: orange\`, css\`color: blue\`, { - \\"style\\": { - \\"--headline__transition_18fi82j\\": ({ + "style": { + "--headline__transition_18fi82j": ({ i - }) => i * 100 + \\"ms\\", - \\"--headline__transition_18fi82j_1\\": ({ + }) => i * 100 + "ms", + "--headline__transition_18fi82j_1": ({ easing }) => easing } @@ -451,9 +451,9 @@ const FadeInButton = styled.button\` `, ), ).toMatchInlineSnapshot(` - "import styles from \\"./page.module.css\\"; - import { styled, keyframes } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import styles from "./page.module.css"; + import { styled, keyframes } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const fadeIn = /*YAK Extracted CSS: @keyframes fadeIn { @@ -508,8 +508,8 @@ const Wrapper = styled.div\` `, ), ).toMatchInlineSnapshot(` - "import { styled, keyframes } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { styled, keyframes } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Link = /*YAK Extracted CSS: .Link { @@ -571,8 +571,8 @@ const Wrapper = styled.div\` `, ), ).toMatchInlineSnapshot(` - "import { styled, keyframes } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { styled, keyframes } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Link = /*YAK Extracted CSS: .Link {} @@ -619,9 +619,9 @@ const Wrapper = styled.div\` \``, ), ).toMatchInlineSnapshot(` - "import { css } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; - import { queries } from \\"@/theme/constants.yak\\"; + "import { css } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; + import { queries } from "@/theme/constants.yak"; const headline = /*YAK Extracted CSS: .headline { @@ -636,7 +636,7 @@ const Wrapper = styled.div\` } .headline { &:before { - content: \\"\\\\2022\\"; + content: "\\2022"; } }*/ /*#__PURE__*/ @@ -667,9 +667,9 @@ const Icon = styled.div\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 11: Mixins are not allowed inside nested selectors + [Error: /some/special/path/page.tsx: line 11: Mixins are not allowed inside nested selectors found: \${bold} - Use an inline css literal instead or move the selector into the mixin" + Use an inline css literal instead or move the selector into the mixin] `); }); @@ -694,9 +694,9 @@ const Icon = styled.div\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 11: Mixins are not allowed inside nested selectors + [Error: /some/special/path/page.tsx: line 11: Mixins are not allowed inside nested selectors found: \${bold()} - Use an inline css literal instead or move the selector into the mixin" + Use an inline css literal instead or move the selector into the mixin] `); }); @@ -743,9 +743,9 @@ const Icon = styled.div\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 6: Module constants are not allowed in this context + [Error: /some/special/path/page.tsx: line 6: Module constants are not allowed in this context found: \${test} - Use the 'experiments.crossFileSelectors' option to enable cross file selectors" + Use the 'experiments.crossFileSelectors' option to enable cross file selectors] `); }); @@ -765,9 +765,9 @@ const headline = css\` `, ), ).toMatchInlineSnapshot(` - "import { styled, css } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; - const red = \\"#E50914\\"; + "import { styled, css } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; + const red = "#E50914"; const zIndex = 14; const headline = /*YAK Extracted CSS: @@ -794,8 +794,8 @@ const headline = css\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 6: Could not resolve value for red - found: \${red}" + [Error: /some/special/path/page.tsx: line 6: Could not resolve value for red + found: \${red}] `); }); @@ -817,8 +817,8 @@ const headline = css\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 9: Could not resolve value for $red - found: \${$red}" + [Error: /some/special/path/page.tsx: line 9: Could not resolve value for $red + found: \${$red}] `); }); @@ -840,12 +840,12 @@ const headline = css\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 9: Possible constant used as runtime value for a css variable + [Error: /some/special/path/page.tsx: line 9: Possible constant used as runtime value for a css variable found: \${red()} Please move the constant to a .yak import or use an arrow function e.g.: | import { primaryColor } from './foo.yak' - | const MyStyledDiv = styled.div\`color: \${primaryColor};\`" + | const MyStyledDiv = styled.div\`color: \${primaryColor};\`] `); }); @@ -867,12 +867,12 @@ const headline = css\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 9: Possible constant used as runtime value for a css variable + [Error: /some/special/path/page.tsx: line 9: Possible constant used as runtime value for a css variable found: \${colors.red()} Please move the constant to a .yak import or use an arrow function e.g.: | import { primaryColor } from './foo.yak' - | const MyStyledDiv = styled.div\`color: \${primaryColor};\`" + | const MyStyledDiv = styled.div\`color: \${primaryColor};\`] `); }); @@ -894,9 +894,9 @@ const headline = css\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 9: Module constants are not allowed in this context + [Error: /some/special/path/page.tsx: line 9: Module constants are not allowed in this context found: \${$red} - Use the 'experiments.crossFileSelectors' option to enable cross file selectors" + Use the 'experiments.crossFileSelectors' option to enable cross file selectors] `); }); @@ -918,12 +918,12 @@ const headline = css\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 9: Possible constant used as runtime value for a css variable + [Error: /some/special/path/page.tsx: line 9: Possible constant used as runtime value for a css variable found: \${colors.red} Please move the constant to a .yak import or use an arrow function e.g.: | import { primaryColor } from './foo.yak' - | const MyStyledDiv = styled.div\`color: \${primaryColor};\`" + | const MyStyledDiv = styled.div\`color: \${primaryColor};\`] `); }); @@ -945,8 +945,8 @@ const Button = styled.button\` `, ), ).toMatchInlineSnapshot(` - "import { styled, css } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { styled, css } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Button = /*YAK Extracted CSS: .Button__$primary { @@ -958,10 +958,10 @@ const Button = styled.button\` $primary, $digits }) => { - const indent = $digits * 10 + \\"px\\"; + const indent = $digits * 10 + "px"; return $primary && /*#__PURE__*/css(__styleYak.Button__$primary, { - \\"style\\": { - \\"--Button__$primary__text-indent_18fi82j\\": indent + "style": { + "--Button__$primary__text-indent_18fi82j": indent } }); });" @@ -986,9 +986,9 @@ const headline = css\` `, ), ).toMatchInlineSnapshot(` - "import styles from \\"./page.module.css\\"; - import { css } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import styles from "./page.module.css"; + import { css } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const x = Math.random(); const headline = /*YAK Extracted CSS: @@ -1016,9 +1016,9 @@ const Icon = styled.div\` `, ), ).rejects.toThrowErrorMatchingInlineSnapshot(` - "/some/special/path/page.tsx: line 6: Module constants are not allowed in this context + [Error: /some/special/path/page.tsx: line 6: Module constants are not allowed in this context found: \${test} - Use the 'experiments.crossFileSelectors' option to enable cross file selectors" + Use the 'experiments.crossFileSelectors' option to enable cross file selectors] `); }); @@ -1040,9 +1040,9 @@ const Button = styled.button\` `, ), ).toMatchInlineSnapshot(` - "import styles from \\"./page.module.css\\"; - import { styled, css } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import styles from "./page.module.css"; + import { styled, css } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Icon = /*YAK Extracted CSS: .Icon {} @@ -1090,9 +1090,9 @@ const Button = styled.button\` `, ), ).toMatchInlineSnapshot(` - "import styles from \\"./page.module.css\\"; - import { styled, css } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import styles from "./page.module.css"; + import { styled, css } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Button = /*YAK Extracted CSS: .Button { @@ -1148,9 +1148,9 @@ const Button = styled.button\` `, ), ).toMatchInlineSnapshot(` - "import styles from \\"./page.module.css\\"; - import { styled, __yak_unitPostFix } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import styles from "./page.module.css"; + import { styled, __yak_unitPostFix } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Button = /*YAK Extracted CSS: .Button { @@ -1158,16 +1158,16 @@ const Button = styled.button\` margin: var(--Button__margin_18fi82j); z-index: var(--Button__z-index_18fi82j); transform: translateX(var(--Button__transform_18fi82j)) translateY(var(--Button__transform_18fi82j_1)); - font-family: \\"Arial\\", sans-serif; + font-family: "Arial", sans-serif; }*/ /*#__PURE__*/ styled.button(__styleYak.Button, { - \\"style\\": { - \\"--Button__padding_18fi82j\\": __yak_unitPostFix(() => 10, \\"rem\\"), - \\"--Button__margin_18fi82j\\": __yak_unitPostFix(() => 4 * 2, \\"px\\"), - \\"--Button__z-index_18fi82j\\": () => 10 + 4, - \\"--Button__transform_18fi82j\\": __yak_unitPostFix(() => 10, \\"px\\"), - \\"--Button__transform_18fi82j_1\\": __yak_unitPostFix(() => 10 / 2, \\"px\\") + "style": { + "--Button__padding_18fi82j": __yak_unitPostFix(() => 10, "rem"), + "--Button__margin_18fi82j": __yak_unitPostFix(() => 4 * 2, "px"), + "--Button__z-index_18fi82j": () => 10 + 4, + "--Button__transform_18fi82j": __yak_unitPostFix(() => 10, "px"), + "--Button__transform_18fi82j_1": __yak_unitPostFix(() => 10 / 2, "px") } });" `); @@ -1187,9 +1187,9 @@ const Button = styled.button\` `, ), ).toMatchInlineSnapshot(` - "import styles from \\"./page.module.css\\"; - import { styled, __yak_unitPostFix } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import styles from "./page.module.css"; + import { styled, __yak_unitPostFix } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const ClockNumber = /*YAK Extracted CSS: .ClockNumber { @@ -1198,13 +1198,13 @@ const Button = styled.button\` }*/ /*#__PURE__*/ styled.div(__styleYak.ClockNumber, { - \\"style\\": { - \\"--ClockNumber__transform_18fi82j\\": __yak_unitPostFix(({ + "style": { + "--ClockNumber__transform_18fi82j": __yak_unitPostFix(({ index - }) => index * 30, \\"deg\\"), - \\"--ClockNumber__transform_18fi82j_1\\": __yak_unitPostFix(({ + }) => index * 30, "deg"), + "--ClockNumber__transform_18fi82j_1": __yak_unitPostFix(({ index - }) => -index * 30, \\"deg\\") + }) => -index * 30, "deg") } });" `); @@ -1229,9 +1229,9 @@ const Button = styled.button\` `, ), ).toMatchInlineSnapshot(` - "import styles from \\"./page.module.css\\"; - import { css, __yak_unitPostFix } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import styles from "./page.module.css"; + import { css, __yak_unitPostFix } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const case1 = /*YAK Extracted CSS: .case1 { @@ -1239,15 +1239,15 @@ const Button = styled.button\` }*/ /*#__PURE__*/ css(__styleYak.case1, { - \\"style\\": { - \\"--case1__padding_18fi82j\\": __yak_unitPostFix(({ + "style": { + "--case1__padding_18fi82j": __yak_unitPostFix(({ $indent }) => { if ($indent > 0) { return $indent * 3; } return 0; - }, \\"px\\") + }, "px") } });" `); @@ -1273,8 +1273,8 @@ const Button = styled.button\` `, ), ).toMatchInlineSnapshot(` - "import { css, __yak_unitPostFix } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, __yak_unitPostFix } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const mixin1 = /*YAK Extracted CSS: .mixin1 { @@ -1282,8 +1282,8 @@ const Button = styled.button\` }*/ /*#__PURE__*/ css(__styleYak.mixin1, { - \\"style\\": { - \\"--mixin1__padding_18fi82j\\": __yak_unitPostFix(() => 4, \\"px\\") + "style": { + "--mixin1__padding_18fi82j": __yak_unitPostFix(() => 4, "px") } }); const value = 10; @@ -1298,11 +1298,11 @@ const Button = styled.button\` }*/ /*#__PURE__*/ css(__styleYak.mixin2, { - \\"style\\": { - \\"--mixin2__margin_18fi82j\\": __yak_unitPostFix(() => size, \\"px\\"), - \\"--mixin2__top_18fi82j\\": __yak_unitPostFix(() => spacing.xs, \\"px\\"), - \\"--mixin2__bottom_18fi82j\\": __yak_unitPostFix(() => spacing[0], \\"PX\\"), - \\"--mixin2__left_18fi82j\\": __yak_unitPostFix(() => spacing(), \\"px\\") + "style": { + "--mixin2__margin_18fi82j": __yak_unitPostFix(() => size, "px"), + "--mixin2__top_18fi82j": __yak_unitPostFix(() => spacing.xs, "px"), + "--mixin2__bottom_18fi82j": __yak_unitPostFix(() => spacing[0], "PX"), + "--mixin2__left_18fi82j": __yak_unitPostFix(() => spacing(), "px") } });" `); @@ -1343,8 +1343,8 @@ describe("css prop", () => { `, ), ).toMatchInlineSnapshot(` - "import { css } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const elem =
{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const MyComp = () =>

{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const MyComp = p =>
anything
; const MyComp2 = () => { `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const TestObj = { TestMem: p =>
anything
}; @@ -1451,8 +1451,8 @@ describe("css prop", () => { `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const test = { nested: { TestMem: p =>
anything
@@ -1480,8 +1480,8 @@ describe("css prop", () => { `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const MyComp2 = () => { `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const padding = /*YAK Extracted CSS: .padding { @@ -1545,8 +1545,8 @@ describe("css prop", () => { `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const MyComp = () =>
{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const MyComp = () =>
{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const padding = /*YAK Extracted CSS: .padding { @@ -1628,10 +1628,10 @@ describe("css prop", () => { `, ), ).toMatchInlineSnapshot(` - "import { css, styled, __yak_mergeCssProp } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled, __yak_mergeCssProp } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Elem = () =>
{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled, __yak_mergeCssProp } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled, __yak_mergeCssProp } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Elem = () =>
{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled, __yak_mergeCssProp } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled, __yak_mergeCssProp } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Elem = () =>
{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled, __yak_mergeCssProp } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled, __yak_mergeCssProp } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Elem = () =>
{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled, __yak_mergeCssProp } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled, __yak_mergeCssProp } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Elem = () =>
{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled, __yak_mergeCssProp } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled, __yak_mergeCssProp } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Elem = props =>
{ `, ), ).toMatchInlineSnapshot(` - "import { css, styled, __yak_mergeCssProp, __yak_unitPostFix } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; + "import { css, styled, __yak_mergeCssProp, __yak_unitPostFix } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; const Elem = props =>
{ }*/ /*#__PURE__*/ css(__styleYak.Elem, () => props.active && /*#__PURE__*/css(__styleYak.Elem__propsActive), { - \\"style\\": { - \\"--Elem__padding_18fi82j\\": __yak_unitPostFix(() => props.dynamicPadding ? '10px' : \\"0\\", \\"px\\") + "style": { + "--Elem__padding_18fi82j": __yak_unitPostFix(() => props.dynamicPadding ? '10px' : "0", "px") } })({}))} />;" `); @@ -1830,13 +1830,13 @@ describe("cross file", () => { `, ), ).toMatchInlineSnapshot(` - "import { css, styled } from \\"next-yak/internal\\"; - import __styleYak from \\"./page.yak.module.css!=!./page?./page.yak.module.css\\"; - import { Icon } from \\"./icon\\"; + "import { css, styled } from "next-yak/internal"; + import __styleYak from "./page.yak.module.css!=!./page?./page.yak.module.css"; + import { Icon } from "./icon"; const Button = /*YAK Extracted CSS: .Button { - --yak-css-import: url(\\"./icon:Icon\\") { + --yak-css-import: url("./icon:Icon") { margin: 0 10px; } }*/ diff --git a/packages/next-yak/package.json b/packages/next-yak/package.json index 374018e4..88ebee93 100644 --- a/packages/next-yak/package.json +++ b/packages/next-yak/package.json @@ -88,11 +88,11 @@ "@types/react-test-renderer": "^18.0.3", "jsdom": "^22.1.0", "next": "14.2.4", - "react": "^18.2.0", + "react": "^18.3.1", "react-test-renderer": "^18.2.0", "typescript": "5.5.2", - "vite": "^4.4.9", - "vitest": "0.34.5", + "vite": "5.3.4", + "vitest": "2.0.4", "tsup": "7.2.0" }, "files": [ diff --git a/packages/playground/package.json b/packages/playground/package.json index ce534d50..296f2801 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -46,7 +46,7 @@ "shiki": "^1.1.1", "terser": "^5.28.1", "typescript": "5.5.2", - "vite": "^5.1.0", + "vite": "5.3.4", "vite-plugin-node-polyfills": "^0.21.0" } } diff --git a/packages/webpack-tests/package.json b/packages/webpack-tests/package.json index 7ea40e67..32f79ed5 100644 --- a/packages/webpack-tests/package.json +++ b/packages/webpack-tests/package.json @@ -7,8 +7,8 @@ "test:watch": "vitest" }, "devDependencies": { - "vite": "^4.4.9", - "vitest": "0.34.5", + "vite": "5.3.4", + "vitest": "2.0.4", "webpack": "5.92.1", "swc-loader": "0.2.6", "next-yak": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4534ad2d..f14e0394 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -130,7 +130,7 @@ importers: version: 5.17.0 '@testing-library/react': specifier: ^14.0.0 - version: 14.0.0(react-dom@18.3.1)(react@18.2.0) + version: 14.0.0(react-dom@18.3.1)(react@18.3.1) '@types/babel__core': specifier: ^7.1.14 version: 7.1.14 @@ -157,13 +157,13 @@ importers: version: 22.1.0 next: specifier: 14.2.4 - version: 14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.2.0) + version: 14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1) react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: ^18.3.1 + version: 18.3.1 react-test-renderer: specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + version: 18.2.0(react@18.3.1) tsup: specifier: 7.2.0 version: 7.2.0(typescript@5.5.2) @@ -171,11 +171,11 @@ importers: specifier: 5.5.2 version: 5.5.2 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@20.4.5) + specifier: 5.3.4 + version: 5.3.4(@types/node@20.4.5) vitest: - specifier: 0.34.5 - version: 0.34.5(jsdom@22.1.0) + specifier: 2.0.4 + version: 2.0.4(@types/node@20.4.5)(jsdom@22.1.0) packages/playground: dependencies: @@ -230,7 +230,7 @@ importers: version: 6.21.0(eslint@8.56.0)(typescript@5.5.2) '@vitejs/plugin-react': specifier: ^4.2.1 - version: 4.2.1(vite@5.1.0) + version: 4.2.1(vite@5.3.4) eslint: specifier: ^8.56.0 version: 8.56.0 @@ -253,11 +253,11 @@ importers: specifier: 5.5.2 version: 5.5.2 vite: - specifier: ^5.1.0 - version: 5.1.0(terser@5.28.1) + specifier: 5.3.4 + version: 5.3.4(terser@5.28.1) vite-plugin-node-polyfills: specifier: ^0.21.0 - version: 0.21.0(vite@5.1.0) + version: 0.21.0(vite@5.3.4) packages/webpack-tests: devDependencies: @@ -274,11 +274,11 @@ importers: specifier: 4.5.4 version: 4.5.4 vite: - specifier: ^4.4.9 - version: 4.4.9(@types/node@20.4.5) + specifier: 5.3.4 + version: 5.3.4(terser@5.28.1) vitest: - specifier: 0.34.5 - version: 0.34.5(jsdom@22.1.0) + specifier: 2.0.4 + version: 2.0.4 webpack: specifier: 5.92.1 version: 5.92.1(@swc/core@1.7.0) @@ -754,6 +754,7 @@ packages: cpu: [ppc64] os: [aix] requiresBuild: true + dev: false optional: true /@esbuild/aix-ppc64@0.21.5: @@ -762,7 +763,6 @@ packages: cpu: [ppc64] os: [aix] requiresBuild: true - dev: false optional: true /@esbuild/android-arm64@0.18.20: @@ -780,6 +780,7 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: false optional: true /@esbuild/android-arm64@0.21.5: @@ -788,7 +789,6 @@ packages: cpu: [arm64] os: [android] requiresBuild: true - dev: false optional: true /@esbuild/android-arm@0.18.20: @@ -806,6 +806,7 @@ packages: cpu: [arm] os: [android] requiresBuild: true + dev: false optional: true /@esbuild/android-arm@0.21.5: @@ -814,7 +815,6 @@ packages: cpu: [arm] os: [android] requiresBuild: true - dev: false optional: true /@esbuild/android-x64@0.18.20: @@ -832,6 +832,7 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: false optional: true /@esbuild/android-x64@0.21.5: @@ -840,7 +841,6 @@ packages: cpu: [x64] os: [android] requiresBuild: true - dev: false optional: true /@esbuild/darwin-arm64@0.18.20: @@ -858,6 +858,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: false optional: true /@esbuild/darwin-arm64@0.21.5: @@ -866,7 +867,6 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true - dev: false optional: true /@esbuild/darwin-x64@0.18.20: @@ -884,6 +884,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: false optional: true /@esbuild/darwin-x64@0.21.5: @@ -892,7 +893,6 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true - dev: false optional: true /@esbuild/freebsd-arm64@0.18.20: @@ -910,6 +910,7 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true + dev: false optional: true /@esbuild/freebsd-arm64@0.21.5: @@ -918,7 +919,6 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true - dev: false optional: true /@esbuild/freebsd-x64@0.18.20: @@ -936,6 +936,7 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: false optional: true /@esbuild/freebsd-x64@0.21.5: @@ -944,7 +945,6 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true - dev: false optional: true /@esbuild/linux-arm64@0.18.20: @@ -962,6 +962,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-arm64@0.21.5: @@ -970,7 +971,6 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-arm@0.18.20: @@ -988,6 +988,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-arm@0.21.5: @@ -996,7 +997,6 @@ packages: cpu: [arm] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-ia32@0.18.20: @@ -1014,6 +1014,7 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-ia32@0.21.5: @@ -1022,7 +1023,6 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-loong64@0.18.20: @@ -1040,6 +1040,7 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-loong64@0.21.5: @@ -1048,7 +1049,6 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-mips64el@0.18.20: @@ -1066,6 +1066,7 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-mips64el@0.21.5: @@ -1074,7 +1075,6 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-ppc64@0.18.20: @@ -1092,6 +1092,7 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-ppc64@0.21.5: @@ -1100,7 +1101,6 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-riscv64@0.18.20: @@ -1118,6 +1118,7 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-riscv64@0.21.5: @@ -1126,7 +1127,6 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-s390x@0.18.20: @@ -1144,6 +1144,7 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-s390x@0.21.5: @@ -1152,7 +1153,6 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/linux-x64@0.18.20: @@ -1170,6 +1170,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-x64@0.21.5: @@ -1178,7 +1179,6 @@ packages: cpu: [x64] os: [linux] requiresBuild: true - dev: false optional: true /@esbuild/netbsd-x64@0.18.20: @@ -1196,6 +1196,7 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true + dev: false optional: true /@esbuild/netbsd-x64@0.21.5: @@ -1204,7 +1205,6 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true - dev: false optional: true /@esbuild/openbsd-x64@0.18.20: @@ -1222,6 +1222,7 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true + dev: false optional: true /@esbuild/openbsd-x64@0.21.5: @@ -1230,7 +1231,6 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true - dev: false optional: true /@esbuild/sunos-x64@0.18.20: @@ -1248,6 +1248,7 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true + dev: false optional: true /@esbuild/sunos-x64@0.21.5: @@ -1256,7 +1257,6 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true - dev: false optional: true /@esbuild/win32-arm64@0.18.20: @@ -1274,6 +1274,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: false optional: true /@esbuild/win32-arm64@0.21.5: @@ -1282,7 +1283,6 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true - dev: false optional: true /@esbuild/win32-ia32@0.18.20: @@ -1300,6 +1300,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: false optional: true /@esbuild/win32-ia32@0.21.5: @@ -1308,7 +1309,6 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true - dev: false optional: true /@esbuild/win32-x64@0.18.20: @@ -1326,6 +1326,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: false optional: true /@esbuild/win32-x64@0.21.5: @@ -1334,7 +1335,6 @@ packages: cpu: [x64] os: [win32] requiresBuild: true - dev: false optional: true /@eslint-community/eslint-utils@4.4.0(eslint@8.56.0): @@ -2889,7 +2889,7 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: true - /@testing-library/react@14.0.0(react-dom@18.3.1)(react@18.2.0): + /@testing-library/react@14.0.0(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==} engines: {node: '>=14'} peerDependencies: @@ -2899,8 +2899,8 @@ packages: '@babel/runtime': 7.24.8 '@testing-library/dom': 9.3.4 '@types/react-dom': 18.2.13 - react: 18.2.0 - react-dom: 18.3.1(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) dev: true /@tootallnate/once@2.0.0: @@ -2963,16 +2963,6 @@ packages: resolution: {integrity: sha512-cKio2eFB3v7qmKcvIHLUMw/dIx/8bhWPuzpzRT4unCPRTD8VdA9Zb0afxpcxOqR4PixRS7yT42FqGS8BYL8g1w==} dev: true - /@types/chai-subset@1.3.5: - resolution: {integrity: sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==} - dependencies: - '@types/chai': 4.3.16 - dev: true - - /@types/chai@4.3.16: - resolution: {integrity: sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==} - dev: true - /@types/debug@4.1.12: resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} dependencies: @@ -3358,7 +3348,7 @@ packages: lodash: 4.17.21 mlly: 1.7.1 outdent: 0.8.0 - vite: 5.1.0(terser@5.28.1) + vite: 5.3.4(terser@5.28.1) vite-node: 1.6.0 transitivePeerDependencies: - '@types/node' @@ -3385,7 +3375,7 @@ packages: outdent: 0.8.0 postcss: 8.4.39 postcss-load-config: 4.0.2(postcss@8.4.39) - vite: 5.3.4 + vite: 5.3.4(terser@5.28.1) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -3399,7 +3389,7 @@ packages: - ts-node dev: false - /@vitejs/plugin-react@4.2.1(vite@5.1.0): + /@vitejs/plugin-react@4.2.1(vite@5.3.4): resolution: {integrity: sha512-oojO9IDc4nCUUi8qIR11KoQm0XFFLIwsRBwHRR4d/88IWghn1y6ckz/bJ8GHDCsYEJee8mDzqtJxh15/cisJNQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -3410,7 +3400,7 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.24.9) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.1.0(terser@5.28.1) + vite: 5.3.4(terser@5.28.1) transitivePeerDependencies: - supports-color dev: true @@ -3426,47 +3416,54 @@ packages: '@babel/plugin-transform-react-jsx-source': 7.24.7(@babel/core@7.24.9) '@types/babel__core': 7.20.5 react-refresh: 0.14.2 - vite: 5.3.4 + vite: 5.3.4(terser@5.28.1) transitivePeerDependencies: - supports-color dev: false - /@vitest/expect@0.34.5: - resolution: {integrity: sha512-/3RBIV9XEH+nRpRMqDJBufKIOQaYUH2X6bt0rKSCW0MfKhXFLYsR5ivHifeajRSTsln0FwJbitxLKHSQz/Xwkw==} + /@vitest/expect@2.0.4: + resolution: {integrity: sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==} dependencies: - '@vitest/spy': 0.34.5 - '@vitest/utils': 0.34.5 - chai: 4.4.1 + '@vitest/spy': 2.0.4 + '@vitest/utils': 2.0.4 + chai: 5.1.1 + tinyrainbow: 1.2.0 dev: true - /@vitest/runner@0.34.5: - resolution: {integrity: sha512-RDEE3ViVvl7jFSCbnBRyYuu23XxmvRTSZWW6W4M7eC5dOsK75d5LIf6uhE5Fqf809DQ1+9ICZZNxhIolWHU4og==} + /@vitest/pretty-format@2.0.4: + resolution: {integrity: sha512-RYZl31STbNGqf4l2eQM1nvKPXE0NhC6Eq0suTTePc4mtMQ1Fn8qZmjV4emZdEdG2NOWGKSCrHZjmTqDCDoeFBw==} dependencies: - '@vitest/utils': 0.34.5 - p-limit: 4.0.0 + tinyrainbow: 1.2.0 + dev: true + + /@vitest/runner@2.0.4: + resolution: {integrity: sha512-Gk+9Su/2H2zNfNdeJR124gZckd5st4YoSuhF1Rebi37qTXKnqYyFCd9KP4vl2cQHbtuVKjfEKrNJxHHCW8thbQ==} + dependencies: + '@vitest/utils': 2.0.4 pathe: 1.1.2 dev: true - /@vitest/snapshot@0.34.5: - resolution: {integrity: sha512-+ikwSbhu6z2yOdtKmk/aeoDZ9QPm2g/ZO5rXT58RR9Vmu/kB2MamyDSx77dctqdZfP3Diqv4mbc/yw2kPT8rmA==} + /@vitest/snapshot@2.0.4: + resolution: {integrity: sha512-or6Mzoz/pD7xTvuJMFYEtso1vJo1S5u6zBTinfl+7smGUhqybn6VjzCDMhmTyVOFWwkCMuNjmNNxnyXPgKDoPw==} dependencies: + '@vitest/pretty-format': 2.0.4 magic-string: 0.30.10 pathe: 1.1.2 - pretty-format: 29.7.0 dev: true - /@vitest/spy@0.34.5: - resolution: {integrity: sha512-epsicsfhvBjRjCMOC/3k00mP/TBGQy8/P0DxOFiWyLt55gnZ99dqCfCiAsKO17BWVjn4eZRIjKvcqNmSz8gvmg==} + /@vitest/spy@2.0.4: + resolution: {integrity: sha512-uTXU56TNoYrTohb+6CseP8IqNwlNdtPwEO0AWl+5j7NelS6x0xZZtP0bDWaLvOfUbaYwhhWp1guzXUxkC7mW7Q==} dependencies: - tinyspy: 2.2.1 + tinyspy: 3.0.0 dev: true - /@vitest/utils@0.34.5: - resolution: {integrity: sha512-ur6CmmYQoeHMwmGb0v+qwkwN3yopZuZyf4xt1DBBSGBed8Hf9Gmbm/5dEWqgpLPdRx6Av6jcWXrjcKfkTzg/pw==} + /@vitest/utils@2.0.4: + resolution: {integrity: sha512-Zc75QuuoJhOBnlo99ZVUkJIuq4Oj0zAkrQ2VzCqNCx6wAwViHEh5Fnp4fiJTE9rA+sAoXRf00Z9xGgfEzV6fzQ==} dependencies: - diff-sequences: 29.6.3 - loupe: 2.3.7 - pretty-format: 29.7.0 + '@vitest/pretty-format': 2.0.4 + estree-walker: 3.0.3 + loupe: 3.1.1 + tinyrainbow: 1.2.0 dev: true /@webassemblyjs/ast@1.12.1: @@ -3770,8 +3767,9 @@ packages: util: 0.12.5 dev: true - /assertion-error@1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + /assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} dev: true /astring@1.8.6: @@ -4131,17 +4129,15 @@ packages: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} dev: false - /chai@4.4.1: - resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} - engines: {node: '>=4'} + /chai@5.1.1: + resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + engines: {node: '>=12'} dependencies: - assertion-error: 1.1.0 - check-error: 1.0.3 - deep-eql: 4.1.4 - get-func-name: 2.0.2 - loupe: 2.3.7 - pathval: 1.1.1 - type-detect: 4.0.8 + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.1 + pathval: 2.0.0 dev: true /chalk@2.4.2: @@ -4194,10 +4190,9 @@ packages: resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} dev: false - /check-error@1.0.3: - resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} - dependencies: - get-func-name: 2.0.2 + /check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} dev: true /chokidar@3.6.0: @@ -4344,6 +4339,7 @@ packages: /confbox@0.1.7: resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + dev: false /console-browserify@1.2.0: resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} @@ -4561,11 +4557,9 @@ packages: babel-plugin-macros: optional: true - /deep-eql@4.1.4: - resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} + /deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} - dependencies: - type-detect: 4.0.8 dev: true /deep-equal@2.2.3: @@ -4876,6 +4870,7 @@ packages: '@esbuild/win32-arm64': 0.19.12 '@esbuild/win32-ia32': 0.19.12 '@esbuild/win32-x64': 0.19.12 + dev: false /esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} @@ -4906,7 +4901,6 @@ packages: '@esbuild/win32-arm64': 0.21.5 '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - dev: false /escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} @@ -5118,7 +5112,6 @@ packages: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} dependencies: '@types/estree': 1.0.5 - dev: false /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} @@ -5164,6 +5157,21 @@ packages: signal-exit: 3.0.7 strip-final-newline: 2.0.0 + /execa@8.0.1: + resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} + engines: {node: '>=16.17'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 8.0.1 + human-signals: 5.0.0 + is-stream: 3.0.0 + merge-stream: 2.0.0 + npm-run-path: 5.3.0 + onetime: 6.0.0 + signal-exit: 4.1.0 + strip-final-newline: 3.0.0 + dev: true + /exit@0.1.2: resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} engines: {node: '>= 0.8.0'} @@ -5403,6 +5411,11 @@ packages: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + /get-stream@8.0.1: + resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} + engines: {node: '>=16'} + dev: true + /github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} dev: false @@ -5742,6 +5755,11 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + /human-signals@5.0.0: + resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} + engines: {node: '>=16.17.0'} + dev: true + /hyperdyperid@1.2.0: resolution: {integrity: sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==} engines: {node: '>=10.18'} @@ -6009,6 +6027,11 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} + /is-stream@3.0.0: + resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -6789,11 +6812,6 @@ packages: engines: {node: '>=6.11.5'} dev: true - /local-pkg@0.4.3: - resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} - engines: {node: '>=14'} - dev: true - /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -6843,8 +6861,8 @@ packages: dependencies: js-tokens: 4.0.0 - /loupe@2.3.7: - resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} + /loupe@3.1.1: + resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} dependencies: get-func-name: 2.0.2 dev: true @@ -7542,6 +7560,11 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + /mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + dev: true + /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -7593,6 +7616,7 @@ packages: pathe: 1.1.2 pkg-types: 1.1.3 ufo: 1.5.4 + dev: false /modern-ahocorasick@1.0.1: resolution: {integrity: sha512-yoe+JbhTClckZ67b2itRtistFKf8yPYelHLc7e5xAwtNAXxM6wJTUx2C7QeVSJFDzKT7bCIFyBVybPMKvmB9AA==} @@ -7680,7 +7704,7 @@ packages: - babel-plugin-macros dev: false - /next@14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.2.0): + /next@14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-R8/V7vugY+822rsQGQCjoLhMuC9oFj9SOi4Cl4b2wjDrseD0LRZ10W7R6Czo4w9ZznVSshKjuIomsRjvm9EKJQ==} engines: {node: '>=18.17.0'} hasBin: true @@ -7704,9 +7728,9 @@ packages: caniuse-lite: 1.0.30001642 graceful-fs: 4.2.11 postcss: 8.4.31 - react: 18.2.0 - react-dom: 18.3.1(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.23.2)(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + styled-jsx: 5.1.1(@babel/core@7.23.2)(react@18.3.1) optionalDependencies: '@next/swc-darwin-arm64': 14.2.4 '@next/swc-darwin-x64': 14.2.4 @@ -7786,6 +7810,13 @@ packages: dependencies: path-key: 3.1.1 + /npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + path-key: 4.0.0 + dev: true + /nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} dependencies: @@ -7857,6 +7888,13 @@ packages: dependencies: mimic-fn: 2.1.0 + /onetime@6.0.0: + resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} + engines: {node: '>=12'} + dependencies: + mimic-fn: 4.0.0 + dev: true + /open@7.4.2: resolution: {integrity: sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==} engines: {node: '>=8'} @@ -8061,6 +8099,11 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + /path-key@4.0.0: + resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} + engines: {node: '>=12'} + dev: true + /path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} @@ -8078,8 +8121,9 @@ packages: /pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - /pathval@1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + /pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} dev: true /pbkdf2@3.1.2: @@ -8137,6 +8181,7 @@ packages: confbox: 0.1.7 mlly: 1.7.1 pathe: 1.1.2 + dev: false /platform@1.3.6: resolution: {integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==} @@ -8359,16 +8404,6 @@ packages: react: 18.2.0 scheduler: 0.23.2 - /react-dom@18.3.1(react@18.2.0): - resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} - peerDependencies: - react: ^18.3.1 - dependencies: - loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.2 - dev: true - /react-dom@18.3.1(react@18.3.1): resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} peerDependencies: @@ -8377,7 +8412,6 @@ packages: loose-envify: 1.4.0 react: 18.3.1 scheduler: 0.23.2 - dev: false /react-fast-compare@3.2.2: resolution: {integrity: sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==} @@ -8492,13 +8526,13 @@ packages: react: 18.3.1 dev: false - /react-shallow-renderer@16.15.0(react@18.2.0): + /react-shallow-renderer@16.15.0(react@18.3.1): resolution: {integrity: sha512-oScf2FqQ9LFVQgA73vr86xl2NaOIX73rh+YFqcOp68CWj56tSfgtGKrEbyhCj0rSijyG9M1CYprTh39fBi5hzA==} peerDependencies: react: ^16.0.0 || ^17.0.0 || ^18.0.0 dependencies: object-assign: 4.1.1 - react: 18.2.0 + react: 18.3.1 react-is: 18.3.1 dev: true @@ -8527,14 +8561,14 @@ packages: tslib: 2.6.3 dev: false - /react-test-renderer@18.2.0(react@18.2.0): + /react-test-renderer@18.2.0(react@18.3.1): resolution: {integrity: sha512-JWD+aQ0lh2gvh4NM3bBM42Kx+XybOxCpgYK7F8ugAlpaTSnWsX+39Z4XkOykGZAHrjwwTZT3x3KxswVWxHPUqA==} peerDependencies: react: ^18.2.0 dependencies: - react: 18.2.0 + react: 18.3.1 react-is: 18.3.1 - react-shallow-renderer: 16.15.0(react@18.2.0) + react-shallow-renderer: 16.15.0(react@18.3.1) scheduler: 0.23.2 dev: true @@ -8549,7 +8583,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: loose-envify: 1.4.0 - dev: false /read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} @@ -9194,6 +9227,11 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} + /strip-final-newline@3.0.0: + resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} + engines: {node: '>=12'} + dev: true + /strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -9206,12 +9244,6 @@ packages: engines: {node: '>=8'} dev: true - /strip-literal@1.3.0: - resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} - dependencies: - acorn: 8.12.1 - dev: true - /style-to-object@0.4.4: resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==} dependencies: @@ -9260,6 +9292,25 @@ packages: '@babel/core': 7.23.2 client-only: 0.0.1 react: 18.2.0 + dev: false + + /styled-jsx@5.1.1(@babel/core@7.23.2)(react@18.3.1): + resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} + engines: {node: '>= 12.0.0'} + peerDependencies: + '@babel/core': '*' + babel-plugin-macros: '*' + react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' + peerDependenciesMeta: + '@babel/core': + optional: true + babel-plugin-macros: + optional: true + dependencies: + '@babel/core': 7.23.2 + client-only: 0.0.1 + react: 18.3.1 + dev: true /stylis@4.3.2: resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==} @@ -9485,13 +9536,18 @@ packages: resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} dev: true - /tinypool@0.7.0: - resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} + /tinypool@1.0.0: + resolution: {integrity: sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==} + engines: {node: ^18.0.0 || >=20.0.0} + dev: true + + /tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} engines: {node: '>=14.0.0'} dev: true - /tinyspy@2.2.1: - resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + /tinyspy@3.0.0: + resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==} engines: {node: '>=14.0.0'} dev: true @@ -9681,6 +9737,7 @@ packages: /ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + dev: false /unified@10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} @@ -9892,17 +9949,37 @@ packages: vfile-message: 4.0.2 dev: false - /vite-node@0.34.5(@types/node@20.4.5): - resolution: {integrity: sha512-RNZ+DwbCvDoI5CbCSQSyRyzDTfFvFauvMs6Yq4ObJROKlIKuat1KgSX/Ako5rlDMfVCyMcpMRMTkJBxd6z8YRA==} - engines: {node: '>=v14.18.0'} + /vite-node@1.6.0: + resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.5 - mlly: 1.7.1 pathe: 1.1.2 picocolors: 1.0.1 - vite: 5.1.0(@types/node@20.4.5) + vite: 5.3.4(terser@5.28.1) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: false + + /vite-node@2.0.4: + resolution: {integrity: sha512-ZpJVkxcakYtig5iakNeL7N3trufe3M6vGuzYAr4GsbCTwobDeyPJpE4cjDhhPluv8OvQCFzu2LWp6GkoKRITXA==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + dependencies: + cac: 6.7.14 + debug: 4.3.5 + pathe: 1.1.2 + tinyrainbow: 1.2.0 + vite: 5.3.4(terser@5.28.1) transitivePeerDependencies: - '@types/node' - less @@ -9914,16 +9991,16 @@ packages: - terser dev: true - /vite-node@1.6.0: - resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} + /vite-node@2.0.4(@types/node@20.4.5): + resolution: {integrity: sha512-ZpJVkxcakYtig5iakNeL7N3trufe3M6vGuzYAr4GsbCTwobDeyPJpE4cjDhhPluv8OvQCFzu2LWp6GkoKRITXA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.5 pathe: 1.1.2 - picocolors: 1.0.1 - vite: 5.1.0(terser@5.28.1) + tinyrainbow: 1.2.0 + vite: 5.3.4(@types/node@20.4.5) transitivePeerDependencies: - '@types/node' - less @@ -9933,58 +10010,22 @@ packages: - sugarss - supports-color - terser - dev: false + dev: true - /vite-plugin-node-polyfills@0.21.0(vite@5.1.0): + /vite-plugin-node-polyfills@0.21.0(vite@5.3.4): resolution: {integrity: sha512-Sk4DiKnmxN8E0vhgEhzLudfJQfaT8k4/gJ25xvUPG54KjLJ6HAmDKbr4rzDD/QWEY+Lwg80KE85fGYBQihEPQA==} peerDependencies: vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 dependencies: '@rollup/plugin-inject': 5.0.5 node-stdlib-browser: 1.2.0 - vite: 5.1.0(terser@5.28.1) + vite: 5.3.4(terser@5.28.1) transitivePeerDependencies: - rollup dev: true - /vite@4.4.9(@types/node@20.4.5): - resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - '@types/node': 20.4.5 - esbuild: 0.18.20 - postcss: 8.4.39 - rollup: 3.29.4 - optionalDependencies: - fsevents: 2.3.3 - dev: true - - /vite@5.1.0(@types/node@20.4.5): - resolution: {integrity: sha512-STmSFzhY4ljuhz14bg9LkMTk3d98IO6DIArnTY6MeBwiD1Za2StcQtz7fzOUnRCqrHSD5+OS2reg4HOz1eoLnw==} + /vite@5.3.4(@types/node@20.4.5): + resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -10012,15 +10053,15 @@ packages: optional: true dependencies: '@types/node': 20.4.5 - esbuild: 0.19.12 + esbuild: 0.21.5 postcss: 8.4.39 rollup: 4.18.1 optionalDependencies: fsevents: 2.3.3 dev: true - /vite@5.1.0(terser@5.28.1): - resolution: {integrity: sha512-STmSFzhY4ljuhz14bg9LkMTk3d98IO6DIArnTY6MeBwiD1Za2StcQtz7fzOUnRCqrHSD5+OS2reg4HOz1eoLnw==} + /vite@5.3.4(terser@5.28.1): + resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -10047,64 +10088,83 @@ packages: terser: optional: true dependencies: - esbuild: 0.19.12 + esbuild: 0.21.5 postcss: 8.4.39 rollup: 4.18.1 terser: 5.28.1 optionalDependencies: fsevents: 2.3.3 - /vite@5.3.4: - resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==} + /vitest@2.0.4: + resolution: {integrity: sha512-luNLDpfsnxw5QSW4bISPe6tkxVvv5wn2BBs/PuDRkhXZ319doZyLOBr1sjfB5yCEpTiU7xCAdViM8TNVGPwoog==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: + '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 + '@vitest/browser': 2.0.4 + '@vitest/ui': 2.0.4 + happy-dom: '*' + jsdom: '*' peerDependenciesMeta: - '@types/node': - optional: true - less: + '@edge-runtime/vm': optional: true - lightningcss: + '@types/node': optional: true - sass: + '@vitest/browser': optional: true - stylus: + '@vitest/ui': optional: true - sugarss: + happy-dom: optional: true - terser: + jsdom: optional: true dependencies: - esbuild: 0.21.5 - postcss: 8.4.39 - rollup: 4.18.1 - optionalDependencies: - fsevents: 2.3.3 - dev: false + '@ampproject/remapping': 2.3.0 + '@vitest/expect': 2.0.4 + '@vitest/pretty-format': 2.0.4 + '@vitest/runner': 2.0.4 + '@vitest/snapshot': 2.0.4 + '@vitest/spy': 2.0.4 + '@vitest/utils': 2.0.4 + chai: 5.1.1 + debug: 4.3.5 + execa: 8.0.1 + magic-string: 0.30.10 + pathe: 1.1.2 + std-env: 3.7.0 + tinybench: 2.8.0 + tinypool: 1.0.0 + tinyrainbow: 1.2.0 + vite: 5.3.4(terser@5.28.1) + vite-node: 2.0.4 + why-is-node-running: 2.3.0 + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true - /vitest@0.34.5(jsdom@22.1.0): - resolution: {integrity: sha512-CPI68mmnr2DThSB3frSuE5RLm9wo5wU4fbDrDwWQQB1CWgq9jQVoQwnQSzYAjdoBOPoH2UtXpOgHVge/uScfZg==} - engines: {node: '>=v14.18.0'} + /vitest@2.0.4(@types/node@20.4.5)(jsdom@22.1.0): + resolution: {integrity: sha512-luNLDpfsnxw5QSW4bISPe6tkxVvv5wn2BBs/PuDRkhXZ319doZyLOBr1sjfB5yCEpTiU7xCAdViM8TNVGPwoog==} + engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' - '@vitest/browser': '*' - '@vitest/ui': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.0.4 + '@vitest/ui': 2.0.4 happy-dom: '*' jsdom: '*' - playwright: '*' - safaridriver: '*' - webdriverio: '*' peerDependenciesMeta: '@edge-runtime/vm': optional: true + '@types/node': + optional: true '@vitest/browser': optional: true '@vitest/ui': @@ -10113,37 +10173,27 @@ packages: optional: true jsdom: optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true dependencies: - '@types/chai': 4.3.16 - '@types/chai-subset': 1.3.5 + '@ampproject/remapping': 2.3.0 '@types/node': 20.4.5 - '@vitest/expect': 0.34.5 - '@vitest/runner': 0.34.5 - '@vitest/snapshot': 0.34.5 - '@vitest/spy': 0.34.5 - '@vitest/utils': 0.34.5 - acorn: 8.12.1 - acorn-walk: 8.3.3 - cac: 6.7.14 - chai: 4.4.1 + '@vitest/expect': 2.0.4 + '@vitest/pretty-format': 2.0.4 + '@vitest/runner': 2.0.4 + '@vitest/snapshot': 2.0.4 + '@vitest/spy': 2.0.4 + '@vitest/utils': 2.0.4 + chai: 5.1.1 debug: 4.3.5 + execa: 8.0.1 jsdom: 22.1.0 - local-pkg: 0.4.3 magic-string: 0.30.10 pathe: 1.1.2 - picocolors: 1.0.1 std-env: 3.7.0 - strip-literal: 1.3.0 tinybench: 2.8.0 - tinypool: 0.7.0 - vite: 5.1.0(@types/node@20.4.5) - vite-node: 0.34.5(@types/node@20.4.5) + tinypool: 1.0.0 + tinyrainbow: 1.2.0 + vite: 5.3.4(@types/node@20.4.5) + vite-node: 2.0.4(@types/node@20.4.5) why-is-node-running: 2.3.0 transitivePeerDependencies: - less @@ -10228,7 +10278,7 @@ packages: ua-parser-js: 1.0.38 unified: 11.0.5 unist-util-visit: 5.0.0 - vite: 5.3.4 + vite: 5.3.4(terser@5.28.1) transitivePeerDependencies: - '@types/node' - '@types/react' From c55ff4e171246d96f61ee697f3586cec98a97af9 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Mon, 22 Jul 2024 16:08:54 +0200 Subject: [PATCH 4/9] upgrade react --- packages/benchmark/package.json | 4 +- packages/example/package.json | 4 +- packages/next-yak/package.json | 2 +- packages/next-yak/vitest.config.ts | 1 + packages/playground/package.json | 4 +- .../{comment-loader.js => comment-loader.cjs} | 0 .../__tests__/utils/testCompiler.ts | 2 +- packages/webpack-tests/package.json | 1 + pnpm-lock.yaml | 139 +++--------------- 9 files changed, 34 insertions(+), 123 deletions(-) rename packages/webpack-tests/__tests__/utils/{comment-loader.js => comment-loader.cjs} (100%) diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json index 82f21fe6..4853b5d0 100644 --- a/packages/benchmark/package.json +++ b/packages/benchmark/package.json @@ -16,8 +16,8 @@ }, "dependencies": { "next": "14.2.4", - "react": "18.2.0", - "react-dom": "18.2.0", + "react": "18.3.1", + "react-dom": "18.3.1", "next-yak": "workspace:*", "styled-components": "6.1.1" }, diff --git a/packages/example/package.json b/packages/example/package.json index aa1bc1d0..25514c7e 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -17,8 +17,8 @@ "@types/react": "18.2.28", "@types/react-dom": "18.2.7", "next": "14.2.4", - "react": "18.2.0", - "react-dom": "18.2.0", + "react": "18.3.1", + "react-dom": "18.3.1", "typescript": "5.5.2", "next-yak": "workspace:*" }, diff --git a/packages/next-yak/package.json b/packages/next-yak/package.json index 88ebee93..4fd529b8 100644 --- a/packages/next-yak/package.json +++ b/packages/next-yak/package.json @@ -88,7 +88,7 @@ "@types/react-test-renderer": "^18.0.3", "jsdom": "^22.1.0", "next": "14.2.4", - "react": "^18.3.1", + "react": "18.3.1", "react-test-renderer": "^18.2.0", "typescript": "5.5.2", "vite": "5.3.4", diff --git a/packages/next-yak/vitest.config.ts b/packages/next-yak/vitest.config.ts index 3dda7eff..f9519c1b 100644 --- a/packages/next-yak/vitest.config.ts +++ b/packages/next-yak/vitest.config.ts @@ -10,6 +10,7 @@ export default defineConfig({ environment: "jsdom", }, resolve: { + // Use typescript files during tests alias: { "next-yak": fileURLToPath(new URL('./runtime', import.meta.url)), }, diff --git a/packages/playground/package.json b/packages/playground/package.json index 296f2801..46ef1439 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -26,8 +26,8 @@ "lz-string": "^1.5.0", "monaco-editor": "^0.50.0", "next-yak": "workspace:*", - "react": "^18.2.0", - "react-dom": "^18.2.0", + "react": "18.3.1", + "react-dom": "18.3.1", "react-resizable-panels": "^2.0.16" }, "devDependencies": { diff --git a/packages/webpack-tests/__tests__/utils/comment-loader.js b/packages/webpack-tests/__tests__/utils/comment-loader.cjs similarity index 100% rename from packages/webpack-tests/__tests__/utils/comment-loader.js rename to packages/webpack-tests/__tests__/utils/comment-loader.cjs diff --git a/packages/webpack-tests/__tests__/utils/testCompiler.ts b/packages/webpack-tests/__tests__/utils/testCompiler.ts index 18c396fc..28165a6a 100644 --- a/packages/webpack-tests/__tests__/utils/testCompiler.ts +++ b/packages/webpack-tests/__tests__/utils/testCompiler.ts @@ -66,7 +66,7 @@ const createWebpackConfig = (files: Record): webpack.Configurati { test: /\.css$/, use: { - loader: path.resolve(__dirname, "./comment-loader.js"), + loader: path.resolve(__dirname, "./comment-loader.cjs"), }, }, ], diff --git a/packages/webpack-tests/package.json b/packages/webpack-tests/package.json index 32f79ed5..2ef33c10 100644 --- a/packages/webpack-tests/package.json +++ b/packages/webpack-tests/package.json @@ -2,6 +2,7 @@ "name": "webpack-tests", "version": "1.0.0", "description": "next-yak e2e webpack tests", + "type": "module", "scripts": { "test": "vitest --no-watch", "test:watch": "vitest" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f14e0394..2e80e786 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,19 +16,19 @@ importers: dependencies: next: specifier: 14.2.4 - version: 14.2.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + version: 14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1) next-yak: specifier: workspace:* version: link:../next-yak react: - specifier: 18.2.0 - version: 18.2.0 + specifier: 18.3.1 + version: 18.3.1 react-dom: - specifier: 18.2.0 - version: 18.2.0(react@18.2.0) + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) styled-components: specifier: 6.1.1 - version: 6.1.1(react-dom@18.2.0)(react@18.2.0) + version: 6.1.1(react-dom@18.3.1)(react@18.3.1) devDependencies: '@codspeed/benchmark.js-plugin': specifier: 3.1.0 @@ -86,16 +86,16 @@ importers: version: 18.2.7 next: specifier: 14.2.4 - version: 14.2.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + version: 14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1) next-yak: specifier: workspace:* version: link:../next-yak react: - specifier: 18.2.0 - version: 18.2.0 + specifier: 18.3.1 + version: 18.3.1 react-dom: - specifier: 18.2.0 - version: 18.2.0(react@18.2.0) + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) typescript: specifier: 5.5.2 version: 5.5.2 @@ -105,7 +105,7 @@ importers: version: 5.17.0 '@testing-library/react': specifier: ^14.0.0 - version: 14.0.0(react-dom@18.2.0)(react@18.2.0) + version: 14.0.0(react-dom@18.3.1)(react@18.3.1) jest: specifier: ^29.6.2 version: 29.6.2(@types/node@20.4.5) @@ -159,7 +159,7 @@ importers: specifier: 14.2.4 version: 14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1) react: - specifier: ^18.3.1 + specifier: 18.3.1 version: 18.3.1 react-test-renderer: specifier: ^18.2.0 @@ -198,14 +198,14 @@ importers: specifier: workspace:* version: link:../next-yak react: - specifier: ^18.2.0 - version: 18.2.0 + specifier: 18.3.1 + version: 18.3.1 react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) react-resizable-panels: specifier: ^2.0.16 - version: 2.0.16(react-dom@18.2.0)(react@18.2.0) + version: 2.0.16(react-dom@18.3.1)(react@18.3.1) devDependencies: '@shikijs/monaco': specifier: ^1.1.1 @@ -2875,20 +2875,6 @@ packages: redent: 3.0.0 dev: true - /@testing-library/react@14.0.0(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==} - engines: {node: '>=14'} - peerDependencies: - react: ^18.0.0 - react-dom: ^18.0.0 - dependencies: - '@babel/runtime': 7.24.8 - '@testing-library/dom': 9.3.4 - '@types/react-dom': 18.2.13 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: true - /@testing-library/react@14.0.0(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg==} engines: {node: '>=14'} @@ -7662,48 +7648,6 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - /next@14.2.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-R8/V7vugY+822rsQGQCjoLhMuC9oFj9SOi4Cl4b2wjDrseD0LRZ10W7R6Czo4w9ZznVSshKjuIomsRjvm9EKJQ==} - engines: {node: '>=18.17.0'} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.41.2 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - '@playwright/test': - optional: true - sass: - optional: true - dependencies: - '@next/env': 14.2.4 - '@swc/helpers': 0.5.5 - busboy: 1.6.0 - caniuse-lite: 1.0.30001642 - graceful-fs: 4.2.11 - postcss: 8.4.31 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.23.2)(react@18.2.0) - optionalDependencies: - '@next/swc-darwin-arm64': 14.2.4 - '@next/swc-darwin-x64': 14.2.4 - '@next/swc-linux-arm64-gnu': 14.2.4 - '@next/swc-linux-arm64-musl': 14.2.4 - '@next/swc-linux-x64-gnu': 14.2.4 - '@next/swc-linux-x64-musl': 14.2.4 - '@next/swc-win32-arm64-msvc': 14.2.4 - '@next/swc-win32-ia32-msvc': 14.2.4 - '@next/swc-win32-x64-msvc': 14.2.4 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - dev: false - /next@14.2.4(@babel/core@7.23.2)(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-R8/V7vugY+822rsQGQCjoLhMuC9oFj9SOi4Cl4b2wjDrseD0LRZ10W7R6Czo4w9ZznVSshKjuIomsRjvm9EKJQ==} engines: {node: '>=18.17.0'} @@ -7744,7 +7688,6 @@ packages: transitivePeerDependencies: - '@babel/core' - babel-plugin-macros - dev: true /node-gyp-build@4.8.1: resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==} @@ -8395,15 +8338,6 @@ packages: engines: {node: '>= 0.6'} dev: false - /react-dom@18.2.0(react@18.2.0): - resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} - peerDependencies: - react: ^18.2.0 - dependencies: - loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.2 - /react-dom@18.3.1(react@18.3.1): resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} peerDependencies: @@ -8493,14 +8427,14 @@ packages: use-sidecar: 1.1.2(@types/react@18.2.29)(react@18.3.1) dev: false - /react-resizable-panels@2.0.16(react-dom@18.2.0)(react@18.2.0): + /react-resizable-panels@2.0.16(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-UrnxmTZaTnbCl/xIOX38ig35RicqGfLuqt2x5fytpNlQvCRuxyXZwIBEhmF+pmrEGxfajyXFBoCplNxLvhF0CQ==} peerDependencies: react: ^16.14.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.14.0 || ^17.0.0 || ^18.0.0 dependencies: - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) dev: false /react-router-dom@6.25.1(react-dom@18.3.1)(react@18.3.1): @@ -8572,12 +8506,6 @@ packages: scheduler: 0.23.2 dev: true - /react@18.2.0: - resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} - engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - /react@18.3.1: resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} @@ -9256,7 +9184,7 @@ packages: inline-style-parser: 0.2.3 dev: false - /styled-components@6.1.1(react-dom@18.2.0)(react@18.2.0): + /styled-components@6.1.1(react-dom@18.3.1)(react@18.3.1): resolution: {integrity: sha512-cpZZP5RrKRIClBW5Eby4JM1wElLVP4NQrJbJ0h10TidTyJf4SIIwa3zLXOoPb4gJi8MsJ8mjq5mu2IrEhZIAcQ==} engines: {node: '>= 16'} peerDependencies: @@ -9269,31 +9197,13 @@ packages: css-to-react-native: 3.2.0 csstype: 3.1.3 postcss: 8.4.39 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) shallowequal: 1.1.0 stylis: 4.3.2 tslib: 2.6.3 dev: false - /styled-jsx@5.1.1(@babel/core@7.23.2)(react@18.2.0): - resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@babel/core': '*' - babel-plugin-macros: '*' - react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' - peerDependenciesMeta: - '@babel/core': - optional: true - babel-plugin-macros: - optional: true - dependencies: - '@babel/core': 7.23.2 - client-only: 0.0.1 - react: 18.2.0 - dev: false - /styled-jsx@5.1.1(@babel/core@7.23.2)(react@18.3.1): resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} engines: {node: '>= 12.0.0'} @@ -9310,7 +9220,6 @@ packages: '@babel/core': 7.23.2 client-only: 0.0.1 react: 18.3.1 - dev: true /stylis@4.3.2: resolution: {integrity: sha512-bhtUjWd/z6ltJiQwg0dUfxEJ+W+jdqQd8TbWLWyeIJHlnsqmGLRFFd8e5mA0AZi/zx90smXRlN66YMTcaSFifg==} From f1f8def3a07eb5ea4f804c9e1583174deba5c1bb Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Mon, 22 Jul 2024 16:12:22 +0200 Subject: [PATCH 5/9] switch to module --- packages/example/{next.config.js => next.config.mjs} | 4 ++-- packages/example/package.json | 1 + packages/example/postcss.config.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) rename packages/example/{next.config.js => next.config.mjs} (64%) diff --git a/packages/example/next.config.js b/packages/example/next.config.mjs similarity index 64% rename from packages/example/next.config.js rename to packages/example/next.config.mjs index dcbde6a9..323eda3e 100644 --- a/packages/example/next.config.js +++ b/packages/example/next.config.mjs @@ -1,11 +1,11 @@ -const { withYak } = require('next-yak/withYak'); +import { withYak } from 'next-yak/withYak'; /** @type {import('next').NextConfig} */ const nextConfig = { } -module.exports = withYak({ +export default withYak({ experiments: { crossFileSelectors: true } diff --git a/packages/example/package.json b/packages/example/package.json index 25514c7e..1eb310f7 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -1,6 +1,7 @@ { "name": "next-yak-example", "version": "0.1.0", + "type": "module", "private": true, "scripts": { "dev": "next dev", diff --git a/packages/example/postcss.config.js b/packages/example/postcss.config.js index 35a9d464..73176840 100644 --- a/packages/example/postcss.config.js +++ b/packages/example/postcss.config.js @@ -1,4 +1,4 @@ -module.exports = { +export default { plugins: { 'postcss-nested':{}, } From 57350fc4386f62e516f92744f895f0c68d902592 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Mon, 22 Jul 2024 16:33:04 +0200 Subject: [PATCH 6/9] fix vitest --- .../__snapshots__/Clock.test.tsx.snap | 2 +- .../__snapshots__/ClockHands.test.tsx.snap | 2 +- .../{jest.config.js => jest.config.cjs} | 0 packages/example/package.json | 4 +- packages/example/vitest.config.ts | 14 ++ pnpm-lock.yaml | 207 +----------------- 6 files changed, 25 insertions(+), 204 deletions(-) rename packages/example/{jest.config.js => jest.config.cjs} (100%) create mode 100644 packages/example/vitest.config.ts diff --git a/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap b/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap index 6ff50864..9d69f213 100644 --- a/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap +++ b/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap @@ -1,4 +1,4 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders Clock component 1`] = ` diff --git a/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap b/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap index 2caacfdd..07d34a88 100644 --- a/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap +++ b/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap @@ -1,4 +1,4 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders ClockHands component 1`] = ` diff --git a/packages/example/jest.config.js b/packages/example/jest.config.cjs similarity index 100% rename from packages/example/jest.config.js rename to packages/example/jest.config.cjs diff --git a/packages/example/package.json b/packages/example/package.json index 653cd83e..079d4c03 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -28,10 +28,10 @@ "devDependencies": { "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^14.0.0", - "@vitejs/plugin-react": "^4.2.1", + "@vitejs/plugin-react": "4.3.1", "@types/jest": "^29.5.12", "jest": "^29.6.2", - "vitest": "0.34.5", + "vitest": "2.0.4", "jest-environment-jsdom": "^29.6.2", "jsdom": "^22.1.0" } diff --git a/packages/example/vitest.config.ts b/packages/example/vitest.config.ts new file mode 100644 index 00000000..40f98f30 --- /dev/null +++ b/packages/example/vitest.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react" + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: + [ + react() + ], + test: { + globals: true, + environment: "jsdom", + } +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b3c35d65..8d44868a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -110,7 +110,7 @@ importers: specifier: ^29.5.12 version: 29.5.12 '@vitejs/plugin-react': - specifier: ^4.2.1 + specifier: 4.3.1 version: 4.3.1(vite@5.3.4) jest: specifier: ^29.6.2 @@ -122,8 +122,8 @@ importers: specifier: ^22.1.0 version: 22.1.0 vitest: - specifier: 0.34.5 - version: 0.34.5(jsdom@22.1.0) + specifier: 2.0.4 + version: 2.0.4(@types/node@20.4.5)(jsdom@22.1.0) packages/next-yak: dependencies: @@ -2961,16 +2961,6 @@ packages: resolution: {integrity: sha512-cKio2eFB3v7qmKcvIHLUMw/dIx/8bhWPuzpzRT4unCPRTD8VdA9Zb0afxpcxOqR4PixRS7yT42FqGS8BYL8g1w==} dev: true - /@types/chai-subset@1.3.5: - resolution: {integrity: sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==} - dependencies: - '@types/chai': 4.3.16 - dev: true - - /@types/chai@4.3.16: - resolution: {integrity: sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==} - dev: true - /@types/debug@4.1.12: resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} dependencies: @@ -3435,14 +3425,6 @@ packages: transitivePeerDependencies: - supports-color - /@vitest/expect@0.34.5: - resolution: {integrity: sha512-/3RBIV9XEH+nRpRMqDJBufKIOQaYUH2X6bt0rKSCW0MfKhXFLYsR5ivHifeajRSTsln0FwJbitxLKHSQz/Xwkw==} - dependencies: - '@vitest/spy': 0.34.5 - '@vitest/utils': 0.34.5 - chai: 4.4.1 - dev: true - /@vitest/expect@2.0.4: resolution: {integrity: sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==} dependencies: @@ -3458,14 +3440,6 @@ packages: tinyrainbow: 1.2.0 dev: true - /@vitest/runner@0.34.5: - resolution: {integrity: sha512-RDEE3ViVvl7jFSCbnBRyYuu23XxmvRTSZWW6W4M7eC5dOsK75d5LIf6uhE5Fqf809DQ1+9ICZZNxhIolWHU4og==} - dependencies: - '@vitest/utils': 0.34.5 - p-limit: 4.0.0 - pathe: 1.1.2 - dev: true - /@vitest/runner@2.0.4: resolution: {integrity: sha512-Gk+9Su/2H2zNfNdeJR124gZckd5st4YoSuhF1Rebi37qTXKnqYyFCd9KP4vl2cQHbtuVKjfEKrNJxHHCW8thbQ==} dependencies: @@ -3473,14 +3447,6 @@ packages: pathe: 1.1.2 dev: true - /@vitest/snapshot@0.34.5: - resolution: {integrity: sha512-+ikwSbhu6z2yOdtKmk/aeoDZ9QPm2g/ZO5rXT58RR9Vmu/kB2MamyDSx77dctqdZfP3Diqv4mbc/yw2kPT8rmA==} - dependencies: - magic-string: 0.30.10 - pathe: 1.1.2 - pretty-format: 29.7.0 - dev: true - /@vitest/snapshot@2.0.4: resolution: {integrity: sha512-or6Mzoz/pD7xTvuJMFYEtso1vJo1S5u6zBTinfl+7smGUhqybn6VjzCDMhmTyVOFWwkCMuNjmNNxnyXPgKDoPw==} dependencies: @@ -3489,26 +3455,12 @@ packages: pathe: 1.1.2 dev: true - /@vitest/spy@0.34.5: - resolution: {integrity: sha512-epsicsfhvBjRjCMOC/3k00mP/TBGQy8/P0DxOFiWyLt55gnZ99dqCfCiAsKO17BWVjn4eZRIjKvcqNmSz8gvmg==} - dependencies: - tinyspy: 2.2.1 - dev: true - /@vitest/spy@2.0.4: resolution: {integrity: sha512-uTXU56TNoYrTohb+6CseP8IqNwlNdtPwEO0AWl+5j7NelS6x0xZZtP0bDWaLvOfUbaYwhhWp1guzXUxkC7mW7Q==} dependencies: tinyspy: 3.0.0 dev: true - /@vitest/utils@0.34.5: - resolution: {integrity: sha512-ur6CmmYQoeHMwmGb0v+qwkwN3yopZuZyf4xt1DBBSGBed8Hf9Gmbm/5dEWqgpLPdRx6Av6jcWXrjcKfkTzg/pw==} - dependencies: - diff-sequences: 29.6.3 - loupe: 2.3.7 - pretty-format: 29.7.0 - dev: true - /@vitest/utils@2.0.4: resolution: {integrity: sha512-Zc75QuuoJhOBnlo99ZVUkJIuq4Oj0zAkrQ2VzCqNCx6wAwViHEh5Fnp4fiJTE9rA+sAoXRf00Z9xGgfEzV6fzQ==} dependencies: @@ -3819,10 +3771,6 @@ packages: util: 0.12.5 dev: true - /assertion-error@1.1.0: - resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} - dev: true - /assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -4185,19 +4133,6 @@ packages: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} dev: false - /chai@4.4.1: - resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} - engines: {node: '>=4'} - dependencies: - assertion-error: 1.1.0 - check-error: 1.0.3 - deep-eql: 4.1.4 - get-func-name: 2.0.2 - loupe: 2.3.7 - pathval: 1.1.1 - type-detect: 4.0.8 - dev: true - /chai@5.1.1: resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} engines: {node: '>=12'} @@ -4259,12 +4194,6 @@ packages: resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} dev: false - /check-error@1.0.3: - resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} - dependencies: - get-func-name: 2.0.2 - dev: true - /check-error@2.1.1: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} @@ -4414,6 +4343,7 @@ packages: /confbox@0.1.7: resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + dev: false /console-browserify@1.2.0: resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} @@ -4631,13 +4561,6 @@ packages: babel-plugin-macros: optional: true - /deep-eql@4.1.4: - resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} - engines: {node: '>=6'} - dependencies: - type-detect: 4.0.8 - dev: true - /deep-eql@5.0.2: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} @@ -6893,11 +6816,6 @@ packages: engines: {node: '>=6.11.5'} dev: true - /local-pkg@0.4.3: - resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} - engines: {node: '>=14'} - dev: true - /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -6947,12 +6865,6 @@ packages: dependencies: js-tokens: 4.0.0 - /loupe@2.3.7: - resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} - dependencies: - get-func-name: 2.0.2 - dev: true - /loupe@3.1.1: resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} dependencies: @@ -7708,6 +7620,7 @@ packages: pathe: 1.1.2 pkg-types: 1.1.3 ufo: 1.5.4 + dev: false /modern-ahocorasick@1.0.1: resolution: {integrity: sha512-yoe+JbhTClckZ67b2itRtistFKf8yPYelHLc7e5xAwtNAXxM6wJTUx2C7QeVSJFDzKT7bCIFyBVybPMKvmB9AA==} @@ -8169,10 +8082,6 @@ packages: /pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - /pathval@1.1.1: - resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} - dev: true - /pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} @@ -8233,6 +8142,7 @@ packages: confbox: 0.1.7 mlly: 1.7.1 pathe: 1.1.2 + dev: false /platform@1.3.6: resolution: {integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==} @@ -9280,12 +9190,6 @@ packages: engines: {node: '>=8'} dev: true - /strip-literal@1.3.0: - resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} - dependencies: - acorn: 8.12.1 - dev: true - /style-to-object@0.4.4: resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==} dependencies: @@ -9559,11 +9463,6 @@ packages: resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} dev: true - /tinypool@0.7.0: - resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} - engines: {node: '>=14.0.0'} - dev: true - /tinypool@1.0.0: resolution: {integrity: sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==} engines: {node: ^18.0.0 || >=20.0.0} @@ -9574,11 +9473,6 @@ packages: engines: {node: '>=14.0.0'} dev: true - /tinyspy@2.2.1: - resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} - engines: {node: '>=14.0.0'} - dev: true - /tinyspy@3.0.0: resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==} engines: {node: '>=14.0.0'} @@ -9770,6 +9664,7 @@ packages: /ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + dev: false /unified@10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} @@ -9981,28 +9876,6 @@ packages: vfile-message: 4.0.2 dev: false - /vite-node@0.34.5(@types/node@20.4.5): - resolution: {integrity: sha512-RNZ+DwbCvDoI5CbCSQSyRyzDTfFvFauvMs6Yq4ObJROKlIKuat1KgSX/Ako5rlDMfVCyMcpMRMTkJBxd6z8YRA==} - engines: {node: '>=v14.18.0'} - hasBin: true - dependencies: - cac: 6.7.14 - debug: 4.3.5 - mlly: 1.7.1 - pathe: 1.1.2 - picocolors: 1.0.1 - vite: 5.3.4(@types/node@20.4.5) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - /vite-node@1.6.0: resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -10148,72 +10021,6 @@ packages: optionalDependencies: fsevents: 2.3.3 - /vitest@0.34.5(jsdom@22.1.0): - resolution: {integrity: sha512-CPI68mmnr2DThSB3frSuE5RLm9wo5wU4fbDrDwWQQB1CWgq9jQVoQwnQSzYAjdoBOPoH2UtXpOgHVge/uScfZg==} - engines: {node: '>=v14.18.0'} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@vitest/browser': '*' - '@vitest/ui': '*' - happy-dom: '*' - jsdom: '*' - playwright: '*' - safaridriver: '*' - webdriverio: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - playwright: - optional: true - safaridriver: - optional: true - webdriverio: - optional: true - dependencies: - '@types/chai': 4.3.16 - '@types/chai-subset': 1.3.5 - '@types/node': 20.4.5 - '@vitest/expect': 0.34.5 - '@vitest/runner': 0.34.5 - '@vitest/snapshot': 0.34.5 - '@vitest/spy': 0.34.5 - '@vitest/utils': 0.34.5 - acorn: 8.12.1 - acorn-walk: 8.3.3 - cac: 6.7.14 - chai: 4.4.1 - debug: 4.3.5 - jsdom: 22.1.0 - local-pkg: 0.4.3 - magic-string: 0.30.10 - pathe: 1.1.2 - picocolors: 1.0.1 - std-env: 3.7.0 - strip-literal: 1.3.0 - tinybench: 2.8.0 - tinypool: 0.7.0 - vite: 5.3.4(@types/node@20.4.5) - vite-node: 0.34.5(@types/node@20.4.5) - why-is-node-running: 2.3.0 - transitivePeerDependencies: - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - dev: true - /vitest@2.0.4: resolution: {integrity: sha512-luNLDpfsnxw5QSW4bISPe6tkxVvv5wn2BBs/PuDRkhXZ319doZyLOBr1sjfB5yCEpTiU7xCAdViM8TNVGPwoog==} engines: {node: ^18.0.0 || >=20.0.0} From d73c573dccfce98cf0a9cb7552b941a15d470567 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Mon, 22 Jul 2024 16:41:24 +0200 Subject: [PATCH 7/9] add vite --- packages/example/package.json | 3 ++- pnpm-lock.yaml | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/example/package.json b/packages/example/package.json index 079d4c03..f6bf9c37 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -11,7 +11,7 @@ "start": "next start", "lint": "next lint", "test": "pnpm run test:vitest && pnpm run test:jest", - "test:vitest": "vitest run --globals --environment=jsdom", + "test:vitest": "vitest run", "test:jest": "jest", "test:watch": "jest --watch -u" }, @@ -31,6 +31,7 @@ "@vitejs/plugin-react": "4.3.1", "@types/jest": "^29.5.12", "jest": "^29.6.2", + "vite": "5.3.4", "vitest": "2.0.4", "jest-environment-jsdom": "^29.6.2", "jsdom": "^22.1.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d44868a..730afb8e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -121,6 +121,9 @@ importers: jsdom: specifier: ^22.1.0 version: 22.1.0 + vite: + specifier: 5.3.4 + version: 5.3.4(@types/node@20.4.5) vitest: specifier: 2.0.4 version: 2.0.4(@types/node@20.4.5)(jsdom@22.1.0) From d65bde9e09bc493fa45605d745c35c994a570da3 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Mon, 22 Jul 2024 16:44:59 +0200 Subject: [PATCH 8/9] typings --- packages/example/vitest.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/example/vitest.config.ts b/packages/example/vitest.config.ts index 40f98f30..64c66580 100644 --- a/packages/example/vitest.config.ts +++ b/packages/example/vitest.config.ts @@ -1,3 +1,4 @@ +/// import { defineConfig } from "vite"; import react from "@vitejs/plugin-react" From d92f60bd383da8edc6cdc148f3707f63d0743f5f Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Tue, 23 Jul 2024 07:54:09 +0200 Subject: [PATCH 9/9] update snapshots --- .../__snapshots__/Clock.test.tsx.snap | 36 ++++--------------- .../__snapshots__/ClockHands.test.tsx.snap | 12 ++----- 2 files changed, 9 insertions(+), 39 deletions(-) diff --git a/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap b/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap index 9d69f213..1999fe9a 100644 --- a/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap +++ b/packages/example/app/__tests__/__snapshots__/Clock.test.tsx.snap @@ -2,96 +2,72 @@ exports[`renders Clock component 1`] = ` -
-
+
+
+
-
12
1
2
3
4
5
6
7
8
9
10
11
-
-
-
+
+
+
diff --git a/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap b/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap index 07d34a88..4da9282e 100644 --- a/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap +++ b/packages/example/app/__tests__/__snapshots__/ClockHands.test.tsx.snap @@ -2,14 +2,8 @@ exports[`renders ClockHands component 1`] = ` -
-
-
+
+
+
`;