fix(sdk): give sdk/ts a pnpm lockfile so CI stops resolving from the registry - #427
Merged
Merged
Conversation
…registry
sdk/ts carried only a package-lock.json, and every workflow installs it with
pnpm:
cd sdk/ts && pnpm install --frozen-lockfile=false
pnpm does not read package-lock.json. With no pnpm-lock.yaml present and the
frozen check disabled, **every CI run resolved dependencies fresh from the
registry**. Nothing pinned them. Two consequences:
- The build was not reproducible, and a compromised patch release of any
transitive dependency would land silently on the next run.
- Dependabot's alerts against sdk/ts/package-lock.json pointed at a file that
governed nothing. Updating it would not have changed a single installed byte.
This replaces it with a real pnpm-lock.yaml and switches the three installs to
`--frozen-lockfile`. GCI is pnpm-only for JS/TS, so the npm lockfile should not
have been the one committed here; sdk/ts-sdk next door already does it correctly.
The generated lockfile also happens to clear the four alerts that were filed
against the npm one:
qs npm-lock 6.15.1 -> 6.16.0 (fix >= 6.16.0)
@babel/core npm-lock 7.29.0 -> 7.29.7 (fix >= 7.29.6)
body-parser npm-lock 1.20.5 -> 1.20.8 (fix >= 1.20.6)
Verified in the worktree: `pnpm install --frozen-lockfile` exits 0 — the flag CI
will now use — and `pnpm test` passes, 3 suites, 18 tests.
The other non-frozen installs in this repo (`sdk-ts-sdk-publish.yml`'s
`pnpm install --frozen-lockfile || pnpm install`) are left alone; that directory
has a valid lockfile and the fallback is a separate question.
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.
fix(sdk): give sdk/ts a pnpm lockfile so CI stops resolving from the registry
sdk/ts carried only a package-lock.json, and every workflow installs it with
pnpm:
pnpm does not read package-lock.json. With no pnpm-lock.yaml present and the
frozen check disabled, every CI run resolved dependencies fresh from the
registry. Nothing pinned them. Two consequences:
transitive dependency would land silently on the next run.
governed nothing. Updating it would not have changed a single installed byte.
This replaces it with a real pnpm-lock.yaml and switches the three installs to
--frozen-lockfile. GCI is pnpm-only for JS/TS, so the npm lockfile should nothave been the one committed here; sdk/ts-sdk next door already does it correctly.
The generated lockfile also happens to clear the four alerts that were filed
against the npm one:
Verified in the worktree:
pnpm install --frozen-lockfileexits 0 — the flag CIwill now use — and
pnpm testpasses, 3 suites, 18 tests.The other non-frozen installs in this repo (
sdk-ts-sdk-publish.yml'spnpm install --frozen-lockfile || pnpm install) are left alone; that directoryhas a valid lockfile and the fallback is a separate question.