Skip to content

Commit 03b3b05

Browse files
authored
Migrated from yarn to pnpm 10.33 (#549)
no ref Migrated to pnpm 10.33 to match TryGhost/Ghost.
1 parent 0533fa1 commit 03b3b05

50 files changed

Lines changed: 10354 additions & 7594 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/publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,21 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3939

40+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
41+
with:
42+
version: 10.33.0
43+
4044
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
4145
with:
4246
node-version: 24
4347
registry-url: 'https://registry.npmjs.org'
48+
cache: pnpm
4449

4550
- name: Install dependencies
46-
run: yarn --frozen-lockfile --prefer-offline
51+
run: pnpm install --frozen-lockfile --prefer-offline
4752

4853
- name: Build releasable packages
49-
run: yarn nx run-many -t build
54+
run: pnpm nx run-many -t build
5055

5156
# npm 11+ is required for npm Trusted Publishing (OIDC).
5257
- name: Install npm 11

.github/workflows/test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ jobs:
1717
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1818
with:
1919
fetch-depth: 0
20+
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4
21+
with:
22+
version: 10.33.0
2023
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2124
env:
2225
FORCE_COLOR: 0
2326
with:
2427
node-version: ${{ matrix.node }}
25-
cache: yarn
28+
cache: pnpm
2629

27-
- run: yarn --prefer-offline --frozen-lockfile
28-
- run: yarn test:ci
30+
- run: pnpm install --prefer-offline --frozen-lockfile
31+
- run: pnpm test:ci
2932

3033
- uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
3134

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
link-workspace-packages=true
2+
public-hoist-pattern[]=@types/*
3+
public-hoist-pattern[]=@tryghost/*

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
This is a mono repository, managed with [Nx](https://nx.dev).
1212

1313
1. `git clone` this repo & `cd` into it as usual
14-
2. run `yarn setup` from the top-level:
14+
2. run `pnpm setup` from the top-level:
1515
- installs all external dependencies
1616
- links all internal dependencies
1717

@@ -22,24 +22,24 @@ To add a new package to the repo:
2222

2323
## Run
2424

25-
- `yarn dev`
25+
- `pnpm dev`
2626

2727

2828
## Test
2929

30-
- `yarn lint` runs `oxlint` across all packages
31-
- `yarn format` formats `js/ts/json/md` files with `oxfmt`
32-
- `yarn format:check` checks formatting without writing
33-
- `yarn test` runs tests (most packages also run lint in `posttest`)
30+
- `pnpm lint` runs `oxlint` across all packages
31+
- `pnpm format` formats `js/ts/json/md` files with `oxfmt`
32+
- `pnpm format:check` checks formatting without writing
33+
- `pnpm test` runs tests (most packages also run lint in `posttest`)
3434

3535

3636
## Publish
3737

3838
1. run one of the release commands in the top-level `framework` directory:
39-
- `yarn ship:patch`
40-
- `yarn ship:minor`
41-
- `yarn ship:major`
42-
- for initial Nx bootstrap in long-unreleased repos: `yarn ship:first-release`
39+
- `pnpm ship:patch`
40+
- `pnpm ship:minor`
41+
- `pnpm ship:major`
42+
- for initial Nx bootstrap in long-unreleased repos: `pnpm ship:first-release`
4343
2. this runs tests, versions packages, and creates/pushes release commit + tags
4444
- creates the version commit and pushes tags to `main`
4545
3. CI automatically publishes packages via `.github/workflows/publish.yml`:

package.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,22 @@
66
},
77
"author": "Ghost Foundation",
88
"license": "MIT",
9-
"workspaces": [
10-
"packages/*"
11-
],
9+
"packageManager": "pnpm@10.33.0",
1210
"scripts": {
1311
"dev": "echo \"Implement me!\"",
14-
"main": "git checkout main && git pull && yarn",
15-
"presetup": "yarn",
16-
"setup": "yarn",
12+
"main": "git checkout main && git pull && pnpm install",
13+
"setup": "pnpm install",
1714
"test": "nx run-many -t test --parallel=10 --outputStyle=dynamic-legacy",
1815
"test:ci": "nx run-many -t test --outputStyle=static",
1916
"lint": "nx run-many -t lint --outputStyle=dynamic",
2017
"format": "oxfmt -c .oxfmtrc.json \"packages/**/*.{js,ts,json,md}\"",
2118
"format:check": "oxfmt -c .oxfmtrc.json --check \"packages/**/*.{js,ts,json,md}\"",
22-
"preship": "git diff --quiet && git diff --cached --quiet || (echo 'Error: working tree must be clean before shipping' && exit 1) && yarn test",
19+
"preship": "git diff --quiet && git diff --cached --quiet || (echo 'Error: working tree must be clean before shipping' && exit 1) && pnpm test",
2320
"ship": "nx release version --git-push --git-remote ${GHOST_UPSTREAM:-origin}",
24-
"ship:patch": "yarn ship patch",
25-
"ship:minor": "yarn ship minor",
26-
"ship:major": "yarn ship major",
27-
"ship:first-release": "yarn ship patch --first-release"
21+
"ship:patch": "pnpm ship patch",
22+
"ship:minor": "pnpm ship minor",
23+
"ship:major": "pnpm ship major",
24+
"ship:first-release": "pnpm ship patch --first-release"
2825
},
2926
"devDependencies": {
3027
"@nx/js": "22.6.5",
@@ -36,7 +33,14 @@
3633
"ts-node": "10.9.2",
3734
"vitest": "4.1.4"
3835
},
39-
"resolutions": {
40-
"node-loggly-bulk": "^4.0.2"
36+
"pnpm": {
37+
"overrides": {
38+
"node-loggly-bulk": "^4.0.2"
39+
},
40+
"onlyBuiltDependencies": [
41+
"dtrace-provider",
42+
"esbuild",
43+
"nx"
44+
]
4145
}
4246
}

