Skip to content

[S] Publish the fork as @loop-payments/quickjs to GitHub Packages - #1

Merged
evanrichards merged 1 commit into
mainfrom
evan/publish-to-github-packages
Sep 12, 2026
Merged

evanrichards merged 1 commit into
mainfrom
evan/publish-to-github-packages

Conversation

@evanrichards

Copy link
Copy Markdown
Collaborator

Why

We forked sebastianwessel/quickjs so we can change the sandbox runtime that @loop-payments/ts-sandbox runs, without waiting on an upstream release. Right now the fork is byte-identical to upstream, and nothing can consume it: the npm tarball ships only dist/, dist is gitignored, and there is no prepare script — so a plain git dependency installs an empty package. This PR gives the fork a way to ship.

What

  • Renames the package to @loop-payments/quickjs and points publishConfig at https://npm.pkg.github.com with access: restricted. Mirrors how loop-payments/x12-parser publishes.
  • Repoints repository/homepage/bugs at this fork. GitHub Packages uses repository to attach the package to a repo, so this one is load-bearing, not cosmetic.
  • Adds .github/workflows/publish.yml, modelled on upstream's release.yml. It runs on a published GitHub Release, checks the tag matches package.json's version, then lints / typechecks / tests / builds / publishes. It authenticates with the built-in GITHUB_TOKEN — no new secret to manage.
  • Removes upstream's release.yml, jsr.json, .np-config.json, and the postpublish / release scripts. Those publish to public npm and JSR under the upstream name; leaving them in place is a foot-gun.
  • Removes deploy-docs.yml, which deploys the upstream docs site to GitHub Pages on every push to main.
  • Adds FORK.md with 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.yml is 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.0 is released and published, in the backend:

"@loop-payments/quickjs": "^3.1.0"

and update the two references in lib/ts-sandbox/src/runtime/worker/sandbox-worker.ts. The backend .npmrc already routes the @loop-payments scope to GitHub Packages, so no credential work is needed.

Verification

actionlint passes on the new workflow. The build itself is unchanged from upstream and needs bun, which the workflow installs via oven-sh/setup-bun.

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.
@evanrichards
evanrichards merged commit ad20b5c into main Sep 12, 2026
1 check passed
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