fix: restore pnpm frozen installs#470
Draft
cursor[bot] wants to merge 2 commits into
Draft
Conversation
Co-authored-by: theg1239 <theg1239@users.noreply.github.com>
Co-authored-by: theg1239 <theg1239@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Bug and impact
Recent pnpm 11 dependency config drift made clean/frozen installs fail before the app could build or deploy. The first hard failure was
ERR_PNPM_LOCKFILE_CONFIG_MISMATCHbecause the lockfile recorded overrides frompackage.json#pnpm.overrides, but pnpm 11 ignores that field and reads active overrides frompnpm-workspace.yaml. After that was corrected, clean installs also failed on strict build approvals: optionalnode-liblzmaattempted a native build on hosts without systemliblzmaheaders, whilesharp/core-js/core-js-purewere left as unreviewed build scripts.Root cause
The pnpm 11 migration was incomplete: override pins were split between an ignored package.json field and the workspace file, and
allowBuildsstill allowed a nonessential optional native package while missing explicit decisions for newly surfaced build-script packages.Fix
pnpm-workspace.yamland regenerated lockfile override metadata.package.json#pnpm.overridesblock.allowBuildsto allow required nativesharp, explicitly deny nonessentialcore-js/core-js-purescripts, and deny optionalnode-liblzmato avoid requiring system liblzma during install.Validation
corepack pnpm install --frozen-lockfile --prefer-offlinefrom a cleannode_modulesstate passes.npx tsx scripts/test-global-error-reload-guard.tspasses.npx tsx scripts/test-pdf-download-page-edits.tspasses.spent a lot of water and tokens to review your slop
Greptile Summary
This PR restores frozen pnpm installs after dependency configuration drift. The main changes are:
package.jsonintopnpm-workspace.yaml.pnpm-lock.yamloverride metadata to match the workspace configuration.allowBuildsto allowsharpand denycore-js,core-js-pure, andnode-liblzmabuild scripts.Confidence Score: 5/5
Safe to merge with minimal risk.
The changes are limited to pnpm configuration and lockfile metadata, and the workspace overrides match the lockfile overrides.
No files require special attention.
What T-Rex did
Important Files Changed
pnpm.overridesblock so pnpm 11 reads override policy from the workspace file instead.Sequence Diagram
%%{init: {'theme': 'neutral'}}%% sequenceDiagram participant Dev as Clean install participant PNPM as pnpm 11 participant Workspace as pnpm-workspace.yaml participant Lock as pnpm-lock.yaml participant Scripts as Package build scripts Dev->>PNPM: pnpm install --frozen-lockfile PNPM->>Workspace: Read active overrides and allowBuilds PNPM->>Lock: Compare recorded overrides Lock-->>PNPM: Matching override metadata PNPM->>Scripts: Apply build approvals Scripts-->>PNPM: Allow sharp, deny core-js/core-js-pure/node-liblzma PNPM-->>Dev: Frozen install succeeds%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% sequenceDiagram participant Dev as Clean install participant PNPM as pnpm 11 participant Workspace as pnpm-workspace.yaml participant Lock as pnpm-lock.yaml participant Scripts as Package build scripts Dev->>PNPM: pnpm install --frozen-lockfile PNPM->>Workspace: Read active overrides and allowBuilds PNPM->>Lock: Compare recorded overrides Lock-->>PNPM: Matching override metadata PNPM->>Scripts: Apply build approvals Scripts-->>PNPM: Allow sharp, deny core-js/core-js-pure/node-liblzma PNPM-->>Dev: Frozen install succeedsReviews (1): Last reviewed commit: "fix: approve pnpm install builds" | Re-trigger Greptile