packages/api-framework/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"dev": "echo \"Implement me!\"",
2020
"test:unit": "NODE_ENV=testing vitest run --coverage --config ../../vitest.config.ts",
21-
"test": "yarn test:unit",
21+
"test": "pnpm run test:unit",
2222
"lint": "oxlint -c ../../.oxlintrc.json ."
2323
},
2424
"dependencies": {

packages/bookshelf-collision/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"dev": "echo \"Implement me!\"",
2121
"test": "NODE_ENV=testing vitest run --coverage --config ../../vitest.config.ts",
2222
"lint": "oxlint -c ../../.oxlintrc.json .",
23-
"posttest": "yarn lint"
23+
"posttest": "pnpm run lint"
2424
},
2525
"dependencies": {
2626
"@tryghost/errors": "^3.0.3",

packages/bookshelf-custom-query/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"dev": "echo \"Implement me!\"",
2121
"test": "NODE_ENV=testing vitest run --coverage --config ../../vitest.config.ts",
2222
"lint": "oxlint -c ../../.oxlintrc.json .",
23-
"posttest": "yarn lint"
23+
"posttest": "pnpm run lint"
2424
},
2525
"devDependencies": {
2626
"sinon": "21.1.2"

packages/bookshelf-eager-load/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"dev": "echo \"Implement me!\"",
2121
"test": "NODE_ENV=testing vitest run --coverage --config ../../vitest.config.ts",
2222
"lint": "oxlint -c ../../.oxlintrc.json .",
23-
"posttest": "yarn lint"
23+
"posttest": "pnpm run lint"
2424
},
2525
"dependencies": {
2626
"@tryghost/debug": "^2.0.3",

packages/bookshelf-filter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"dev": "echo \"Implement me!\"",
2121
"test": "NODE_ENV=testing vitest run --coverage --config ../../vitest.config.ts",
2222
"lint": "oxlint -c ../../.oxlintrc.json .",
23-
"posttest": "yarn lint"
23+
"posttest": "pnpm run lint"
2424
},
2525
"dependencies": {
2626
"@tryghost/debug": "^2.0.3",

0 commit comments

Comments
 (0)