feat(toolkit): build compact-js/platform-js from pinned midnight-sdk submodule#1855
Draft
gilescope wants to merge 1 commit into
Draft
feat(toolkit): build compact-js/platform-js from pinned midnight-sdk submodule#1855gilescope wants to merge 1 commit into
gilescope wants to merge 1 commit into
Conversation
Signed-off-by: Giles Cope <gilescope@gmail.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.
Overview
util/toolkit-js/compact-0.31previously pinned@midnight-ntwrk/{compact-js,compact-js-command,compact-js-node}(and
platform-jstransitively) from the npm registry. This PR builds them from source instead, from a newmidnight-sdk/git submodule pinned to the signedcjs-2.5.1release tag — the submodule commit, not theregistry, becomes the version of truth. Same pattern as the existing
compact/compiler submodule.midnight-sdk/submodule @7795a74(tagcjs-2.5.1)scripts/build-midnight-sdk-js.shbuilds all four packages into.midnight-sdk-js/*.tgzusing thesubmodule's own yarn scripts, adapted for credential-free builds: public-npm registry override (its
yarn.lock pins authenticated npm.pkg.github.com archive URLs), in-tree platform-js cross-wired into
compact-js, sibling deps pinned to the exact built versions so npm dedupes onto the local set
so the
file:integrity hashes inpackage-lock.jsonare stable+midnight-sdk-jsEarthly target (pinned node image) runs the script;+midnight-sdk-js-localexportsto the host;
+toolkit-js-prepconsumes the artifact beforenpm cicompact-0.29/compact-0.30compat variants keep their registry pinsnpm ci(EINTEGRITY)🗹 TODO before merging
📌 Submission Checklist
git commit -s) for the DCO🧪 Testing Evidence
earthly +midnight-sdk-js-localoutput matches the committed lockfile integrity hashes byte-for-bytenode:23.11.0linux container build → identical sha256searthly +toolkit-js-prepgreen end-to-end (submodule build →npm ci→ build → contract compilation → key check)npm ci+npm run build+ vitest green with compactc 0.31.0🔱 Fork Strategy
Links