Skip to content

Commit 59aa22c

Browse files
Brooooooklynclaude
andcommitted
fix(migration): only manage pnpm allowBuilds when webdriverio is used
edgedriver/geckodriver reach a project's dependency tree solely through the opt-in webdriverio Vitest browser provider, which is an OPTIONAL peer of both vite-plus and vitest (peerDependenciesMeta.optional). pnpm's autoInstallPeers never installs an optional peer, so a non-webdriverio project never installs those drivers — the `allowBuilds.<driver>: false` default-deny the migrator wrote for every pnpm v10 project was inert config. Make the migrator hands-off: when the project does not use webdriverio it now writes nothing to allowBuilds and leaves any user-authored entry (their own build-script trust decision) untouched. The webdriverio-present path still writes `true` — load-bearing, since those drivers really install and their postinstall must run, and it still overwrites a stale `false` when webdriverio is added later. This also drops the stale-`false` cleanup that, with the default-deny gone, could delete a user's intentional `false` and could orphan a YAML anchor/alias on deletion (crashing serialization). The now-unused directDriverDeps collection/threading (collectDirectDriverDeps, collectWorkspaceDirectDriverDeps, hasOwnDriverPostinstallDependency) is removed. 64 migration snaps drop the inert allowBuilds block; the one webdriverio fixture keeps `true`. 220 migrator + 718 vite-plus src tests pass; vp check clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent d21d56d commit 59aa22c

66 files changed

Lines changed: 101 additions & 406 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/cli/snap-tests-global/migration-add-git-hooks/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ catalog:
2929
vite: npm:@voidzero-dev/vite-plus-core@latest
3030
vitest: <semver>
3131
vite-plus: latest
32-
allowBuilds:
33-
edgedriver: false
34-
geckodriver: false
3532
overrides:
3633
vite: 'catalog:'
3734
vitest: 'catalog:'

packages/cli/snap-tests-global/migration-auto-create-vite-config/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ catalog:
5959
vite: npm:@voidzero-dev/vite-plus-core@latest
6060
vitest: <semver>
6161
vite-plus: latest
62-
allowBuilds:
63-
edgedriver: false
64-
geckodriver: false
6562
overrides:
6663
vite: 'catalog:'
6764
vitest: 'catalog:'

packages/cli/snap-tests-global/migration-baseurl-tsconfig/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ catalog:
6262
vite: npm:@voidzero-dev/vite-plus-core@latest
6363
vitest: <semver>
6464
vite-plus: latest
65-
allowBuilds:
66-
edgedriver: false
67-
geckodriver: false
6865
overrides:
6966
vite: 'catalog:'
7067
vitest: 'catalog:'

packages/cli/snap-tests-global/migration-chained-lint-staged-pre-commit/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ catalog:
2929
vite: npm:@voidzero-dev/vite-plus-core@latest
3030
vitest: <semver>
3131
vite-plus: latest
32-
allowBuilds:
33-
edgedriver: false
34-
geckodriver: false
3532
overrides:
3633
vite: 'catalog:'
3734
vitest: 'catalog:'

packages/cli/snap-tests-global/migration-composed-husky-custom-dir/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ catalog:
2929
vite: npm:@voidzero-dev/vite-plus-core@latest
3030
vitest: <semver>
3131
vite-plus: latest
32-
allowBuilds:
33-
edgedriver: false
34-
geckodriver: false
3532
overrides:
3633
vite: 'catalog:'
3734
vitest: 'catalog:'

packages/cli/snap-tests-global/migration-composed-husky-prepare/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ catalog:
2929
vite: npm:@voidzero-dev/vite-plus-core@latest
3030
vitest: <semver>
3131
vite-plus: latest
32-
allowBuilds:
33-
edgedriver: false
34-
geckodriver: false
3532
overrides:
3633
vite: 'catalog:'
3734
vitest: 'catalog:'

packages/cli/snap-tests-global/migration-env-prefix-lint-staged/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ catalog:
2929
vite: npm:@voidzero-dev/vite-plus-core@latest
3030
vitest: <semver>
3131
vite-plus: latest
32-
allowBuilds:
33-
edgedriver: false
34-
geckodriver: false
3532
overrides:
3633
vite: 'catalog:'
3734
vitest: 'catalog:'

packages/cli/snap-tests-global/migration-eslint-lint-staged/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ catalog:
2929
vite: npm:@voidzero-dev/vite-plus-core@latest
3030
vitest: <semver>
3131
vite-plus: latest
32-
allowBuilds:
33-
edgedriver: false
34-
geckodriver: false
3532
overrides:
3633
vite: 'catalog:'
3734
vitest: 'catalog:'

packages/cli/snap-tests-global/migration-eslint-lintstagedrc/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ catalog:
2929
vite: npm:@voidzero-dev/vite-plus-core@latest
3030
vitest: <semver>
3131
vite-plus: latest
32-
allowBuilds:
33-
edgedriver: false
34-
geckodriver: false
3532
overrides:
3633
vite: 'catalog:'
3734
vitest: 'catalog:'

packages/cli/snap-tests-global/migration-eslint-npx-wrapper/snap.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ catalog:
3434
vite: npm:@voidzero-dev/vite-plus-core@latest
3535
vitest: <semver>
3636
vite-plus: latest
37-
allowBuilds:
38-
edgedriver: false
39-
geckodriver: false
4037
overrides:
4138
vite: 'catalog:'
4239
vitest: 'catalog:'

0 commit comments

Comments
 (0)