Skip to content

feat: urlcode upgrade - #665

Merged
jimhoyd merged 1 commit into
mainfrom
claude/upgrade
Sep 24, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
claude/upgrade

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Third of three PRs; #663 and #664 are merged.

urlcode upgrade [--check] [--to X.Y.Z] [--site directory] [--json] moves core and every installed extension and artifact to one version together.

Target. By default it is the latest stable release: npm's latest dist-tag, which only a stable release moves (prereleases go to alpha). --to selects any release, including a prerelease or an older one.

What it does, in order:

  1. Installs core at the target first.
  2. Reads that core's own dist/addons.json, so the add-on bytes that belong to it come from its pins and nothing else.
  3. Refuses if the target doesn't release an installed add-on.
  4. Points every add-on at those pins and checks the lock against them, including for nested copies.
  5. Validates the project with the new runtime.
  6. Moves the site workflow's jimhoyd-com/urlcode/action@v… to the same release.

Rollback. Any failure restores package.json, package-lock.json and the workflows, then reinstalls.

--check reports current → target and changes nothing. A second run is a no-op.

Not included. It does not migrate configuration. If an extension's schema changed, validation names the field.

Release verify. The release verify job now also checks that a fresh site reports itself up to date.

Evidence

test/upgrade.test.ts (5 tests) uses a fake npm registry of core releases, each carrying its own addons.json and a stand-in CLI:

  • --check reports the target and changes nothing, and refuses a non-stable latest.
  • A normal upgrade moves core, then the add-ons to the new core's pins, and moves the workflow ref. Running it again is a no-op.
  • --to works for a prerelease and a downgrade, and refuses anything that isn't a version.
  • Rollback restores all files and the previous install when the target lacks an add-on, and when the new runtime rejects the project.
  • A core pinned to a range is refused.

The root suite (792 tests), lint, typecheck and npm run check pass.

Not yet exercised against real registry releases: that needs two published versions of this design.

🤖 Generated with Claude Code

@jimhoyd
jimhoyd force-pushed the claude/upgrade branch 2 times, most recently from 79dd5ce to dc50212 Compare September 24, 2026 17:28
@jimhoyd
jimhoyd force-pushed the claude/release-rewrite branch from f15e6f0 to 9569aa0 Compare September 24, 2026 17:31
Base automatically changed from claude/release-rewrite to main September 24, 2026 17:35
`urlcode upgrade [--check] [--to X] [--site dir]` moves core and every
installed extension and artifact to one version together. The target is the
latest stable release (npm's latest dist-tag, which only a stable release
moves) unless --to names another, including a prerelease or an older one.

Core is installed first; its own dist/addons.json then decides which add-on
bytes follow, and the lock is checked against those pins. The new runtime
validates the project, and the site's workflow moves to the same action
release. Any failure restores package.json, package-lock.json and the
workflows and reinstalls. The release verify job checks a fresh site reports
itself up to date.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd merged commit 34d1b12 into main Sep 24, 2026
23 checks passed
@jimhoyd
jimhoyd deleted the claude/upgrade branch September 24, 2026 17:40
@jimhoyd jimhoyd mentioned this pull request Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant