fix(tests): strip devEngines from temp package so changeset tests pass in CI#179
Conversation
…pnpm install Recent pnpm 'init' writes a devEngines.packageManager block into the temp package.json, which makes the subsequent 'pnpm install' crash with "Cannot use 'in' operator to search for 'integrity' in undefined". Stripping the block fixes the changeset-based test suites in CI.
|
🚀 Following releases will be created using changesets from this PR:@fingerprintjs/eslint-config-dx-team@3.0.0Major Changes
|
This PR will create a major release 🚀
|
Coverage report
Test suite run success15 tests passing in 7 suites. Report generated by 🧪jest coverage report action from b542ee7 Show full coverage report
|
There was a problem hiding this comment.
Pull request overview
Updates the Changesets test helper to make CI test runs resilient to pnpm runner-image changes by removing pnpm-generated package-manager metadata from the temporary fixture package before installing dependencies.
Changes:
- Parse the temp package’s
package.jsonwith an extended type that toleratesdevEngines/packageManager. - Delete
devEnginesandpackageManagerfrom the generatedpackage.jsonprior topnpm installto avoid pnpm install failures triggered by newly-added metadata.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Jira: INTER-2305
devEngines/packageManagermetadata from the temp fixture package ininitTestPackagebefore runningpnpm install.Fixes the changeset-based test suites, which broke the
Releaseworkflow with no relevant code change.Why it broke
pnpm initnow writes adevEngines.packageManagerblock into the generatedpackage.json, and the followingpnpm installchokes on it (Cannot use 'in' operator to search for 'integrity' in undefined). The block's shape depends on the pnpm version, which changed under us via a GitHub runner-image update — so this is environmental, not caused by the merged code. Stripping the metadata makes the fixture install predictably with whatever pnpm runs the tests.Verification
Confirmed in CI on a throwaway branch: the nested
pnpm installcrashes with the block present and succeeds once it's removed.