Skip to content

Commit 2b807c7

Browse files
committed
chore: use pnpm
1 parent d572406 commit 2b807c7

File tree

16 files changed

+6987
-94
lines changed

16 files changed

+6987
-94
lines changed

.github/workflows/pkg-pr-new.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
- uses: actions/checkout@v4
1111
- run: corepack enable
1212
- uses: actions/setup-node@v4
13-
- run: yarn install
14-
- run: yarn build
15-
- run: yarn install # re-install to detect CLIs
13+
- run: pnpm install
14+
- run: pnpm build
15+
- run: pnpm install # re-install to detect CLIs
1616
# create examples
1717
- run: ./node_modules/.bin/create-actor --platform nodejs --template chat-room templates/chat-room
1818
- run: ./node_modules/.bin/create-actor --platform nodejs --template counter templates/counter
1919
# TODO: Add --compact once we publish them to npm
20-
- run: yarn dlx pkg-pr-new publish 'packages/**/platforms/*' 'packages/*' 'packages/frameworks/*' --template './templates/*' --packageManager yarn
20+
- run: pnpm dlx pkg-pr-new publish 'packages/**/platforms/*' 'packages/*' 'packages/frameworks/*' --template './templates/*' --packageManager pnpm

.github/workflows/test.yml

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TODO: Cache both yarn & cargo
1+
# TODO: Cache both pnpm & cargo
22

33
name: 'Test'
44
on:
@@ -10,39 +10,27 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v4
13+
# https://github.com/pnpm/action-setup?tab=readme-ov-file#use-cache-to-reduce-installation-time
14+
- name: Checkout
15+
uses: actions/checkout@v4
1416

15-
# Setup Node.js
16-
- name: Set up Node.js
17+
- uses: pnpm/action-setup@v4
18+
name: Install pnpm
19+
with:
20+
version: 10
21+
run_install: false
22+
23+
- name: Install Node.js
1724
uses: actions/setup-node@v4
1825
with:
1926
node-version: '22.14'
20-
# Note: We're not using the built-in cache here because we need to use corepack
21-
22-
- name: Setup Corepack
23-
run: corepack enable
24-
25-
- id: yarn-cache-dir-path
26-
name: Get yarn cache directory path
27-
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
28-
29-
- name: Cache dependencies
30-
uses: actions/cache@v3
31-
id: cache
32-
with:
33-
path: |
34-
${{ steps.yarn-cache-dir-path.outputs.dir }}
35-
.turbo
36-
key: ${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock') }}-${{ github.sha }}
37-
restore-keys: |
38-
${{ runner.os }}-deps-${{ hashFiles('**/yarn.lock') }}-
39-
${{ runner.os }}-deps-
40-
27+
cache: 'pnpm'
28+
4129
- name: Install dependencies
42-
run: yarn install
30+
run: pnpm install
4331

4432
- name: Run actor-core tests
45-
run: yarn test
33+
run: pnpm test
4634

4735
# - name: Install Rust
4836
# uses: dtolnay/rust-toolchain@stable

.yarnrc.yml

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

TESTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ $ docker restart verdaccio
2020
4. ```bash
2121
$ ./scripts/e2e-publish.ts
2222
```
23-
- Modifies yarnrc to point to the local registry, publishes the package, and then restores the original yarnrc.
23+
- Modifies npmrc to point to the local registry
2424

2525
5. ```bash
26-
$ yarn workspace @actor-core/cli run test
26+
$ pnpm m run test --filter=@actor-core/cli
2727
```
2828
- Runs the tests for the CLI, which includes running the CLI (inside Docker) with different arguments and checking the output.

docs/llm/prompt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,6 @@ When importing from workspace packages, always check the package's `package.json
165165
- Use zod for runtime type validation
166166
- Use `assertUnreachable(x: never)` for exhaustive type checking
167167
- Add proper JSDoc comments for public APIs
168-
- Run `yarn check-types` regularly during development
168+
- Run `pnpm check-types` regularly during development
169169
- Use `tsx` CLI to execute TypeScript scripts directly
170170
````

package.json

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
11
{
22
"private": true,
3-
"packageManager": "yarn@4.2.2",
43
"name": "@actor-core/workspace",
5-
"workspaces": [
6-
"packages/*",
7-
"packages/platforms/*",
8-
"packages/drivers/*",
9-
"packages/components/*",
10-
"packages/misc/*",
11-
"packages/frameworks/*"
12-
],
134
"scripts": {
145
"start": "npx turbo watch build",
156
"dev": "npx turbo watch dev",
167
"build": "npx turbo build",
178
"test": "npx turbo test",
189
"check-types": "npx turbo check-types",
19-
"fmt": "yarn biome check --write .",
20-
"dev-docs": "cd docs && yarn dlx mintlify@latest dev",
21-
"dev-docs-middleware": "cd packages/misc/docs-middleware && yarn dev",
22-
"deploy-docs-middleware": "cd packages/misc/docs-middleware && yarn deploy",
23-
"docs-broken-links": "cd docs && yarn dlx mintlify@latest broken-links",
10+
"fmt": "pnpm biome check --write .",
11+
"dev-docs": "cd docs && pnpm dlx mintlify@latest dev",
12+
"dev-docs-middleware": "cd packages/misc/docs-middleware && pnpm dev",
13+
"deploy-docs-middleware": "cd packages/misc/docs-middleware && pnpm deploy",
14+
"docs-broken-links": "cd docs && pnpm dlx mintlify@latest broken-links",
2415
"docs-bump": "git checkout main && git pull --ff && date > docs/.bump && git add docs/.bump && git commit -m \"chore: bump mintlify\" && git push origin main"
2516
},
2617
"devDependencies": {
@@ -40,5 +31,6 @@
4031
},
4132
"dependencies": {
4233
"esbuild": "^0.25.1"
43-
}
34+
},
35+
"packageManager": "pnpm@8.15.1+sha1.8adba2d20330c02d3856e18c4eb3819d1d3ca6aa"
4436
}

