fix: harden npm package lifecycle and Node support - #104
Conversation
|
@codex review Please review the clean-checkout npm/pnpm prepack lifecycle and complete tarball contents, the Node 22.13.0 minimum and Node 22/24 compatibility matrix, the high-severity production dependency audit in PR and release CI, and preservation of Socket Firewall, release provenance, artifact validation, and trusted-publishing security boundaries. |
There was a problem hiding this comment.
Pull request overview
This PR hardens the TypeScript SDK/CLI packaging and CI expectations by aligning declared Node.js support with actual dependency requirements, ensuring packages build before pack, and adding a production-only vulnerability audit to CI/release verification.
Changes:
- Tighten the declared minimum Node.js engine to
>=22.13.0and update both READMEs accordingly. - Add
prepackandaudit:prodscripts to makenpm/pnpm packself-contained and enforce high-severity production audits. - Expand CI to keep Node 22 coverage across OSes while adding a focused Linux Node 24 job, plus audit steps in CI and release verification.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/typescript/tests-ts/skeleton.test.ts | Adds regression tests for Node engine range and packaging/audit scripts. |
| sdk/typescript/README.md | Updates documented minimum Node.js requirement to 22.13.0. |
| sdk/typescript/package.json | Sets engines.node to >=22.13.0; adds audit:prod and prepack. |
| README.md | Updates documented minimum Node.js requirement to 22.13.0. |
| .github/workflows/node-release.yml | Adds production dependency audit to release verification flow. |
| .github/workflows/node-ci.yml | Introduces Node version matrix (Node 22 across OSes + Node 24 on Linux) and adds prod audit step in PR CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3d1fea047
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
ianw-oai
left a comment
There was a problem hiding this comment.
Looks good. Node support, package creation, and the production dependency audit are covered.
|
@codex review Please review the updated head |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
sdk/typescript/tests-ts/skeleton.test.ts:66
- If
prepackis switched to use Corepack (sonpm packworks without pnpm preinstalled), this assertion should be updated to match the new command string.
expect(packageJson.scripts.prepack).toBe("pnpm run build");
expect(packageJson.scripts["audit:prod"]).toBe(
"pnpm audit --prod --audit-level high",
);
|
@codex review Please review the final head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2856cd8c89
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please review current head |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review Please review current head |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
npm packorpnpm pack, so a clean checkout cannot produce an npm tarball missingdist.buildandprepack, so packaging does not require pnpm, npm, or Corepack to already exist onPATH.node-22status-check names.main.prepacklifecycle, and the production audit command.Main merge and review feedback
Merged current
mainwithout discarding its managed-credential changes, protected Node 22 check identities, immutable action pins, package-manager caching, latest Node 24 and Node 26 coverage, Windows package-smoke timeout protections, or protected release and provenance safeguards.Addressed every actionable Copilot and Codex review comment:
node-22checks.Validation
mainbranch-protection rules.npm packwith pnpm, npm, and Corepack unavailable onPATH; verified all 179 expected tarball entries.pnpm pack; independently verified all 179 expected tarball entries.actionlintfor the Node CI, protected Node release, and container workflows.git diff --check; no unresolved merge-conflict paths.