Skip to content

Commit b4afb3d

Browse files
committed
Changed Source theme from Yarn to pnpm
Standardises this theme on pnpm so local development and CI use the same package manager version as sibling Ghost themes. The release path is preserved by keeping the existing ship scripts and switching their package-manager calls to pnpm. This also updates PR CI to install with pnpm, keeps the existing fatal gscan gate, runs pnpm zip before gscan so compatibility checks use freshly built assets, and excludes pnpm metadata from the release archive. pnpm-workspace.yaml explicitly denies dtrace-provider because it is an optional bunyan binding reached through gscan and is not needed to build, zip, or scan the theme.
1 parent 48c0a17 commit b4afb3d

9 files changed

Lines changed: 7302 additions & 5923 deletions

File tree

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/AGENTS.md export-ignore
2+
/CLAUDE.md export-ignore
3+
/pnpm-lock.yaml export-ignore
4+
/pnpm-workspace.yaml export-ignore
5+
/.gitattributes export-ignore

.github/workflows/test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ jobs:
1616
with:
1717
persist-credentials: false
1818

19+
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
20+
1921
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
2022
with:
2123
node-version: lts/*
22-
cache: yarn
24+
cache: pnpm
25+
cache-dependency-path: pnpm-lock.yaml
2326

24-
- run: yarn install --frozen-lockfile
27+
- run: pnpm install --frozen-lockfile
2528

26-
- run: yarn test:ci
29+
- run: pnpm test:ci
2730

2831
all-tests-pass:
2932
name: All tests pass

AGENTS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ This repository is the default Ghost theme. Keep changes focused on theme source
66

77
## Commands
88

9-
Use Yarn Classic for this repo.
9+
Use pnpm for this repo.
1010

1111
```bash
12-
yarn install --frozen-lockfile
13-
yarn dev
14-
yarn test:ci
15-
yarn zip
12+
pnpm install --frozen-lockfile
13+
pnpm dev
14+
pnpm test:ci
15+
pnpm zip
1616
```
1717

1818
Run the test command before opening a PR when theme files, generated assets, dependencies, or CI change.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ One neat trick is that you can also create custom one-off templates by adding th
2929

3030
# Development
3131

32-
Source styles are compiled using Gulp/PostCSS to polyfill future CSS spec. You'll need [Node](https://nodejs.org/), [Yarn](https://yarnpkg.com/) and [Gulp](https://gulpjs.com) installed globally. After that, from the theme's root directory:
32+
Source styles are compiled using Gulp/PostCSS to polyfill future CSS spec. You'll need [Node](https://nodejs.org/), [pnpm](https://pnpm.io/) and [Gulp](https://gulpjs.com) installed globally. After that, from the theme's root directory:
3333

3434
```bash
3535
# install dependencies
36-
yarn install
36+
pnpm install
3737

3838
# run development server
39-
yarn dev
39+
pnpm dev
4040
```
4141

4242
Now you can edit `/assets/css/` files, which will be compiled to `/assets/built/` automatically.
@@ -45,7 +45,7 @@ The `zip` Gulp task packages the theme files into `dist/<theme-name>.zip`, which
4545

4646
```bash
4747
# create .zip file
48-
yarn zip
48+
pnpm zip
4949
```
5050

5151
# PostCSS Features Used

gulpfile.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ function zipper(done) {
7979
'**',
8080
'!node_modules', '!node_modules/**',
8181
'!dist', '!dist/**',
82-
'!yarn-error.log',
83-
'!yarn.lock',
82+
'!pnpm-debug.log',
83+
'!pnpm-lock.yaml',
84+
'!pnpm-workspace.yaml',
8485
'!AGENTS.md',
8586
'!CLAUDE.md',
8687
'!gulpfile.js'
@@ -102,7 +103,7 @@ exports.zip = series(build, zipper);
102103
exports.default = series(build, serve, watcher);
103104

104105
exports.release = async () => {
105-
// @NOTE: https://yarnpkg.com/lang/en/docs/cli/version/
106+
// @NOTE: https://pnpm.io/cli/version
106107
// require(./package.json) can run into caching issues, this re-reads from file everytime on release
107108
let packageJSON = JSON.parse(fs.readFileSync('./package.json'));
108109
const newVersion = packageJSON.version;

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111
"scripts": {
1212
"dev": "gulp",
1313
"zip": "gulp zip",
14+
"build": "gulp build",
1415
"test": "gscan .",
1516
"test:ci": "gscan --fatal --verbose .",
16-
"pretest": "gulp build",
17-
"preship": "yarn test",
18-
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
17+
"pretest": "pnpm zip",
18+
"pretest:ci": "pnpm zip",
19+
"preship": "pnpm test",
20+
"ship": "STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then pnpm version && git push --follow-tags; else echo \"Uncomitted changes found.\" && exit 1; fi",
1921
"postship": "git fetch && gulp release"
2022
},
23+
"packageManager": "pnpm@11.6.0",
2124
"author": {
2225
"name": "Ghost Foundation",
2326
"email": "hello@ghost.org",

0 commit comments

Comments
 (0)