Skip to content

Publish a preview of both packages on every push - #52

Merged
stefanoverna merged 1 commit into
masterfrom
feat/continuous-releases
Aug 31, 2026
Merged

Publish a preview of both packages on every push#52
stefanoverna merged 1 commit into
masterfrom
feat/continuous-releases

Conversation

@stefanoverna

Copy link
Copy Markdown
Member

Every commit pushed to a branch here now produces installable tarballs of both
packages, without publishing anything to npm:

npm i https://pkg.pr.new/datocms-plugin-sdk@<commit-sha>
npm i https://pkg.pr.new/datocms-react-ui@<commit-sha>

Why

This one matters more than for the other repos: the only real test of an SDK
change is a plugin using it, and every plugin lives in a different repository —
ours in datocms/plugins, everyone else's in their own. Today that means
cutting a release, or npm link, which is exactly the friction that makes us
batch SDK changes instead of shipping them.

Now a plugin author can be handed a URL to try a fix before we release it.

Verified on this branch

The run on 71e3354 published both. Installed into a throwaway project:

datocms-react-ui                → pkg.pr.new     (this repo)
datocms-plugin-sdk              → pkg.pr.new     (this repo)
@datocms/cma-client             → registry.npmjs.org
datocms-structured-text-utils   → registry.npmjs.org
react, react-select, …          → registry.npmjs.org

Installing datocms-react-ui alone pulls in the datocms-plugin-sdk preview
built from the same commit, so a change touching both is tried as one set.

Choices worth reviewing

Pushes only, no fork pull requests. The workflow runs on pushes to branches
of this repo, which only people with write access can make. This is deliberate:
pkg.pr.new URLs carry our namespace and the tarballs are served
unauthenticated, so an unreviewed fork should not be able to mint one.
pkg.pr.new documents an "approved pull requests only" recipe if we want fork
previews later — plausibly worth it here, given plugin authors do send PRs.

A separate workflow, not a step in node.js.yml. That one runs a matrix of
two Node versions; pkg-pr-new must run exactly once per workflow run.

No changeset. Nothing about the published packages changes.

One thing to know

Previews are throwaway and the URLs stop resolving after a while. They must
never end up in a package.json that ships.

An SDK change can now be installed into a real plugin straight from a
branch, without a release:

    npm i https://pkg.pr.new/datocms-plugin-sdk@<commit-sha>

Nothing reaches npm, no version is spent, and there is nothing to clean
up afterwards. Installing one preview pulls in the other from the same
commit, so a change touching both is tried as one set.

Runs only on pushes to branches of this repo, so a fork cannot mint a URL
under our namespace without a maintainer pushing the code first.

Claude-Session: https://claude.ai/code/session_01TbxhxyU1XBsSKtoCJXwAoD
@stefanoverna
stefanoverna merged commit a0e5338 into master Aug 31, 2026
4 checks passed
@stefanoverna
stefanoverna deleted the feat/continuous-releases branch August 31, 2026 09:09
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