packages/actor-core-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"scripts": {
3030
"build": "tsup",
31-
"dev": "yarn build --watch",
31+
"dev": "pnpm build --watch",
3232
"test": "vitest run",
3333
"check-types": "tsc --noEmit"
3434
},

packages/actor-core/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,18 @@
155155
},
156156
"sideEffects": false,
157157
"scripts": {
158-
"dev": "yarn build --watch",
158+
"dev": "pnpm build --watch",
159159
"build": "tsup src/mod.ts src/client/mod.ts src/common/log.ts src/actor/errors.ts src/topologies/coordinate/mod.ts src/topologies/partition/mod.ts src/utils.ts src/driver-helpers/mod.ts src/cli/mod.ts src/actor/protocol/inspector/mod.ts src/actor/protocol/http/rpc.ts src/test/mod.ts src/inspector/protocol/actor/mod.ts src/inspector/protocol/manager/mod.ts src/inspector/mod.ts",
160160
"check-types": "tsc --noEmit",
161161
"boop": "tsc --outDir dist/test -d",
162162
"test": "vitest run",
163163
"test:watch": "vitest"
164164
},
165165
"dependencies": {
166+
"@hono/node-server": "^1.14.0",
167+
"@hono/node-ws": "^1.1.1",
166168
"cbor-x": "^1.6.0",
169+
"get-port": "^7.1.0",
167170
"hono": "^4.7.0",
168171
"invariant": "^2.2.4",
169172
"on-change": "^5.0.1",

packages/create-actor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
"scripts": {
1818
"build": "tsup",
19-
"dev": "yarn build --watch"
19+
"dev": "pnpm build --watch"
2020
},
2121
"license": "Apache-2.0",
2222
"files": [

packages/frameworks/framework-base/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"actor-core": "*"
2929
},
3030
"devDependencies": {
31+
"@types/node": "^22.13.1",
3132
"actor-core": "workspace:^",
3233
"tsup": "^8.3.6",
3334
"typescript": "^5.5.2",

packages/frameworks/react/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
"react-dom": "^18 || ^19"
3333
},
3434
"devDependencies": {
35+
"@types/node": "^22.13.1",
36+
"@types/react": "^18.3",
3537
"actor-core": "workspace:^",
3638
"tsup": "^8.3.6",
3739
"typescript": "^5.5.2",

packages/platforms/nodejs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"actor-core": "*"
3030
},
3131
"devDependencies": {
32+
"@types/node": "^22.13.1",
3233
"actor-core": "workspace:*",
3334
"hono": "^4.7.0",
3435
"tsup": "^8.4.0",

0 commit comments

Comments
 (0)