chore: skip the private testbed in releases and pin publishes to the beta tag

Merged
OK
4mo ago
+44-17

Two release-plumbing defects surfaced by #81.

The testbed is versioned as if it ships

Changesets never publishes a private package, but it does version one by
default. So #81 bumps @e2edev/testbed 0.0.0 -> 0.0.1, adds
packages/testbed/CHANGELOG.md, and would cut it a git tag — for a package that
exists only to dogfood the built artifacts.

"privatePackages": false in .changeset/config.json skips it outright
(shorthand for { version: false, tag: false }). The "dependent of a skipped
package" validation only fires for packages that depend on the skipped one, and
nothing depends on the testbed, so this is safe.

The beta channel is not pinned to the packages

--tag beta (added in #74, still unreleased) lived only in one root script
string. Both publishable packages now carry publishConfig.tag: "beta", so the
channel travels with the package and a hand-run npm publish honours it.

To be clear about which mechanism actually works: --tag beta still decides the
channel. changeset publish always forwards --tag to the publish tool
(internalPublish, @changesets/cli@2.31.1 changesets-cli.cjs.js:887), and
pnpm publish ignores publishConfig.tag. The manifest field is a backstop and
a record of intent, not the enforcement. The prose now says so rather than
implying the field is load-bearing.

Verification

Ran changeset version for real against the same six changesets #81 consumed:

M packages/e2e/package.json          0.1.0 -> 0.2.0
M packages/playwright/package.json   0.1.0 -> 0.2.0
?? packages/e2e/CHANGELOG.md
?? packages/playwright/CHANGELOG.md

packages/testbed/ untouched, no packages/testbed/CHANGELOG.md. #81 had both.
The version artifacts were then reverted — changesets/action owns those.

Two things that are not fixed here, because they cannot be

  • e2e has no beta tag today. Its dist-tags are { latest: '0.1.0' };
    --tag beta has never actually run. So pnpm add -D e2e@beta, which the README
    already instructs, 404s right now. Publishing 0.2.0 creates the tag and fixes
    it. No action needed, but worth knowing before #81 merges.
  • @e2edev/playwright will land on latest once. npmjs auto-assigns latest
    on a package's first publish in addition to the requested tag — documented in
    changesets' own source at changesets-cli.cjs.js:805. The driver has never been
    published, so its first release gets latest regardless of --tag beta, and
    latest can only be moved afterwards, never removed. Recorded in both docs as a
    known one-time leak.

Prose correction

AGENTS.md and CONTRIBUTING.md both said pre mode is avoided because a prerelease
falls outside the driver's e2e peer range. True, but it understates the problem
by implying a wider range would rescue it. It cannot: node-semver only lets a
prerelease satisfy a comparator set when some comparator with the same
major.minor.patch also carries a prerelease. Checked, not assumed —
0.3.0-beta.0 satisfies >=0.1.0 <1, >=0.1.0-0 <1, and * all as false.
Both docs now record that so nobody retries the -0 trick.

Notes for review

  • No changeset. This is release configuration only; nothing in the shipped
    surface changes. Push back if you'd rather it be announced.
  • Docs-only prose beyond that, plus two JSON fields. pnpm lint is clean; the
    changesets config is validated by the changeset version run above.

Open in Devin Review