Repository navigation
Conversation
JPeer264
added this pull request to stack #25528
October 19, 2026 13:44
`modulesIntegration` reads the version of each CJS module in `require.cache` from its package.json in a node_modules folder of the main module. The isolated pnpm layout keeps the package files in `node_modules/.pnpm/<package id>/node_modules/<name>`, so the integration found no version there. Events got only the version ranges from the app's package.json, and no packages that the app does not declare. Read these folders like the node_modules folders of the main module. The new test writes a package into this layout, because the monorepo installs its packages with the hoisted layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JPeer264
force-pushed
the
jp/node-modules-pnpm-isolated
branch
from
October 19, 2026 14:33
aab2593 to
220ad81
Compare
JPeer264
marked this pull request as ready for review
October 19, 2026 14:57
JPeer264
requested review from
isaacs and
mydea
and removed request for
a team
October 19, 2026 14:57
JPeer264
requested review from
andreiborza and
s1gr1d
and removed request for
mydea
October 19, 2026 14:57
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes
modulesIntegrationfor CJS apps that pnpm installs with its default isolated layout. The integration reads the version of each module inrequire.cachefrom itspackage.json, but only for packages directly in anode_modulesfolder of the app. pnpm keeps them innode_modules/.pnpm/<package id>/node_modules/<name>, soevent.moduleshad only the version ranges from the app'spackage.json. Now it has the installed versions, and also the packages that the app does not declare, like with npm and Yarn.The new
suites/modulestest writes a package into this layout, because the monorepo installs with the hoisted layout.