Skip to content

Commit 3828fdc

Browse files
justjakeclaude
andcommitted
Migrate from Yarn to pnpm
- 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>
1 parent df4efb9 commit 3828fdc

213 files changed

Lines changed: 22884 additions & 26546 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,23 @@ jobs:
2929
uses: docker-practice/actions-setup-docker@1.0.8
3030
if: matrix.platform == 'macos-latest'
3131

32-
- name: Setup Node.js environment
33-
uses: actions/setup-node@v3
34-
with:
35-
node-version: 18
36-
3732
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
3833
- uses: actions/checkout@v4
3934
with:
4035
# We need `git log` to find git-subtree versions
4136
fetch-depth: 0
4237

43-
- name: Yarn cache
44-
uses: actions/cache@v3
38+
- name: Install pnpm
39+
uses: pnpm/action-setup@v4
40+
41+
- name: Setup Node.js environment
42+
uses: actions/setup-node@v4
4543
with:
46-
path: "**/.yarn/cache"
47-
key: ${{ hashFiles('**/yarn.lock') }}
44+
node-version: 22
45+
cache: 'pnpm'
4846

4947
- name: Install dependencies
50-
run: yarn install --immutable
51-
env:
52-
YARN_ENABLE_SCRIPTS: 0
48+
run: pnpm install --frozen-lockfile
5349

5450
- name: EMSDK cache
5551
uses: actions/cache@v3
@@ -60,26 +56,26 @@ jobs:
6056
- name: Environment info
6157
run: |
6258
echo $(which node) v$(node --version)
63-
echo $(which yarn) v$(yarn --version)
59+
echo $(which pnpm) v$(pnpm --version)
6460
echo $(which npx) v$(npx --version)
6561
echo $(npx which tsc) $(npx tsc --version)
6662
echo $(npx which tsup) $(npx tsup --version)
6763
echo $(npx which esbuild) v$(npx esbuild --version)
6864
6965
- name: Build
70-
run: yarn build
66+
run: pnpm run build
7167

7268
- name: Check types
73-
run: yarn check:types
69+
run: pnpm run check:types
7470

7571
- name: Check package.jsons
76-
run: yarn check:packages
72+
run: pnpm run check:packages
7773

7874
- name: Test
79-
run: yarn test:slow
75+
run: pnpm run test:slow
8076

