create-apollo-monorepo 0.9.989 → 0.9.992
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 +35 -0
- package/index.mjs +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,6 +107,41 @@ pnpm backend:update # git submodule update --remote --merge apps/backend
|
|
|
107
107
|
Don't edit files inside `apps/backend` — open issues / PRs against the
|
|
108
108
|
`apollo-cms` repository upstream.
|
|
109
109
|
|
|
110
|
+
### Scaffolds created before v0.9.991
|
|
111
|
+
|
|
112
|
+
Two entries were missing from older scaffolds, and `pnpm dev` fails during
|
|
113
|
+
`plugins:build` without them:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
error: Could not resolve: "ioredis"
|
|
117
|
+
error: Could not resolve: "@opentelemetry/api"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
`apps/backend/plugins/*` has to be listed in the root `pnpm-workspace.yaml`
|
|
121
|
+
(apollo-cms's own workspace file is ignored once the submodule is a package of
|
|
122
|
+
an outer workspace, so the built-in plugins' dependencies never install), and
|
|
123
|
+
`@opentelemetry/api` has to be a root devDependency (bun's bundler resolves
|
|
124
|
+
`next`'s guarded `require()` of this optional peer, which pnpm — unlike bun —
|
|
125
|
+
does not install). Patch an existing scaffold with:
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
# pnpm-workspace.yaml
|
|
129
|
+
packages:
|
|
130
|
+
- 'apps/*'
|
|
131
|
+
- 'apps/cms-plugins/*'
|
|
132
|
+
- 'apps/backend/plugins/*' # add this
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
```jsonc
|
|
136
|
+
// package.json
|
|
137
|
+
"devDependencies": {
|
|
138
|
+
"concurrently": "^9.0.0",
|
|
139
|
+
"@opentelemetry/api": "^1.9.0" // add this
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
then re-run `pnpm install`.
|
|
144
|
+
|
|
110
145
|
## Deploying to production
|
|
111
146
|
|
|
112
147
|
The scaffold pins `packageManager: "pnpm@11.0.0"` so Corepack picks the right
|
package/index.mjs
CHANGED
|
@@ -389,6 +389,14 @@ function writeRootPackageJson(targetDir, dirName) {
|
|
|
389
389
|
},
|
|
390
390
|
devDependencies: {
|
|
391
391
|
concurrently: "^9.0.0",
|
|
392
|
+
// Optional peer of `next` (and `@better-auth/core`). Nothing imports it
|
|
393
|
+
// eagerly at runtime, but `bun build` resolves every `require()` it can
|
|
394
|
+
// see — including the guarded one in next/dist/server/lib/trace/tracer.js
|
|
395
|
+
// — so an uninstalled optional peer fails the plugin bundle with
|
|
396
|
+
// `error: Could not resolve: "@opentelemetry/api"`. bun install pulls
|
|
397
|
+
// optional peers in automatically, which is why apollo-cms standalone
|
|
398
|
+
// never hits this; pnpm skips them, so the monorepo must ask for it.
|
|
399
|
+
"@opentelemetry/api": "^1.9.0",
|
|
392
400
|
},
|
|
393
401
|
// Pin to pnpm 11 because `pnpm-workspace.yaml` uses the `allowBuilds`
|
|
394
402
|
// map format introduced in v11 (deprecated `onlyBuiltDependencies` is
|
|
@@ -451,6 +459,13 @@ function writePnpmWorkspace(targetDir) {
|
|
|
451
459
|
"packages:",
|
|
452
460
|
" - 'apps/*'",
|
|
453
461
|
" - 'apps/cms-plugins/*'",
|
|
462
|
+
// apollo-cms declares `plugins/*` in its own pnpm-workspace.yaml, but a
|
|
463
|
+
// nested workspace file is ignored once the submodule is itself a package
|
|
464
|
+
// of an outer workspace. Without this glob pnpm never installs the
|
|
465
|
+
// built-in plugins' dependencies, and `plugins:build` dies with
|
|
466
|
+
// `error: Could not resolve: "ioredis"` (apollo-api-cache) before the
|
|
467
|
+
// backend can start.
|
|
468
|
+
" - 'apps/backend/plugins/*'",
|
|
454
469
|
"",
|
|
455
470
|
"allowBuilds:",
|
|
456
471
|
" '@parcel/watcher': true",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-apollo-monorepo",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.992",
|
|
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"
|