Skip to content

chore(example): migrate subdir to pnpm 11 and modernize toolchain#168

Merged
cernadasjuan merged 1 commit into
masterfrom
chore/example-pnpm-migration
May 27, 2026
Merged

chore(example): migrate subdir to pnpm 11 and modernize toolchain#168
cernadasjuan merged 1 commit into
masterfrom
chore/example-pnpm-migration

Conversation

@cernadasjuan
Copy link
Copy Markdown
Contributor

Summary

  • Aligns example/ with the root SDK's pnpm 11 supply-chain setup: minimumReleaseAge: 14d, engineStrict, trustPolicy: no-downgrade, blockExoticSubdeps, exact-version pins via savePrefix: "", and explicit allowBuilds (no install scripts pulled in).
  • Drops package-lock.json, adds pnpm-lock.yaml + pnpm-workspace.yaml, blocks future npm/yarn lockfiles via .gitignore. Bumps packageManager to pnpm@11.1.3, adds engines (node ≥24, pnpm ≥11) and devEngines, wires preinstall: pnpm audit && pnpm audit signatures.
  • Modernizes tsconfig.json to the official TS wiki recommendation for Node 24 (target/lib: ES2024, module: node20, moduleResolution: node16), turns on skipLibCheck to absorb noise from the symlinked SDK source, and aligns strict: false with the root SDK to avoid fighting types across the link:.. boundary.
  • Bumps deps to the newest versions allowed by the workspace rules: dotenv 17.4.2, moment 2.30.1, @types/node 24.12.4, typescript 5.9.3 (TS 6 was tried but breaks resolution of the SDK through the symlink). Adds a documented diff: 4.0.4 override patching GHSA-73rr-hh4g-fpgx (LOW) reachable through ts-node.
  • Cleans up unused imports in src/mfa.ts and adds the required isSandbox field to the src/payments.ts example so pnpm run build passes.

Test plan

  • pnpm install --frozen-lockfile succeeds (preinstall audit + signatures clean).
  • pnpm run build emits dist/ without errors.
  • pnpm run example:auth (or any other example:*) still runs under ts-node against the linked SDK.
  • CI passes commit-lint (conventional commits enforcement).

🤖 Generated with Claude Code

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>
Copy link
Copy Markdown
Contributor

@jhonatan-pluggy jhonatan-pluggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cernadasjuan cernadasjuan merged commit 070db51 into master May 27, 2026
1 of 2 checks passed
@cernadasjuan cernadasjuan deleted the chore/example-pnpm-migration branch May 27, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants