chore(example): migrate subdir to pnpm 11 and modernize toolchain#168
Merged
Conversation
Brings the example/ subdirectory in line with the root SDK's pnpm 11 supply-chain hardening (release-age gate, signature verification, exact pins, explicit allowBuilds, blockExoticSubdeps). Updates the tsconfig to Node 24 targets per the official TS wiki and bumps the dev deps to the latest versions compatible with the workspace rules: - dotenv 16.0.3 -> 17.4.2 - moment 2.29.4 -> 2.30.1 - typescript 5.0.3 -> 5.9.3 (TS 6 breaks symlink resolution into ../src) - @types/node 18.15.11 -> 24.12.4 - tsconfig: target/lib ES2024, module node20, strict false, skipLibCheck Also drops unused imports in src/mfa.ts and adds the missing required isSandbox field in src/payments.ts so pnpm run build is green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
example/with the root SDK's pnpm 11 supply-chain setup:minimumReleaseAge: 14d,engineStrict,trustPolicy: no-downgrade,blockExoticSubdeps, exact-version pins viasavePrefix: "", and explicitallowBuilds(no install scripts pulled in).package-lock.json, addspnpm-lock.yaml+pnpm-workspace.yaml, blocks future npm/yarn lockfiles via.gitignore. BumpspackageManagertopnpm@11.1.3, addsengines(node ≥24, pnpm ≥11) anddevEngines, wirespreinstall: pnpm audit && pnpm audit signatures.tsconfig.jsonto the official TS wiki recommendation for Node 24 (target/lib: ES2024,module: node20,moduleResolution: node16), turns onskipLibCheckto absorb noise from the symlinked SDK source, and alignsstrict: falsewith the root SDK to avoid fighting types across thelink:..boundary.dotenv17.4.2,moment2.30.1,@types/node24.12.4,typescript5.9.3 (TS 6 was tried but breaks resolution of the SDK through the symlink). Adds a documenteddiff: 4.0.4override patching GHSA-73rr-hh4g-fpgx (LOW) reachable throughts-node.src/mfa.tsand adds the requiredisSandboxfield to thesrc/payments.tsexample sopnpm run buildpasses.Test plan
pnpm install --frozen-lockfilesucceeds (preinstall audit + signatures clean).pnpm run buildemitsdist/without errors.pnpm run example:auth(or any otherexample:*) still runs underts-nodeagainst the linked SDK.🤖 Generated with Claude Code