Repository navigation
fix(release): keep ohpm lockfiles in sync with manifest versions - #116
Merged
Merged
Conversation
The 1.0.0-beta.4 release bumped native_ability and nine plugin HAR manifests without regenerating their oh-package-lock.json5 files. The pnpm postinstall runs `ohpm-rs install`, which rewrote all 22 lockfiles and left a dirty tree, so release-plz aborted with "the working directory of this project has uncommitted changes" and stopped creating release PRs. Regenerate the affected locks and refresh them in release:sync right after bumping manifests, so the release PR carries the update and the next CI install is a no-op. Co-Authored-By: Claude Code <noreply@anthropic.com>
ohpm-cli 0.5.0 adds `install --lockfile-only`, so the release sync no longer needs a full install to regenerate lockfiles. Resolve only the lockers instead of downloading packages and rewriting oh_modules. Centralize the CLI pin in scripts/ensure-ohpm.js: cargo install refuses to replace a different version without --force, which would otherwise break `pnpm install` for anyone upgrading from an older pin. Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Release-plz PRjob fails on every push tomain:The 1.0.0-beta.4 release (#113) bumped
native_abilityand nine plugin HAR manifests but did not regenerate theiroh-package-lock.json5files. Thepnpm installstep runs thepostinstallhook (scripts/install-ohpm.js→ohpm-rs install --all), which rewrites all 22 lockfiles to record the new versions. release-plz then refuses to run on a dirty tree, so no new release PR is created.Changes
versionfields (1.0.0-beta.3→1.0.0-beta.4); lock structure is unchanged.scripts/sync-release.js: afterohpm-rs versionbumps the manifests, refresh the lockfiles before formatting, so the release PR carries the lock update and the next CI install is a no-op.ohpm-clito the just-released 0.5.0 through a newscripts/ensure-ohpm.js:cargo installrefuses to replace a different installed version without--force, so a bare pin bump would breakpnpm installfor anyone upgrading from 0.3.0/0.4.0. The script checksohpm-rs --versionand only reinstalls (with--force) on a mismatch.ohpm-rs install --lockfile-only(added in ohpm-rs 0.5.0) instead of a full install: resolution only, no tarball downloads, nooh_modulesor manifest writes.Verification
ohpm-rs install --allupdates only the version fields in the 22 lockfiles; a second install is a no-op.ohpm-cli 0.5.0binary exposes--lockfile-only; its output on a clean workspace snapshot is byte-identical to a full install.node scripts/install-ohpm.js --lockfile-onlyleaves the working tree clean (no lock changes, nooh_modules).scripts/ensure-ohpm.js: with 0.4.0 on PATH it runscargo install ... --force; with 0.5.0 it exits without invoking cargo.node scripts/sync-release.js --dry-runruns cleanly;ohpm-rs versionalone does not update lockfiles.🤖 Generated with Claude Code