Skip to content

Migrate from Yarn to pnpm#246

Merged
justjake merged 15 commits intomainfrom
pnpm-migration
Feb 16, 2026
Merged

Migrate from Yarn to pnpm#246
justjake merged 15 commits intomainfrom
pnpm-migration

Conversation

@justjake
Copy link
Owner

Summary

  • Migrate from Yarn 4.0.2 to pnpm 10.29.3 as the package manager
  • Update CI to use pnpm/action-setup@v4 with Node 22 and built-in pnpm caching
  • Upgrade TypeScript to 5.9.3 and typedoc to 0.28.17 for compatibility
  • Fix TypeScript 5.9 strict typing issue in memory.ts

Changes

Package Manager Migration

  • Delete .yarn/, yarn.lock, .yarnrc.yml
  • Add pnpm-workspace.yaml, .npmrc, pnpm-lock.yaml
  • Update packageManager field to pnpm@10.29.3
  • Update all scripts from yarn to pnpm run

Code Changes

  • Rename getYarnWorkspaces() to getWorkspaces() in scripts/helpers.ts
  • Update variant package scripts to use npm run (avoids corepack issues in subprocesses)
  • Fix Int32Array type annotation for TypeScript 5.9 compatibility
  • Add missing workspace packages as devDependencies for proper pnpm resolution

Dependency Upgrades

  • typedoc: 0.25.4 → 0.28.17 (supports TypeScript 5.9)
  • typedoc-plugin-markdown: 4.0.0-next.38 → 4.10.0
  • typedoc-plugin-inline-sources: 1.0.1 → 1.3.0

Test plan

  • pnpm install succeeds
  • pnpm run build succeeds (including docs)
  • pnpm run test:fast passes (69/69 tests)
  • Workspace detection works correctly (27 packages)

🤖 Generated with Claude Code

- Replace Yarn 4.0.2 with pnpm 10.29.3 as the package manager
- Add pnpm-workspace.yaml and .npmrc configuration
- Update all scripts to use pnpm commands
- Rename getYarnWorkspaces() to getWorkspaces() in scripts/helpers.ts
- Update CI workflow to use pnpm/action-setup@v4 with Node 22
- Add @jitl/tsconfig as root devDependency for proper resolution
- Add variant packages as devDependencies for test resolution
- Fix TypeScript 5.9 compatibility in memory.ts (Int32Array<ArrayBuffer>)
- Upgrade typedoc to 0.28.17 for TypeScript 5.9 support
- Upgrade typedoc-plugin-markdown to 4.10.0
- Regenerate documentation with new typedoc version

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
justjake and others added 14 commits February 16, 2026 11:33
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Equivalent to yarn's YARN_ENABLE_SCRIPTS=0 - prevents prepare scripts
from running during install, which would fail on a fresh checkout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pnpm pack generates tarball names like jitl-quickjs-ffi-types-0.32.0.tgz
(without @ prefix, with version) instead of @jitl-quickjs-ffi-types.tgz

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The library now requires TypeScript 5.9+ due to stricter typed array
generics (Int32Array<ArrayBuffer>). Update all TypeScript-using examples.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
react-scripts@5 only supports TypeScript 3.x/4.x, but our library now
requires TypeScript 5.9+ for typed array generics. Use --legacy-peer-deps
to work around the peer dependency conflict.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add typedoc-plugin-remark, remark-toc, and remark-insert-headings
- Configure remark plugins to generate "Contents" section for Class,
  Interface, Enum, TypeAlias, and Function pages
- This restores the in-page TOC that lists methods/properties that was
  removed in typedoc-plugin-markdown 4.3.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace remark-insert-headings + remark-toc with a custom plugin that
inserts the table of contents directly after the class description,
without a separate "Contents" heading.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use remark-insert-headings + remark-toc instead of custom plugin.
Remove mdast-util-toc dependency and custom remark-toc-headless.mjs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@justjake justjake enabled auto-merge (squash) February 16, 2026 20:16
@justjake justjake merged commit 94b2acb into main Feb 16, 2026
1 check passed
@justjake justjake deleted the pnpm-migration branch February 16, 2026 20:35
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.

1 participant

Comments