You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(create-objectstack): generate the on-ramp's version pins from the shared emission policy (#16654)
* fix(create-objectstack): generate the on-ramp's version pins from the shared emission policy
`npx create-objectstack` declared `typescript: ^6.0.0` while `os init` and `os
create` emitted `^5.3.0` from the shared `SCAFFOLD_*` constants, so two projects
created the same day got different TypeScript majors depending on which
documented entry point the reader followed.
The structural cause is that `create-objectstack` cannot import from
`@objectstack/cli` — the dependency edge runs the other way and the npx package
must not pull the CLI's closure — so its bundled template restated the policy and
the restatement decayed. Editing the values into agreement would leave them free
to diverge again for the same reason, so they are generated instead:
- `scripts/sync-scaffold-emission-policy.mjs` reads the constants out of
`packages/cli/src/commands/init.ts` and stamps them into every bundled
template's `package.json`; `create-objectstack`'s `build` runs it, and
`pnpm check:scaffold-emission-policy` reds on drift (both legs in lint.yml).
- `test/scaffold-emission-policy.e2e.test.ts` now drives all THREE scaffolders
and compares the manifests they emit, rather than restating the constants.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ
* fix(create-objectstack): declare the generator's inputs and its merge disposition
Three gate findings from the first pass, all in the wiring rather than the
mechanism:
- `check:cross-package-test-inputs` — the emission-policy pin names
`scripts/sync-scaffold-emission-policy.mjs`, so `@objectstack/cli` must declare
it (with the on-ramp's `bin/` entry and bundled template) or a change to it
would replay a cached green over the divergence the pin exists to catch.
- `check:merge-driver` — every `gen:` name owes a recorded merge disposition.
The bundled `package.json` is MIXED: the generator rewrites two values and
reproduces none of the rest, so it is `NOT_DRIVER_MANAGED` with the reason.
- The same gate counts generator NAMES, so `create-objectstack`'s build calls
the script directly rather than declaring a second `gen:` alias for it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YFY46JydE1gMxQG1TqBcMZ
---------
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments