Skip to content

Commit 0f42ae0

Browse files
committed
Migrated from yarn v1 to pnpm
- Replaced yarn v1 with pnpm workspaces and pnpm-lock.yaml - Updated all package.json scripts from yarn to pnpm - Converted workspace deps to workspace:* protocol - Added pnpm.overrides (replaces yarn resolutions) - Updated CI workflows for pnpm with caching - Updated monobundle for pnpm deploy packaging - Added pnpm-workspace.yaml, .npmrc - Removed yarn.lock and .yarnrc files
1 parent 9505bac commit 0f42ae0

File tree

115 files changed

+50760
-37448
lines changed

Some content is hidden

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

115 files changed

+50760
-37448
lines changed

.agents/skills/add-admin-api-endpoint/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: Add a new endpoint or endpoints to Ghost's Admin API at `ghost/api/
1111
2. The endpoint file should create a controller object using the JSDoc type from (@tryghost/api-framework).Controller, including at minimum a `docName` and a single endpoint definition, i.e. `browse`.
1212
3. Add routes for each endpoint to `ghost/core/core/server/web/api/endpoints/admin/routes.js`.
1313
4. Add basic `e2e-api` tests for the endpoint in `ghost/core/test/e2e-api/admin` to ensure the new endpoints function as expected.
14-
5. Run the tests and iterate until they pass: `cd ghost/core && yarn test:single test/e2e-api/admin/{test-file-name}`.
14+
5. Run the tests and iterate until they pass: `cd ghost/core && pnpm test:single test/e2e-api/admin/{test-file-name}`.
1515

1616
## Reference
1717
For a detailed reference on Ghost's API framework and how to create API controllers, see [reference.md](reference.md).

.agents/skills/add-private-feature-flag/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Adds a new private feature flag to Ghost. Private flags appear in Labs settings
1717
- Add a new entry to the `features` array with `title`, `description`, and `flag` (must match the string in `labs.js`).
1818

1919
3. **Run tests and update the config API snapshot**
20-
- Unit: `cd ghost/core && yarn test:single test/unit/shared/labs.test.js`
21-
- Update snapshot and run e2e: `cd ghost/core && UPDATE_SNAPSHOTS=1 yarn test:single test/e2e-api/admin/config.test.js`
20+
- Unit: `cd ghost/core && pnpm test:single test/unit/shared/labs.test.js`
21+
- Update snapshot and run e2e: `cd ghost/core && UPDATE_SNAPSHOTS=1 pnpm test:single test/e2e-api/admin/config.test.js`
2222
- Review the diff of `ghost/core/test/e2e-api/admin/__snapshots__/config.test.js.snap` to confirm only your new flag was added.
2323

2424
## Notes

.agents/skills/create-database-migration/SKILL.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ description: Create a database migration to add a table, add columns to an exist
77

88
## Instructions
99

10-
1. Create a new, empty migration file: `cd ghost/core && yarn migrate:create <kebab-case-slug>`. IMPORTANT: do not create the migration file manually; always use this script to create the initial empty migration file. The slug must be kebab-case (e.g. `add-column-to-posts`).
10+
1. Create a new, empty migration file: `cd ghost/core && pnpm migrate:create <kebab-case-slug>`. IMPORTANT: do not create the migration file manually; always use this script to create the initial empty migration file. The slug must be kebab-case (e.g. `add-column-to-posts`).
1111
2. The above command will create a new directory in `ghost/core/core/server/data/migrations/versions` if needed, create the empty migration file with the appropriate name, and bump the core and admin package versions to RC if this is the first migration after a release.
1212
3. Update the migration file with the changes you want to make in the database, following the existing patterns in the codebase. Where appropriate, prefer to use the utility functions in `ghost/core/core/server/data/migrations/utils/*`.
1313
4. Update the schema definition file in `ghost/core/core/server/data/schema/schema.js`, and make sure it aligns with the latest changes from the migration.
14-
5. Test the migration manually: `yarn knex-migrator migrate --v {version directory} --force`
14+
5. Test the migration manually: `pnpm knex-migrator migrate --v {version directory} --force`
1515
6. If adding or dropping a table, update `ghost/core/core/server/data/exporter/table-lists.js` as appropriate.
1616
7. If adding or dropping a table, also add or remove the table name from the expected tables list in `ghost/core/test/integration/exporter/exporter.test.js`. This test has a hardcoded alphabetically-sorted array of all database tables — it runs in CI integration tests (not unit tests) and will fail if the new table is missing.
17-
8. Run the schema integrity test, and update the hash: `yarn test:single test/unit/server/data/schema/integrity.test.js`
18-
9. Run unit tests in Ghost core, and iterate until they pass: `cd ghost/core && yarn test:unit`
17+
8. Run the schema integrity test, and update the hash: `pnpm test:single test/unit/server/data/schema/integrity.test.js`
18+
9. Run unit tests in Ghost core, and iterate until they pass: `cd ghost/core && pnpm test:unit`
1919

2020
## Examples
2121
See [examples.md](examples.md) for example migrations.

.codex/environments/environment.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ name = "Ghost"
44

55
[setup]
66
script = '''
7-
yarn setup
8-
(cd node_modules/sqlite3 && npm run install)
9-
(cd ghost/parse-email-address && yarn build)
7+
pnpm setup
108
'''

.cursor/rules/pnpm.mdc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
description:
3+
globs:
4+
alwaysApply: true
5+
---
6+
This repository uses pnpm as a package manager.
7+
All commands are prefixed with `pnpm` instead of `npm` or `yarn`.

.cursor/rules/yarn.mdc

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

.cursor/worktrees.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"setup-worktree": [
33
"git submodule update --init --recursive",
4-
"yarn"
4+
"pnpm"
55
]
66
}

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ There is no need to include what modules have changed in the commit message, as
6262

6363
### Submitting Pull Requests
6464

65-
We aim to merge any straightforward, well-understood bug fixes or improvements immediately, as long as they pass our tests (run `yarn test` to check locally). We generally don’t merge new features and larger changes without prior discussion with the core product team for tech/design specification.
65+
We aim to merge any straightforward, well-understood bug fixes or improvements immediately, as long as they pass our tests (run `pnpm test` to check locally). We generally don’t merge new features and larger changes without prior discussion with the core product team for tech/design specification.
6666

6767
Please provide plenty of context and reasoning around your changes, to help us merge quickly. Closing an already open issue is our preferred workflow. If your PR gets out of date, we may ask you to rebase as you are more familiar with your changes than we will be.
6868

.github/actions/restore-cache/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ runs:
3838
echo "::warning::Dependency cache could not be restored after retry - installing dependencies from scratch"
3939
bash .github/scripts/install-deps.sh
4040
41+
- name: Re-link dependencies after cache restore
42+
if: steps.dep-cache.outputs.cache-hit == 'true' || steps.dep-cache-retry-attempt.outputs.cache-hit == 'true'
43+
shell: bash
44+
run: |
45+
echo "::notice::Re-linking pnpm dependencies after cache restore"
46+
bash .github/scripts/install-deps.sh --force
47+
4148
- name: Set cache miss output
4249
id: check-cache
4350
shell: bash

.github/hooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[ -n "$CI" ] && exit 0
55

6-
yarn lint-staged --relative
6+
pnpm lint-staged --relative
77
lintStatus=$?
88

99
if [ $lintStatus -ne 0 ]; then

0 commit comments

Comments
 (0)