Skip to content

Commit f0e9cc0

Browse files
odinrCopilot
andauthored
deps: centralize Playwright workspace versions (#5564)
* fix(deps): centralize Playwright workspace versions Use pnpm's catalog protocol for Playwright dependencies so cookbook and package test environments resolve one compatible version. Keep the memfs resolution compatible with imports tests and record the package updates in a changeset.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(cli): stop Vite from inlining the optional plugin's real deps resolveOptionalPlugin dynamically imports a real workspace package through a pnpm symlink. Vite follows the symlink to a real path with no node_modules segment, so its externalization heuristic misclassified the package (and transitively esbuild, via @equinor/fusion-imports) as local, forcing it through Vite's SSR transform pipeline instead of a native import. That pipeline stalls indefinitely once the shared Vite server is busy with the rest of the aggregate test suite, causing the CLI's optional-plugin test to time out only when run alongside the full workspace suite. Setting resolve.preserveSymlinks keeps the resolved id at the symlink path, so Vite correctly externalizes the package instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8844d87 commit f0e9cc0

17 files changed

Lines changed: 139 additions & 134 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@equinor/fusion-framework-cookbook-app-react-context": patch
3+
"@equinor/fusion-framework-cookbook-app-react-feature-flag": patch
4+
"@equinor/fusion-framework-cookbook-app-react-mock-playwright": patch
5+
"@equinor/fusion-framework-cookbook-app-react-module": patch
6+
"@equinor/fusion-framework-cookbook-app-react-msal": patch
7+
"@equinor/fusion-framework-cookbook-app-react-roles": patch
8+
"@equinor/fusion-framework-cookbook-app-react-router": patch
9+
"@equinor/fusion-framework-cookbook-app-react": patch
10+
"@equinor/fusion-framework-dev-portal": patch
11+
"@equinor/fusion-framework-react-app": patch
12+
"@equinor/fusion-framework-react-components-roles": patch
13+
"@equinor/fusion-observable": patch
14+
"@equinor/fusion-framework-vitest-plugin-react-app": patch
15+
---
16+
17+
Internal: use the workspace Playwright catalog so all packages resolve a single compatible version.

cookbooks/app-react-context/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
"@equinor/fusion-framework-module-context": "workspace:^",
3838
"@equinor/fusion-framework-vitest-plugin-react-app": "workspace:^",
3939
"@equinor/fusion-openapi-mock-server": "workspace:^",
40-
"@playwright/test": "^1.62.1",
40+
"@playwright/test": "catalog:",
4141
"@vitest/browser-playwright": "^4.1.0",
4242
"concurrently": "^10.0.5",
4343
"odata-query": "^8.0.4",
44-
"playwright": "^1.62.1",
44+
"playwright": "catalog:",
4545
"rxjs": "^7.8.1",
4646
"typescript": "^7.0.2",
4747
"vitest": "^4.1.10",

cookbooks/app-react-feature-flag/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@equinor/fusion-framework": "workspace:^",
3232
"@equinor/fusion-framework-vitest-plugin-react-app": "workspace:^",
3333
"@vitest/browser-playwright": "^4.1.0",
34-
"playwright": "^1.62.1",
34+
"playwright": "catalog:",
3535
"vitest": "^4.1.10",
3636
"vitest-browser-react": "^2.2.0"
3737
}

cookbooks/app-react-mock-playwright/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@equinor/fusion-framework-react-app": "workspace:^",
2424
"@equinor/fusion-framework-react-router": "workspace:^",
2525
"@equinor/fusion-openapi-mock-server": "workspace:^",
26-
"@playwright/test": "^1.62.1",
26+
"@playwright/test": "catalog:",
2727
"@types/react": "^19.2.7",
2828
"@types/react-dom": "^19.2.3",
2929
"concurrently": "^10.0.5",

cookbooks/app-react-module/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@types/react": "^19.2.7",
2323
"@types/react-dom": "^19.2.3",
2424
"@vitest/browser-playwright": "^4.1.0",
25-
"playwright": "^1.62.1",
25+
"playwright": "catalog:",
2626
"react": "^19.2.1",
2727
"react-dom": "^19.2.1",
2828
"typescript": "^7.0.2",

cookbooks/app-react-msal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@types/react": "^19.2.7",
2121
"@types/react-dom": "^19.2.3",
2222
"@vitest/browser-playwright": "^4.1.0",
23-
"playwright": "^1.62.1",
23+
"playwright": "catalog:",
2424
"react": "^19.2.1",
2525
"react-dom": "^19.2.1",
2626
"typescript": "^7.0.2",

cookbooks/app-react-roles/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@equinor/fusion-framework-react-app": "workspace:^",
2323
"@equinor/fusion-framework-react-components-roles": "workspace:^",
2424
"@equinor/fusion-openapi-mock-server": "workspace:^",
25-
"@playwright/test": "^1.62.1",
25+
"@playwright/test": "catalog:",
2626
"@types/react": "^19.2.7",
2727
"@types/react-dom": "^19.2.3",
2828
"concurrently": "^10.0.5",

cookbooks/app-react-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@types/react": "^19.2.7",
4242
"@types/react-dom": "^19.2.3",
4343
"@vitest/browser-playwright": "^4.1.0",
44-
"playwright": "^1.62.1",
44+
"playwright": "catalog:",
4545
"react": "^19.2.1",
4646
"react-dom": "^19.2.1",
4747
"typescript": "^7.0.2",

cookbooks/app-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@types/react": "^19.2.7",
2222
"@types/react-dom": "^19.2.3",
2323
"@vitest/browser-playwright": "^4.1.0",
24-
"playwright": "^1.62.1",
24+
"playwright": "catalog:",
2525
"react": "^19.2.1",
2626
"react-dom": "^19.2.1",
2727
"typescript": "^7.0.2",

packages/cli/vitest.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ import { defineProject } from 'vitest/config';
33
import { name, version } from './package.json' with { type: 'json' };
44

55
export default defineProject({
6+
// Without this, Vite resolves pnpm's workspace symlinks to their real path (no `node_modules`
7+
// segment), so its default externalization heuristic misclassifies `resolveOptionalPlugin`'s
8+
// dynamic `import()` of `@equinor/fusion-framework-cli-plugin-mock-server` as a local module.
9+
// That forces its whole dependency graph (including `esbuild`, via `@equinor/fusion-imports`)
10+
// through Vite's SSR transform pipeline instead of a plain Node import, which stalls
11+
// indefinitely once the shared Vite server is busy with the rest of the workspace's test suite.
12+
resolve: {
13+
preserveSymlinks: true,
14+
},
615
test: {
716
include: ['src/**/*.test.ts'],
817
name: `${name}@${version}`,

0 commit comments

Comments
 (0)