build: pnpm 10 ignores root package.json settings
Summary
With the repository-declared pnpm 10.34.5 toolchain, the root package.json pnpm field is ignored. That field currently contains build-script allowlists and dependency overrides, so fresh installs do not load those settings from their present location.
Reproduction
From the repository root at 473d8bf3e62b68ee731cf18afb2e8258f9ca7a7c:
pnpm install --frozen-lockfile --ignore-scripts --offline
pnpm reports:
The "pnpm" field in package.json is no longer read by pnpm. The following keys were ignored: "pnpm.onlyBuiltDependencies", "pnpm.overrides".
pnpm config get onlyBuiltDependencies and pnpm config get overrides both return undefined. The repository's pnpm-workspace.yaml currently contains the package/catalog declarations and minimumReleaseAge, but not these settings.
Impact
The existing lockfile currently resolves the overridden versions, so this report does not claim an active vulnerability. However, future resolution or lockfile refreshes can silently stop applying the intended overrides, and install-time build allowlisting no longer reflects the checked-in policy.
Suggested direction
Please confirm and migrate the pnpm 10 settings to their supported workspace configuration locations, then regenerate/verify the lockfile and normal build gates. I have not opened a patch because this changes dependency-resolution and install-script policy and should be maintainer-approved first.
I searched current issues and all-state PRs for the pnpm-field warning, onlyBuiltDependencies, overrides, and workspace settings and found no equivalent report.
Triage
- type: bug
- priority: medium
- complexity: small
- affected_area: Build System (root
package.json/pnpm-workspace.yaml) - actionable: yes
- needs_clarification: false
- summary: Move the root
package.jsonpnpmfield (onlyBuiltDependencies,ignoredBuiltDependencies,overrides) intopnpm-workspace.yaml, since pnpm 10.34.5 (the pinnedpackageManager) no longer reads it and currently ignores the build-script allowlist and security overrides; then verify the lockfile still resolves the overridden versions.
I reproduced this on the current main branch with pnpm 10.34.5. pnpm reports that the root package.json#pnpm field is no longer read, and pnpm config get onlyBuiltDependencies returns undefined.
I would like to take this issue. My proposed scope is:
- Move
onlyBuiltDependencies,ignoredBuiltDependencies, andoverridesintopnpm-workspace.yaml - Regenerate the lockfile and verify that the migration introduces no unintended dependency-resolution changes
- Validate the change with a frozen install and the relevant build, lint, and type-check commands
Please assign #1804 to @tttboy123 if this scope looks right.
Implementation is ready for review in #1805: https://github.com/e2b-dev/E2B/pull/1805
The PR moves all three pnpm settings to pnpm-workspace.yaml, restores pnpm 10 visibility of the build-script policy and overrides, and keeps pnpm-lock.yaml unchanged after a frozen lockfile resolution check.
The configuration-specific checks, frozen install, formatting, lint, typecheck, release tests, and connection-config tests pass. I also documented the unrelated remote integration failures from the full online suite in the PR.
Could a maintainer please confirm the scope, assign this issue to me, and review the PR when convenient?
This has now been implemented and merged into main via #1817 (the accepted/squashed follow-up to #1805), in commit 69fc8dc49a2513e10fa7c4de42f64701f83b7d46.
The issue is still showing as open despite the Closes #1804 reference. Could a maintainer please confirm and close it when convenient?
will close automatically once released
I will take this issue. Please assign it to me.
The problem is that pnpm 10 no longer reads the pnpm field in the root package.json. This field contains important settings like build-script allowlists and dependency overrides. I will first confirm the issue by running the provided reproduction steps. Then, I will migrate these settings to the appropriate locations in the pnpm-workspace.yaml file. Finally, I will regenerate and verify the lockfile and build gates to ensure the settings are correctly applied.
this is now merged and released