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
{{ message }}
Repository navigation
Commit dc6c7ee
Browse filesBrowse the repository at this point in the historyBrowse files
fix(create-objectstack): template baseline pins @objectstack/* exactly; specVersion stays a range (#25665)
<!-- claude-projects-attribution: {"github_login":"os-elon-musk"} -->
_Requested by **Elon** · [project
thread](https://claude.ai/code/project/chan_01WedDzV26nniwxv7jC88B9D?thread=cmsg_01WedDzV26nniwxv7jC88B9DT4vQy7pHzA3u25DpvdoWTR)_Fixes#25510
Clause-②: no
Metadata-protocol: none
The remaining slice after PR #25539 (which made the scaffolders write
exact pins). The committed template baseline now says what the scaffold
writes, and the release-time version pass keeps it that way.
## What changed
- **`scripts/sync-template-versions.mjs`** stamps two values where it
used to stamp one:
- every template `@objectstack/*` dependency gets the scaffolder's
**exact** version (`18.1.0`; a prerelease such as `19.0.0-rc.0`
verbatim);
- the manifest's `specVersion` stays the major's **range** (`^18.0.0`),
because it names the spec line the template is authored against.
- `loadScaffolderVersion()` keeps its `{ version, major, range }` shape;
`range` is documented as the `specVersion` value only. The version read
is now anchored at both ends (`EXACT_VERSION`), since it is written
verbatim into dependencies: `18.1.0garbage` used to pass a prefix match.
- Header section rewritten from "two values" to "three values", stating
why deps are exact and `specVersion` is not.
- **`--self-test`**: fixtures are built in lockstep at the exact
version. Two new batteries (roster floor 8 → 10):
- Control I: a prerelease corpus (`42.0.0-rc.1`) is judged clean at its
exact version with `specVersion` still `^42.0.0`, byte-identical and
unwritten;
- Control J: a scaffolder version that is not a whole semver exits 1
naming it, with no template surface rewritten.
- **`template-consistency.test.ts`**: the ratchet now requires each
`@objectstack/*` dep to equal `create-objectstack`'s exact version (was
`^MAJOR.x`). The `specVersion` agreement test compares `specVersion`
with `^<major of the pinned spec dep>.0.0` instead of string equality.
- **`template-version-stamps.test.ts`**: the stale-to-rewritten run
expects exact deps; a new case runs the CLI at `43.0.0-rc.2` and asserts
the deps take it verbatim while `specVersion` and `engines.protocol`
take the major. `copyWithLocalImports` gained a target-directory
parameter so the second fixture copies the import closure instead of a
hand list.
- **`templates/blank/package.json`**: restamped by running the script
itself (9 entries, `^18.0.0` → `18.1.0`).
- Stale caret comments corrected in `create-objectstack/src/index.ts` (3
places) and `src/runtime-image.ts`.
- Changeset: `create-objectstack` patch.
## Post-version trees
Simulated by setting `create-objectstack`'s version, running the script,
then the two ratchet files:
| version | script output | ratchets |
|:--|:--|:--|
| `18.1.1` (minor/patch train) | deps at 18.1.1, specVersion at ^18.0.0
| 50/50 passed |
| `19.0.0-rc.0` (major rc cut) | deps at 19.0.0-rc.0, specVersion at
^19.0.0, engines.protocol ^19 | 50/50 passed |
`cut-rc.yml` and `release.yml` read the stamped surface from
`stampedPaths()`, which is unchanged (same three files per template),
and `cut-rc.yml`'s allowlist already admits each template's
`package.json`. One behaviour change on the release path: on a minor or
patch train the template `package.json` now changes on every version
pass (it used to log "already pins"). That file is already in the
allowlist, so the cut still pushes.
## Verification (head 3f96816)
- `pnpm --filter create-objectstack test`: Test Files 18 passed (18),
Tests 269 passed (269).
- `pnpm --filter create-objectstack typecheck`: exit 0, after `pnpm
--filter 'create-objectstack^...' build` exit 0.
- `node scripts/sync-template-versions.mjs --self-test`: exit 0.
Ablations, each restored after: deps stamped with the range again → 10
failures (Control A and I); the version regex back to a prefix match →
Control J red; `specVersion` stamped from the exact version → Control A
red on both manifests.
- vitest ablations: the old `^18.0.0` baseline → 2 failures in
`template-consistency.test.ts`; deps stamped with the range → 2 failures
in `template-version-stamps.test.ts`.
- `node scripts/sync-scaffold-emission-policy.mjs --self-test` (imports
this script's declarations) exit 0, and `--check` exit 0.
- Derived gates (`dispatch-gates --commands`): 100 families, 95 exit 0,
5 NOT MEASURED (exit 3): `check:dts-closure`,
`check:dual-build-cjs-loads`, `check:lean-entry-closure`,
`check:sourcemap-no-sources-content` need a full build;
`check-plugin-teardown-shape --self-test` needs an unshallow clone.
`--ran` reconcile: "100 derived famil(ies) accounted for — 95 run, 5
NOT-MEASURED". CI runs all five.
## Acceptance notes
- Docs half (`content/docs/protocol/kernel/plugin-spec.mdx`,
`content/docs/upgrading.mdx`) rides the devx seat's own docs PR, which
carries `Part of #25510`.
- `skills/objectstack-platform/references/bootstrap.md:147-153` still
shows `^17.0.0` for five `@objectstack/*` packages in a published
skill's `package.json` example. Governed surface, not edited here; for
the devx seat to route.
- Comment-only staleness left alone because the files sit outside this
claim: `.github/workflows/cut-rc.yml:505-507` ("On a minor train it logs
already pins and writes nothing"), `scripts/regen-artifacts.mjs:781` and
`scripts/cross-package-test-inputs.mjs:1522` (call the stamped values
"ranges").
---
_Generated by [Claude
Code](https://claude.ai/code/session_01GcPmaQ9wUnUUM3ATKkiCes)_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01GcPmaQ9wUnUUM3ATKkiCes
Co-authored-by: Claude <noreply@anthropic.com>
fix(create-objectstack): the bundled blank template pins every `@objectstack/*` dependency at the exact release version
6
+
7
+
Clause-②: no
8
+
Metadata-protocol: none
9
+
10
+
The `blank` template's committed `package.json` now lists each `@objectstack/*` package at the exact version of the `create-objectstack` release that ships it (`18.1.0`, a prerelease verbatim), instead of `^18.0.0`. A scaffolded project already received exact pins, because the scaffolder rewrites these entries at scaffold time; the template a reader opens in the tarball or on GitHub now says the same thing, which is what the v18 docs prescribe ("Pin exact versions").
11
+
12
+
The template manifest's `specVersion` stays a range (`^18.0.0`): it names the `@objectstack/spec` line the template is authored against, not a build. The release-time version pass keeps both values current — the exact version in the dependencies, the major's range in `specVersion`.
0 commit comments