Repository navigation
feat(sdk): move a pinned dependency in one command with make sync-pinned - #144
Merged
Merged
Conversation
…to every package.json Moving a pinned dependency meant hand-editing every package.json that declares it until `check pinned-dependencies` passed. `sync pinned` copies npm-manifest.json#dependencies.pinned into every declaration instead, walking exactly the packages and dependency fields the check walks, so the package.json half of the check passes by construction. `--check` compares without writing. Each spec is replaced as text inside its dependency block and the result proven by reparsing, so formatting and every other entry stay byte for byte. Lockfiles are left to npm: the command says to run `make install` and the consumer-lock regeneration next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mmand Runs `fhevm-npm sync pinned`, rewrites each install root's lockfile with `npm install --package-lock-only` (no node_modules, no install scripts, already-locked versions kept), regenerates the consumer fixtures' lockfiles, proves the result with `check pinned-dependencies`, then installs from the new lockfiles with `install-ci`, as CI will. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…interrupted run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… instead of from scratch test-consumer-regenerate-package-lock deleted the fixture's lockfile before running npm, so every regeneration moved every dependency to the newest version its range allowed. A pin bump through `make sync-pinned` dragged unrelated updates into fixtures that do not even use the pinned package (@types/node, tsx and typescript in all four host-contracts fixtures). npm now starts from the committed lockfile, as `npm install` does in an installation root, so only what changed is re-resolved. `--fresh` keeps the old behaviour for a deliberate refresh. A local payload whose locked version went stale still fails the existing validation instead of being written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A @fhevm/solidity pin bump left `make check-pre` failing until `sync hh-v2-constants` was run by hand. `make sync-pinned` now runs it right after `sync pinned`; it writes only when the constants are stale, so any other pin bump leaves them untouched. Tagged hh-v2-constants for removal with hardhat/v2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nboisde
approved these changes
Oct 8, 2026
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.
Summary
Moving a pinned dependency (
npm-manifest.json#dependencies.pinned) meant hand-editing everypackage.jsonthat declares it, then regenerating six lockfiles in three different ways untilcheck pinned-dependenciespassed. This PR turns that into: edit the pin, runmake sync-pinned.Changes
fhevm-npm sync pinnedcopies the manifest's pins into everypackage.jsondeclaration. Itwalks exactly what
check pinned-dependencieswalks, so that check'spackage.jsonhalf passes byconstruction. Specs are replaced as text inside their dependency block and the result proven by
reparsing, so formatting and every other entry stay byte for byte.
--checkcompares without writing.make sync-pinnedrunssync pinned, thensync hh-v2-constants(Hardhat 2 only, tagged forremoval), then
npm install --package-lock-onlyin each install root, then the consumer-lockregeneration, then
check pinned-dependencies, theninstall-cito install exactly what the newlockfiles say, as CI will.
lock before running npm, so every regeneration moved every dependency to the newest in-range version.
npm now starts from the committed lock and only re-resolves what changed.
--freshkeeps the oldbehaviour for a deliberate refresh.
.gitignorecovers the scratch fhevm-npm can leave in the tree after an interrupted run: theconsumer-lock staging folders, their pending lockfiles, and the test workspaces under
fhevm-npm/.Verified
Starting from the release branch with only the pins moved (
@fhevm/sdk^0.13.4 → ^0.13.7,@fhevm/solidity^0.13.3 → ^0.13.4), the steps ofmake sync-pinnedup to the pin check:package.jsonfiles byte for byte;plugin fixture moved 25 versions and each host-contracts fixture moved
@types/node,tsxandtypescript, though none of them uses either pin;check pinned-dependenciespassing.fhevm-npm suite: 369 tests pass. The pin bump itself is not part of this PR; it follows in its own.
🤖 Generated with Claude Code