Open
Description
- Follow on from issue ci vitest fails "handle integrity checks" on Windows Node.js 23 #597
Current behavior
vitest
fails running on Windows 11 24H2 with Node.js 24.1.0
This is a re-appearance of the same issue that previously occurred on Node.js 23.
Expected behavior
Executing yarn test
on Windows 11 24H2 with Node.js 24.x should pass all tests.
Steps to reproduce
Windows 11 24H2
Initially reported for Node.js: v24.1.0
Continues to be reproducible on Node.js: v24.2.0
Use Drive C:
for clone
git clone https://github.com/nodejs/corepack
cd corepack
corepack yarn
corepack yarn build
corepack yarn run vitest --run
or to only run the test section which fails:
corepack yarn run vitest run -t "handle integrity checks"
Logs
$ corepack yarn run vitest run -t "handle integrity checks"
RUN v3.0.7 C:/Users/mikem/github/corepack
↓ tests/Up.test.ts (4 tests | 4 skipped)
↓ tests/Use.test.ts (8 tests | 8 skipped)
↓ tests/npmRegistryUtils.test.ts (7 tests | 7 skipped)
↓ tests/config.test.ts (1 test | 1 skipped)
↓ tests/corepackUtils.test.ts (4 tests | 4 skipped)
↓ tests/Enable.test.ts (3 tests | 3 skipped)
↓ tests/Disable.test.ts (3 tests | 3 skipped)
❯ tests/main.test.ts (108 tests | 1 failed | 99 skipped) 5963ms
↓ should refuse to download a known package manager from a URL
↓ should refuse to download a known package manager from a URL in package.json
↓ should require a version to be specified
↓ should use the right package manager version for a given project ([email protected])
↓ should use the right package manager version for a given project ([email protected]+sha1.01c1197ca5b27f21edc8bc472cd4c8ce0e5a470e)
↓ should use the right package manager version for a given project ([email protected]+sha224.0d6eecaf4d82ec12566fdd97143794d0f0c317e0d652bd4d1b305430)
↓ should use the right package manager version for a given project (yarn@https://registry.npmjs.com/yarn/-/yarn-1.22.21.tgz)
↓ should use the right package manager version for a given project (yarn@https://registry.npmjs.com/yarn/-/yarn-1.22.21.tgz#sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72)
↓ should use the right package manager version for a given project ([email protected])
↓ should use the right package manager version for a given project ([email protected]+sha1.4f0423b01bcb57f8e390b4e0f1990831f92dd1da)
↓ should use the right package manager version for a given project ([email protected]+sha224.0e7a64468c358596db21c401ffeb11b6534fce7367afd3ae640eadf1)
↓ should use the right package manager version for a given project ([email protected])
↓ should use the right package manager version for a given project ([email protected]+sha1.694bdad81703169e203febd57f9dc97d3be867bd)
↓ should use the right package manager version for a given project ([email protected]+sha224.f83f6d1cbfac10ba6b516a62ccd2a72ccd857aa6c514d1cd7185ec60)
↓ should use the right package manager version for a given project ([email protected])
↓ should use the right package manager version for a given project ([email protected]+sha1.7cffc04295f4db4740225c6c37cc345eb923c06a)
↓ should use the right package manager version for a given project ([email protected]+sha224.7783c4b01916b7a69e6ff05d328df6f83cb7f127e9c96be88739386d)
↓ should use the right package manager version for a given project ([email protected])
↓ should use the right package manager version for a given project ([email protected]+sha1.7b4d6b176c1b93b5670ed94c24babb7d80c13854)
↓ should use the right package manager version for a given project ([email protected]+sha224.eb5c0acad3b0f40ecdaa2db9aa5a73134ad256e17e22d1419a2ab073)
↓ should use the right package manager version for a given project ([email protected])
↓ should use the right package manager version for a given project ([email protected]+sha1.f057d35cd4792c4c511bb1fa332edb43143d07b0)
↓ should use the right package manager version for a given project ([email protected]+sha224.50512c1eb404900ee78586faa6d756b8d867ff46a328e6fb4cdf3a87)
↓ should update the Known Good Release only when the major matches
↓ should ignore the packageManager field when found within a node_modules vendor
↓ should use hash from "packageManager" even when "devEngines" defines a different one
↓ should use the closest matching packageManager field
↓ should expose its root to spawned processes
↓ shouldn't allow using regular Yarn commands on npm-configured projects
↓ should allow using transparent commands on npm-configured projects
↓ should transparently use the preconfigured version when there is no local project
↓ should use the pinned version when local projects don't list any spec (npm)
↓ should use the pinned version when local projects don't list any spec (pnpm)
↓ should use the pinned version when local projects don't list any spec (yarn)
↓ should allow updating the pinned version using the "corepack install -g" command
↓ should allow to call "corepack install -g" with a tag
↓ should allow to call "corepack install -g" without any range
↓ should allow to call "corepack install" without arguments within a configured project
↓ should refuse to run a different package manager within a configured project
↓ should always use fallback version when project spec env is disabled
↓ should support disabling the network accesses from the environment
↓ should support hydrating package managers from cached archives
↓ should support hydrating package managers if cache folder was removed
↓ should support hydrating multiple package managers from cached archives
↓ should support running package managers with bin array
↓ should handle parallel installs
↓ should not override the package manager exit code
↓ should not preserve the process.exitCode when a package manager throws
↓ should not set the exit code after successfully launching the package manager
↓ should support package managers in ESM format
↓ should be able to show the latest version
↓ should download yarn classic from custom registry
↓ should download yarn berry from custom registry
↓ should download latest pnpm from custom registry
↓ should refuse to download a package manager if the hash doesn't match > the one defined in "devEngines.packageManager" field
↓ should refuse to download a package manager if the hash doesn't match > the one defined in "packageManager" field
↓ should handle invalid devEngines values > throw on missing version
↓ should handle invalid devEngines values > throw on invalid version
↓ should handle invalid devEngines values > warn on array values
↓ should handle invalid devEngines values > warn on string values
↓ should handle invalid devEngines values > warn on number values
↓ should accept range in devEngines only if a specific version is provided > either in package.json#packageManager field
↓ when devEngines.packageManager.name does not match packageManager > should ignore if devEngines.packageManager.onFail is set to "ignore"
↓ when devEngines.packageManager.name does not match packageManager > should warn if devEngines.packageManager.onFail is set to "warn"
↓ when devEngines.packageManager.name does not match packageManager > should throw if devEngines.packageManager.onFail is set to "error"
↓ when devEngines.packageManager.name does not match packageManager > should throw by default
↓ should reject if range in devEngines does not match version provided > unless onFail is set to "ignore"
↓ should reject if range in devEngines does not match version provided > unless onFail is set to "warn"
↓ should reject if range in devEngines does not match version provided > in package.json#packageManager field
↓ when called on a project without any defined packageManager > should not modify package.json by default
↓ when called on a project without any defined packageManager > should modify package.json if enabled by env
↓ when called on a project without any defined packageManager > should modify package.json if enabled by .corepack.env
↓ when called on a project without any defined packageManager > should not modify package.json if .corepack.env is disabled
↓ read-only and offline environment > should support running in project scope
↓ read-only and offline environment > should support running globally
↓ should show a warning on stderr before downloading when enable > when enabled by the environment
↓ should show a warning on stderr before downloading when enable > should ignore setting in .corepack.env
↓ should pick up COREPACK_INTEGRITY_KEYS from env > from env variable
↓ should pick up COREPACK_INTEGRITY_KEYS from env > from .corepack.env file
↓ should pick up COREPACK_INTEGRITY_KEYS from env > from env file defined by COREPACK_ENV_FILE
↓ should pick up COREPACK_INTEGRITY_KEYS from env > from env even if there's a .corepack.env file
↓ should pick up COREPACK_INTEGRITY_KEYS from env > should ignore .corepack.env file if COREPACK_ENV_FILE is set to 0
↓ should pick up COREPACK_INTEGRITY_KEYS from env > from env file defined by COREPACK_ENV_FILE
↓ custom registry with auth COREPACK_NPM_REGISTRY > should download yarn classic
↓ custom registry with auth COREPACK_NPM_REGISTRY > should download yarn berry
↓ custom registry with auth COREPACK_NPM_REGISTRY > should download pnpm
↓ custom registry with auth COREPACK_NPM_REGISTRY > should download custom package manager
↓ custom registry with auth COREPACK_NPM_TOKEN > should download yarn classic
↓ custom registry with auth COREPACK_NPM_TOKEN > should download yarn berry
↓ custom registry with auth COREPACK_NPM_TOKEN > should download pnpm
↓ custom registry with auth COREPACK_NPM_TOKEN > should download custom package manager
↓ custom registry with auth COREPACK_NPM_PASSWORD > should download yarn classic
↓ custom registry with auth COREPACK_NPM_PASSWORD > should download yarn berry
↓ custom registry with auth COREPACK_NPM_PASSWORD > should download pnpm
↓ custom registry with auth COREPACK_NPM_PASSWORD > should download custom package manager
↓ custom registry with auth PROXY > should download yarn classic
↓ custom registry with auth PROXY > should download yarn berry
↓ custom registry with auth PROXY > should download pnpm
↓ custom registry with auth PROXY > should download custom package manager
× handle integrity checks > should return an error when signature does not match with a range 1146ms (retry x2)
→ expected { exitCode: 3221226505, …(2) } to match object { exitCode: 1, …(2) }
→ expected { exitCode: 3221226505, …(2) } to match object { exitCode: 1, …(2) }
→ expected { exitCode: 3221226505, …(2) } to match object { exitCode: 1, …(2) }
✓ handle integrity checks > should return an error when signature does not match with a tag
✓ handle integrity checks > should return an error when hash does not match without a tag 1016ms
✓ handle integrity checks > should return an error when signature does not match without a tag 938ms
✓ handle integrity checks > should return an error when signature does not match when version is provided 502ms
✓ handle integrity checks > should return an error when hash does not match 505ms
✓ handle integrity checks > should return no error when signature does not match when hash is provided 529ms
✓ handle integrity checks > when signature matches > should return no error when calling 'corepack use' 702ms
✓ handle integrity checks > when signature matches > should return no error when fetching latest version 365ms
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
FAIL tests/main.test.ts > handle integrity checks > should return an error when signature does not match with a range
FAIL tests/main.test.ts > handle integrity checks > should return an error when signature does not match with a range
FAIL tests/main.test.ts > handle integrity checks > should return an error when signature does not match with a range
AssertionError: expected { exitCode: 3221226505, …(2) } to match object { exitCode: 1, …(2) }
- Expected
+ Received
{
- "exitCode": 1,
+ "exitCode": 3221226505,
"stderr": StringContaining "Signature does not match",
"stdout": "",
}
❯ tests/main.test.ts:1587:7
1585|
1586| await xfs.mktempPromise(async cwd => {
1587| await expect(runCli(cwd, [`[email protected]`, `--version`], true)).resolves.toMatchObject({
| ^
1588| exitCode: 1,
1589| stderr: expect.stringContaining(`Signature does not match`),
❯ NodeFS.mktempPromise ../../AppData/Local/Yarn/Berry/cache/@yarnpkg-fslib-npm-3.1.1-dfd6328a15-10c0.zip/node_modules/@yarnpkg/fslib/lib/xfs.js:86:24
❯ tests/main.test.ts:1586:5
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯
Test Files 1 failed | 7 skipped (8)
Tests 1 failed | 8 passed | 129 skipped (138)
Start at 10:16:51
Duration 7.14s (transform 640ms, setup 416ms, collect 2.39s, tests 5.96s, environment 2ms, prepare 2.07s)
Metadata
Metadata
Assignees
Labels
No labels