create-apollo-monorepo 0.9.7 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/index.mjs +7 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -106,3 +106,21 @@ pnpm backend:update # git submodule update --remote --merge apps/backend
|
|
|
106
106
|
|
|
107
107
|
Don't edit files inside `apps/backend` — open issues / PRs against the
|
|
108
108
|
`apollo-cms` repository upstream.
|
|
109
|
+
|
|
110
|
+
## Deploying to production
|
|
111
|
+
|
|
112
|
+
The scaffold pins `packageManager: "pnpm@11.0.0"` so Corepack picks the right
|
|
113
|
+
pnpm. If your CI / deploy host installs pnpm separately, **make sure it's
|
|
114
|
+
pnpm 11+** — pnpm 11 sets `strictDepBuilds: true` by default and reads the
|
|
115
|
+
allow-list from `allowBuilds` in `pnpm-workspace.yaml`. pnpm 10 silently
|
|
116
|
+
ignores `allowBuilds`; pnpm 11 silently ignores the deprecated
|
|
117
|
+
`onlyBuiltDependencies`. Mixing the two leads to `sharp` (and `esbuild`,
|
|
118
|
+
`@swc/core`, …) skipping their postinstalls, which surfaces at runtime as:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Failed to load external module sharp-<hash>:
|
|
122
|
+
Error: Cannot find module 'sharp-<hash>'
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The scaffold's `pnpm-workspace.yaml` already lists the binaries Apollo CMS
|
|
126
|
+
needs in `allowBuilds`. If you add a new native dep, append it there.
|
package/index.mjs
CHANGED
|
@@ -398,7 +398,13 @@ function writeRootPackageJson(targetDir, dirName) {
|
|
|
398
398
|
devDependencies: {
|
|
399
399
|
concurrently: "^9.0.0",
|
|
400
400
|
},
|
|
401
|
-
|
|
401
|
+
// Pin to pnpm 11 because `pnpm-workspace.yaml` uses the `allowBuilds`
|
|
402
|
+
// map format introduced in v11 (deprecated `onlyBuiltDependencies` is
|
|
403
|
+
// silently ignored on v11 — sharp/esbuild postinstalls then no-op and
|
|
404
|
+
// /admin/media crashes at runtime with "Cannot find module sharp-…").
|
|
405
|
+
// Corepack uses this field to auto-fetch the right pnpm.
|
|
406
|
+
packageManager: "pnpm@11.0.0",
|
|
407
|
+
engines: { node: ">=22", pnpm: ">=11" },
|
|
402
408
|
};
|
|
403
409
|
writeFileSync(resolve(targetDir, "package.json"), JSON.stringify(pkg, null, 2) + "\n");
|
|
404
410
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-apollo-monorepo",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.9",
|
|
4
4
|
"description": "Scaffold a monorepo with a frontend app and Apollo CMS as a git submodule backend (single-origin via Next.js rewrites + assetPrefix)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-apollo-monorepo": "index.mjs"
|