-
Notifications
You must be signed in to change notification settings - Fork 186
refactor: replace @voidzero-dev/vite-plus-test with upstream vitest@4.1.5 #1588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5e1175a
489e1a9
0457c21
da4afa5
47b092b
df837ad
d0ca282
db89371
5c28ed0
6bfbc9e
acdc265
ef0f426
f1ffa28
91b25fd
b160359
2308bfc
8c12841
8bed206
8b7f240
6678bcc
c40b6ae
2480114
5c4d75d
59f21e5
466ac24
ae8c713
11b6572
3de37b2
7741d18
dac4b2c
7314ffc
3aed2b9
afe5616
51f187c
8fe2439
2bbeba8
7a4def1
7306f4f
d956b43
b576428
89718b6
3d88c31
1616923
5c726e9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,9 +93,29 @@ jobs: | |
| - name: Pack packages into tgz | ||
| run: | | ||
| mkdir -p tmp/tgz | ||
| # Pack core and CLI normally (version stays at 0.0.0). | ||
| cd packages/core && pnpm pack --pack-destination ../../tmp/tgz && cd ../.. | ||
| cd packages/test && pnpm pack --pack-destination ../../tmp/tgz && cd ../.. | ||
| cd packages/cli && pnpm pack --pack-destination ../../tmp/tgz && cd ../.. | ||
| # Bun is uniquely strict about peer-dep resolution: | ||
| # 1. It checks the *resolved target's* package name and version | ||
| # against the peer range (vitest 4.1.5 declares peer | ||
| # `vite ^6 || ^7 || ^8`). | ||
| # 2. A file: override pointing at the vite-plus-core tgz fails | ||
| # both the name check (target is `@voidzero-dev/vite-plus-core`, | ||
| # not `vite`) and the version check (0.0.0 is outside `^6|^7|^8`). | ||
| # pnpm/npm/yarn don't enforce either, and using the same core tgz as | ||
| # the file: target for both `vite` and `@voidzero-dev/vite-plus-core` | ||
| # is the only configuration they install cleanly. See | ||
| # https://github.com/oven-sh/bun/issues/8406. | ||
| # | ||
| # Generate a sibling vite-7.99.0.tgz: a copy of the core tgz with | ||
| # `package.json#name` rewritten to "vite" and `version` to 7.99.0. | ||
| # Only the bun matrix entry below points its vite override at this | ||
| # alias tgz; pnpm/npm/yarn keep pointing at the real core tgz so | ||
| # pnpm's workspace resolver doesn't trip on a "vite@<version>" | ||
| # registry lookup (the renamed tgz makes pnpm register the dep as | ||
| # vite@7.99.0 and then probe npmjs.org to validate the version). | ||
| pnpm exec tool repack-vite-tgz tmp/tgz/voidzero-dev-vite-plus-core-0.0.0.tgz tmp/tgz/vite-7.99.0.tgz vite 7.99.0 | ||
| # Copy vp binary for test jobs | ||
| cp target/x86_64-unknown-linux-gnu/release/vp tmp/tgz/vp | ||
| ls -la tmp/tgz | ||
|
|
@@ -152,7 +172,12 @@ jobs: | |
| - yarn | ||
| - bun | ||
| env: | ||
| VP_OVERRIDE_PACKAGES: '{"vite":"file:${{ github.workspace }}/tmp/tgz/voidzero-dev-vite-plus-core-0.0.0.tgz","vitest":"file:${{ github.workspace }}/tmp/tgz/voidzero-dev-vite-plus-test-0.0.0.tgz","@voidzero-dev/vite-plus-core":"file:${{ github.workspace }}/tmp/tgz/voidzero-dev-vite-plus-core-0.0.0.tgz","@voidzero-dev/vite-plus-test":"file:${{ github.workspace }}/tmp/tgz/voidzero-dev-vite-plus-test-0.0.0.tgz"}' | ||
| # Bun's strict peer check requires the `vite` override target's tgz to be | ||
| # named "vite" with a version satisfying vitest's `peer vite ^6 || ^7 || ^8`. | ||
| # The bun matrix entry uses the masquerade tgz (vite-7.99.0.tgz). pnpm/npm/yarn | ||
| # point at the real core tgz — anything else trips a registry lookup for | ||
| # vite@<version> when sub-package and override targets are both file: tgz aliases. | ||
| VITE_OVERRIDE_TGZ: ${{ matrix.package-manager == 'bun' && 'vite-7.99.0.tgz' || 'voidzero-dev-vite-plus-core-0.0.0.tgz' }} | ||
| VP_VERSION: 'file:${{ github.workspace }}/tmp/tgz/vite-plus-0.0.0.tgz' | ||
| # Force full dependency rewriting so the library template's existing | ||
| # vite-plus dep gets overridden with the local tgz | ||
|
|
@@ -185,6 +210,8 @@ jobs: | |
|
|
||
| - name: Run vp create ${{ matrix.template.name }} with ${{ matrix.package-manager }} | ||
| working-directory: ${{ runner.temp }} | ||
| env: | ||
| VP_OVERRIDE_PACKAGES: '{"vite":"file:${{ github.workspace }}/tmp/tgz/${{ env.VITE_OVERRIDE_TGZ }}","@voidzero-dev/vite-plus-core":"file:${{ github.workspace }}/tmp/tgz/voidzero-dev-vite-plus-core-0.0.0.tgz","vitest":"4.1.5","@vitest/expect":"4.1.5","@vitest/runner":"4.1.5","@vitest/snapshot":"4.1.5","@vitest/spy":"4.1.5","@vitest/utils":"4.1.5","@vitest/mocker":"4.1.5","@vitest/pretty-format":"4.1.5","@vitest/coverage-v8":"4.1.5","@vitest/coverage-istanbul":"4.1.5"}' | ||
|
Brooooooklyn marked this conversation as resolved.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoded vitest versions in workflow will drift from constantLow Severity The Additional Locations (1)Reviewed by Cursor Bugbot for commit 5c726e9. Configure here. |
||
| run: | | ||
| vp create ${{ matrix.template.create-args }} \ | ||
| --no-interactive \ | ||
|
|
||


Uh oh!
There was an error while loading. Please reload this page.