Skip to content

fix(tests): strip devEngines from temp package so changeset tests pass in CI#179

Merged
JuroUhlar merged 2 commits into
mainfrom
fix/changeset-tests-devengines
Jul 13, 2026
Merged

fix(tests): strip devEngines from temp package so changeset tests pass in CI#179
JuroUhlar merged 2 commits into
mainfrom
fix/changeset-tests-devengines

Conversation

@JuroUhlar

@JuroUhlar JuroUhlar commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Jira: INTER-2305

  • Strip pnpm-generated devEngines / packageManager metadata from the temp fixture package in initTestPackage before running pnpm install.

Fixes the changeset-based test suites, which broke the Release workflow with no relevant code change.

Why it broke

pnpm init now writes a devEngines.packageManager block into the generated package.json, and the following pnpm install chokes 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 install crashes with the block present and succeeds once it's removed.

…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.
@JuroUhlar
JuroUhlar requested a review from a team as a code owner July 13, 2026 10:02
@changeset-bot

changeset-bot Bot commented Jul 13, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b542ee7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Following releases will be created using changesets from this PR:

@fingerprintjs/eslint-config-dx-team@3.0.0

Major Changes

  • Move eslint and typescript-eslint to peer dependencies

    Under strict package managers (pnpm v10+), transitive dependencies are no longer exposed at the project root, which broke eslint bin resolution and import ... from 'typescript-eslint' in consuming projects. Declaring them as peers guarantees a single, project-controlled instance of each and avoids "multiple ESLint instances" errors.

    Breaking change: consumers must now install eslint and typescript-eslint themselves (plus typescript, which typescript-eslint requires as a peer):

    pnpm install -D eslint typescript-eslint typescript

    The redundant @typescript-eslint/eslint-plugin and @typescript-eslint/parser direct dependencies were also removed (they are provided by the typescript-eslint umbrella package). eslint-config-prettier, eslint-plugin-prettier, and globals remain bundled. (3832930)

@github-actions

Copy link
Copy Markdown
Contributor

This PR will create a major release 🚀

⚠️ This is a test run of the release-notes-comment action that can be found in .github/workflows/analyze-commits.yml

2.0.0 (2026-07-13)

⚠ BREAKING CHANGES

  • eslint-config: consumers must now install eslint and typescript-eslint.

Features

  • eslint-config: move eslint and typescript-eslint to peer deps (3832930)

Bug Fixes

  • tests: strip devEngines/packageManager from temp package before pnpm install (bffedfd)

@github-actions

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 50% 3/6
🟢 Branches 100% 0/0
🔴 Functions 50% 1/2
🔴 Lines 25% 1/4

Test suite run success

15 tests passing in 7 suites.

Report generated by 🧪jest coverage report action from b542ee7

Show full coverage report
St File % Stmts % Branch % Funcs % Lines Uncovered Line #s
🟡 All files 50 100 50 25
🟢  greeting.ts 100 100 100 100
🔴  index.ts 0 100 0 0 1-4

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json with an extended type that tolerates devEngines / packageManager.
  • Delete devEngines and packageManager from the generated package.json prior to pnpm install to avoid pnpm install failures triggered by newly-added metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@JuroUhlar
JuroUhlar merged commit 14c4b05 into main Jul 13, 2026
20 checks passed
@JuroUhlar
JuroUhlar deleted the fix/changeset-tests-devengines branch July 13, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants