Skip to content

Commit 4f6d484

Browse files
authored
Reverted "Moved @TryGhost framework pins to pnpm catalog" (TryGhost#27535)
Reverts TryGhost#27533. The catalog resolutions do not work because `catalog:` does not work outside of a workspace, so `npm i` is broken for these packages. This largely should not matter, because anyone working on these should be doing so by cloning the TryGhost/Ghost repo, which is a workspace, and the built assets are also unaffected. I will follow up with more holistic changes to adopt the pnpm catalog after dependencies are brought more up to date.
1 parent d9f9208 commit 4f6d484

11 files changed

Lines changed: 27 additions & 60 deletions

File tree

apps/comments-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tryghost/comments-ui",
3-
"version": "1.4.9",
3+
"version": "1.4.10",
44
"license": "MIT",
55
"repository": "https://github.com/TryGhost/Ghost",
66
"author": "Ghost Foundation",
@@ -55,7 +55,7 @@
5555
"@tiptap/extension-text": "2.26.3",
5656
"@tiptap/pm": "2.26.3",
5757
"@tiptap/react": "2.26.3",
58-
"@tryghost/debug": "catalog:",
58+
"@tryghost/debug": "2.1.0",
5959
"react": "17.0.2",
6060
"react-dom": "17.0.2",
6161
"react-string-replace": "1.1.1"

apps/portal/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tryghost/portal",
3-
"version": "2.68.16",
3+
"version": "2.68.17",
44
"license": "MIT",
55
"repository": "https://github.com/TryGhost/Ghost",
66
"author": "Ghost Foundation",
@@ -133,7 +133,7 @@
133133
"vitest": "3.2.4"
134134
},
135135
"dependencies": {
136-
"@tryghost/debug": "catalog:"
136+
"@tryghost/debug": "2.1.0"
137137
},
138138
"nx": {
139139
"tags": [

apps/signup-form/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tryghost/signup-form",
3-
"version": "0.3.17",
3+
"version": "0.3.18",
44
"license": "MIT",
55
"repository": "https://github.com/TryGhost/Ghost",
66
"author": "Ghost Foundation",
@@ -31,7 +31,7 @@
3131
"prepublishOnly": "pnpm build"
3232
},
3333
"dependencies": {
34-
"@tryghost/debug": "catalog:",
34+
"@tryghost/debug": "2.1.0",
3535
"react": "18.3.1",
3636
"react-dom": "18.3.1"
3737
},

apps/sodo-search/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tryghost/sodo-search",
3-
"version": "1.8.14",
3+
"version": "1.8.15",
44
"license": "MIT",
55
"repository": "https://github.com/TryGhost/Ghost",
66
"author": "Ghost Foundation",
@@ -14,7 +14,7 @@
1414
"registry": "https://registry.npmjs.org/"
1515
},
1616
"dependencies": {
17-
"@tryghost/debug": "catalog:",
17+
"@tryghost/debug": "2.1.0",
1818
"@tryghost/i18n": "workspace:*",
1919
"flexsearch": "0.8.153",
2020
"react": "17.0.2",

e2e/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"@eslint/js": "catalog:",
3232
"@faker-js/faker": "8.4.1",
3333
"@playwright/test": "1.59.1",
34-
"@tryghost/debug": "catalog:",
35-
"@tryghost/logging": "catalog:",
34+
"@tryghost/debug": "2.1.0",
35+
"@tryghost/logging": "2.5.5",
3636
"@types/dockerode": "3.3.47",
3737
"@types/express": "4.17.25",
3838
"busboy": "^1.6.0",

ghost/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@
9797
"@tryghost/config-url-helpers": "1.0.23",
9898
"@tryghost/custom-fonts": "1.0.8",
9999
"@tryghost/database-info": "0.3.35",
100-
"@tryghost/debug": "catalog:",
100+
"@tryghost/debug": "2.1.0",
101101
"@tryghost/domain-events": "1.0.8",
102102
"@tryghost/email-mock-receiver": "2.1.0",
103-
"@tryghost/errors": "catalog:",
103+
"@tryghost/errors": "1.3.13",
104104
"@tryghost/helpers": "1.1.103",
105105
"@tryghost/html-to-plaintext": "1.0.8",
106106
"@tryghost/http-cache-utils": "0.1.25",
@@ -119,7 +119,7 @@
119119
"@tryghost/kg-markdown-html-renderer": "7.2.0",
120120
"@tryghost/kg-mobiledoc-html-renderer": "7.2.0",
121121
"@tryghost/limit-service": "1.5.2",
122-
"@tryghost/logging": "catalog:",
122+
"@tryghost/logging": "2.5.5",
123123
"@tryghost/members-csv": "2.0.5",
124124
"@tryghost/metrics": "1.0.43",
125125
"@tryghost/mongo-utils": "0.6.3",

ghost/core/scripts/pack.js

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,11 @@ const fs = require('node:fs');
2323
const path = require('node:path');
2424
const {execFileSync} = require('node:child_process');
2525
const fsExtra = require('fs-extra');
26-
const yaml = require('js-yaml');
2726

2827
const CORE_DIR = path.resolve(__dirname, '..');
2928
const ROOT_DIR = path.resolve(CORE_DIR, '../..');
3029
const DEPLOY_DIR = path.join(CORE_DIR, 'package');
3130

32-
// pnpm-workspace.yaml's `catalog:` entries are only understood inside the
33-
// pnpm workspace. After ghost-cli unpacks this tarball the install runs
34-
// outside any workspace, so any `catalog:` specifier that leaks through
35-
// would crash pnpm with ERR_PNPM_SPEC_NOT_SUPPORTED_BY_ANY_RESOLVER.
36-
// We resolve them here with the exact versions from the workspace yaml.
37-
const workspaceYaml = yaml.load(fs.readFileSync(path.join(ROOT_DIR, 'pnpm-workspace.yaml'), 'utf8'));
38-
const catalog = workspaceYaml.catalog || {};
39-
40-
function resolveCatalogSpec(name, spec) {
41-
if (spec === 'catalog:' || spec === `catalog:${name}` || spec === 'catalog:default') {
42-
const resolved = catalog[name];
43-
if (!resolved) {
44-
throw new Error(`Catalog reference for ${name} not found in pnpm-workspace.yaml`);
45-
}
46-
return resolved;
47-
}
48-
return spec;
49-
}
50-
5131
// 1. Run pnpm deploy
5232
// inject-workspace-packages is enabled only for deploy (not workspace-wide)
5333
// because it conflicts with packages that have build outputs in their files field.
@@ -104,12 +84,8 @@ for (const [key, val] of Object.entries(pkg.dependencies || {})) {
10484
const tgzName = `${slug}-${depPkg.version}.tgz`;
10585

10686
console.log(` Packing ${key} → components/${tgzName}`);
107-
// pnpm pack (vs npm pack) substitutes `workspace:` and `catalog:`
108-
// specifiers in the packed package.json with concrete versions,
109-
// which is required once the tarball is installed outside the
110-
// workspace by ghost-cli.
11187
execFileSync(
112-
'pnpm',
88+
'npm',
11389
['pack', '--pack-destination', componentsDir],
11490
{cwd: depDir, stdio: 'pipe'}
11591
);
@@ -131,11 +107,8 @@ console.log(` Set packageManager: ${rootPkg.packageManager.split('+')[0]}`);
131107
// creates a standalone context where these don't apply, so we merge them in.
132108
if (rootPkg.pnpm?.overrides || rootPkg.overrides) {
133109
const rootOverrides = rootPkg.pnpm?.overrides || rootPkg.overrides;
134-
const resolvedOverrides = Object.fromEntries(
135-
Object.entries(rootOverrides).map(([name, spec]) => [name, resolveCatalogSpec(name, spec)])
136-
);
137110
pkg.pnpm = pkg.pnpm || {};
138-
pkg.pnpm.overrides = {...resolvedOverrides, ...pkg.pnpm.overrides};
111+
pkg.pnpm.overrides = {...rootOverrides, ...pkg.pnpm.overrides};
139112
console.log(` Merged ${Object.keys(rootOverrides).length} root overrides into package.json`);
140113
}
141114

ghost/i18n/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"mocha": "11.7.5"
3838
},
3939
"dependencies": {
40-
"@tryghost/debug": "catalog:",
40+
"@tryghost/debug": "2.1.0",
4141
"i18next": "23.16.8"
4242
},
4343
"nx": {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
},
6161
"pnpm": {
6262
"overrides": {
63-
"@tryghost/errors": "catalog:",
64-
"@tryghost/logging": "catalog:",
63+
"@tryghost/errors": "^1.3.7",
64+
"@tryghost/logging": "2.5.5",
6565
"jackspeak": "2.3.6",
6666
"moment": "2.24.0",
6767
"moment-timezone": "0.5.45",

pnpm-lock.yaml

Lines changed: 9 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)