8177
- name: Build tarballs
82-
run: yarn tarball && du -h build/tar/*
78+
run: pnpm run tarball && du -h build/tar/*
8379

8480
- name: Test release with NodeJS minimal ESModule example
8581
run: ./scripts/smoketest-node-minimal.ts
@@ -94,7 +90,7 @@ jobs:
9490
run: ./scripts/smoketest-vite.ts
9591

9692
- name: Check lint
97-
run: yarn lint
93+
run: pnpm run lint
9894

9995
- name: Check format
100-
run: yarn check:format
96+
run: pnpm run check:format

.npmrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Use hoisted node-modules linker (like yarn's nodeLinker: node-modules)
2+
node-linker=hoisted
3+
4+
# Hoist all packages to root node_modules for compatibility with yarn-style resolution
5+
shamefully-hoist=true
6+
7+
# Equivalent to yarn's enableGlobalCache: false
8+
# pnpm uses content-addressable store by default, no need to disable

.vscode/settings.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@
1111
"emscripten.h": "c",
1212
"quickjs-atom.h": "c"
1313
},
14-
"files.exclude": {
15-
".yarn/releases/*": true
16-
}
14+
"files.exclude": {}
1715
}

.yarn/releases/yarn-4.0.2.cjs

Lines changed: 0 additions & 893 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

CLAUDE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Package Manager
44

5-
Use `corepack yarn` to run yarn commands, e.g.:
5+
Use `corepack pnpm` to run pnpm commands, e.g.:
66

7-
- `corepack yarn install`
8-
- `corepack yarn build`
9-
- `corepack yarn build:ts`
7+
- `corepack pnpm install`
8+
- `corepack pnpm build`
9+
- `corepack pnpm build:ts`
1010

1111
## Building Variants
1212

@@ -17,7 +17,7 @@ To build a variant:
1717
```bash
1818
cd packages/variant-quickjs-<name>
1919
make # builds the C code with emscripten
20-
corepack yarn build:ts # builds the TypeScript wrapper
20+
corepack pnpm build:ts # builds the TypeScript wrapper
2121
```
2222

2323
## Emscripten
@@ -31,7 +31,7 @@ corepack yarn build:ts # builds the TypeScript wrapper
3131
Run all tests:
3232

3333
```bash
34-
corepack yarn test
34+
corepack pnpm test
3535
```
3636

3737
Run tests for a specific variant (e.g., quickjs-ng only):

doc/.nojekyll

Lines changed: 0 additions & 1 deletion
This file was deleted.

doc/@jitl/quickjs-asmjs-mjs-release-sync/README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
[quickjs-emscripten](../../packages.md)**@jitl/quickjs-asmjs-mjs-release-sync**[Readme](README.md) \| [Exports](exports.md)
1+
[**quickjs-emscripten**](../../README.md)
22

33
***
44

5+
[quickjs-emscripten](../../packages.md) / @jitl/quickjs-asmjs-mjs-release-sync
6+
57
# @jitl/quickjs-asmjs-mjs-release-sync
68

79
Compiled to pure Javascript, no WebAssembly required.
@@ -17,15 +19,6 @@ const QuickJS = await newQuickJSWASMModuleFromVariant(variant)
1719

1820
This variant was built with the following settings:
1921

20-
## Contents
21-
22-
- [Library: quickjs](README.md#library-quickjs)
23-
- [Release mode: release](README.md#release-mode-release)
24-
- [Exports: import](README.md#exports-import)
25-
- [Extra async magic? No](README.md#extra-async-magic-no)
26-
- [Single-file, or separate .wasm file? asmjs](README.md#single-file-or-separate-wasm-file-asmjs)
27-
- [More details](README.md#more-details)
28-
2922
## Library: quickjs
3023

3124
The original [bellard/quickjs](https://github.com/bellard/quickjs) library.
@@ -86,6 +79,23 @@ Variant-specific Emscripten build flags:
8679
]
8780
```
8881

89-
***
82+
## Variables
83+
84+
### default
85+
86+
> `const` **default**: [`QuickJSSyncVariant`](../../quickjs-emscripten/interfaces/QuickJSSyncVariant.md)
87+
88+
Defined in: [index.ts:19](https://github.com/justjake/quickjs-emscripten/blob/main/packages/variant-quickjs-asmjs-mjs-release-sync/src/index.ts#L19)
89+
90+
### @jitl/quickjs-asmjs-mjs-release-sync
91+
92+
[Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-asmjs-mjs-release-sync/README.md) |
93+
Compiled to pure Javascript, no WebAssembly required.
9094

91-
Generated using [typedoc-plugin-markdown](https://www.npmjs.com/package/typedoc-plugin-markdown) and [TypeDoc](https://typedoc.org/)
95+
| Variable | Setting | Description |
96+
| -- | -- | -- |
97+
| library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Version [2025-09-13+f1139494](https://github.com/bellard/quickjs/commit/f1139494d18a2053630c5ed3384a42bb70db3c53) vendored to quickjs-emscripten on 2026-02-15. |
98+
| releaseMode | release | Optimized for performance; use when building/deploying your application. |
99+
| syncMode | sync | The default, normal build. Note that both variants support regular async functions. |
100+
| emscriptenInclusion | asmjs | The C library code is compiled to Javascript, no WebAssembly used. Sometimes called "asmjs". This is the slowest possible option, and is intended for constrained environments that do not support WebAssembly, like quickjs-for-quickjs. |
101+
| exports | import | Has these package.json export conditions |

doc/@jitl/quickjs-asmjs-mjs-release-sync/exports.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)