[S] Publish the fork as @loop-payments/quickjs to GitHub Packages - #1
Merged
Merged
Conversation
Loop must change the QuickJS sandbox runtime without a wait for an upstream release. This fork carries those changes. The backend package `@loop-payments/ts-sandbox` is the consumer. This change renames the package to `@loop-payments/quickjs` and sends it to GitHub Packages. The `repository` field points at this fork, because GitHub Packages uses that field to attach the package to a repository. The backend `.npmrc` already sends the `@loop-payments` scope to that registry, so the backend needs no new credentials. The workflow `publish.yml` runs on a published GitHub Release. It checks that the release tag agrees with the version in `package.json`, then it lints, typechecks, tests, builds, and publishes. It authenticates with the built-in `GITHUB_TOKEN`. Upstream publishes to npm and to JSR. This change removes `release.yml`, `jsr.json`, and `.np-config.json`, because Loop publishes to one registry only. It also removes `deploy-docs.yml`, because Loop does not host the upstream documentation website. `FORK.md` records the version policy, the release steps, and the steps to take upstream changes.
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.
Why
We forked
sebastianwessel/quickjsso we can change the sandbox runtime that@loop-payments/ts-sandboxruns, without waiting on an upstream release. Right now the fork is byte-identical to upstream, and nothing can consume it: the npm tarball ships onlydist/,distis gitignored, and there is nopreparescript — so a plain git dependency installs an empty package. This PR gives the fork a way to ship.What
@loop-payments/quickjsand pointspublishConfigathttps://npm.pkg.github.comwithaccess: restricted. Mirrors howloop-payments/x12-parserpublishes.repository/homepage/bugsat this fork. GitHub Packages usesrepositoryto attach the package to a repo, so this one is load-bearing, not cosmetic..github/workflows/publish.yml, modelled on upstream'srelease.yml. It runs on a published GitHub Release, checks the tag matchespackage.json's version, then lints / typechecks / tests / builds / publishes. It authenticates with the built-inGITHUB_TOKEN— no new secret to manage.release.yml,jsr.json,.np-config.json, and thepostpublish/releasescripts. Those publish to public npm and JSR under the upstream name; leaving them in place is a foot-gun.deploy-docs.yml, which deploys the upstream docs site to GitHub Pages on every push tomain.FORK.mdwith the version policy, the release steps, and the steps for pulling upstream changes.The diff against upstream is deliberately small so future upstream merges stay clean. The only shared file we touch is
package.json;pull_request.ymlis left alone.Versioning
The version tracks the upstream release the fork sits on. We start at
3.1.0(upstream's current release) and bump the patch for Loop changes. When we take a new upstream release we move to that version.Consuming it
Once
v3.1.0is released and published, in the backend:and update the two references in
lib/ts-sandbox/src/runtime/worker/sandbox-worker.ts. The backend.npmrcalready routes the@loop-paymentsscope to GitHub Packages, so no credential work is needed.Verification
actionlintpasses on the new workflow. The build itself is unchanged from upstream and needsbun, which the workflow installs viaoven-sh/setup-bun.