Commit f2f09e4
fix(create-objectstack): pin the scaffolded Dockerfile's runtime image to the CLI that builds the artifact (#9115)
* fix(create-objectstack): pin the scaffolded Dockerfile's runtime image to the CLI that builds the artifact (#9017)
The blank template shipped `FROM ghcr.io/objectstack-ai/objectstack:latest`
directly beneath a comment telling the reader to pin the tag to the
`@objectstack/cli` version in their package.json — an instruction the scaffold
itself did not follow, baked into every `npx create-objectstack` app.
The tag is resolved AFTER install, from the installed CLI, not from the
generated package.json: that file carries a caret range, and npm resolves
`^17.0.0` to the newest 17.x, so pinning the range's floor would ship a runtime
image older than the CLI that built the artifact. This is the rule
scaffold-e2e.yml already applies for the same reason.
Both halves move together — the comment above the FROM line is rewritten in the
same pass, so the scaffold no longer instructs a step it just performed. With
--skip-install there is no resolved version: the tag stays `latest` and the
imperative comment stays, which is true on that path.
scaffold-e2e.yml now reads the tag it builds its local runtime image under out
of the generated Dockerfile instead of hardcoding `:latest`. Those were two
hand-matched literals; a skew would have made Docker pull the last published
image instead of the one built from this checkout, leaving the job's stated
hermeticity false while it stayed green.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y26DJEHSBhhAQ6wwfsHNza
* test(create-objectstack): pin the scaffolder wiring too, not just the pin helper (#9017)
The behavioural tests call pinRuntimeImage directly, so removing the call from
index.ts would have left them green while every scaffolded app kept `latest`.
index.ts cannot be imported (program.parse() at module scope), so its text is
asserted — the same compromise template-consistency.test.ts already makes.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y26DJEHSBhhAQ6wwfsHNza
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 4dc8a61 commit f2f09e4
6 files changed
Lines changed: 520 additions & 6 deletions
File tree
- .changeset
- .github/workflows
- packages/create-objectstack/src
- templates/blank
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
218 | 230 | | |
219 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
220 | 238 | | |
221 | | - | |
| 239 | + | |
| 240 | + | |
222 | 241 | | |
223 | 242 | | |
224 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
| |||
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| 55 | + | |
49 | 56 | | |
50 | 57 | | |
51 | 58 | | |
| |||
348 | 355 | | |
349 | 356 | | |
350 | 357 | | |
| 358 | + | |
351 | 359 | | |
352 | 360 | | |
353 | 361 | | |
| 362 | + | |
354 | 363 | | |
355 | 364 | | |
356 | 365 | | |
357 | 366 | | |
358 | 367 | | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
359 | 391 | | |
360 | 392 | | |
361 | 393 | | |
| |||
0 commit comments