mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-22 00:05:15 +00:00
* chore(release): verify releases on isolated release branches and harden shipping High-traffic merges on main cancel more than half of main CI runs, so waiting on main CI repeatedly stalls releases. Releases also ran duplicate post-tag CI, lacked a release-branch Desktop Packages trigger, hit unretried Apple notarytool polling errors and a finalize-rollout directory bug on macOS retries, and relied on a non-idempotent npm publish chain and conflict-prone reconcile cherry-picks. This splits release execution into release:prep:* (reversible version commit without tagging, pushed once to release/** for isolated CI + Desktop Packages) and release:ship[:beta] (idempotent npm publishing with retry, propagation checks, automatic beta dist-tag sync on stable, and release/*-only tag push), adds conflict-free main reconciliation, and extends macOS xcrun retries to notarytool submit and wait. * fix(release): address review findings on Docker retries, tag push, and reconciliation Isolate manual Docker publish dispatches in their own non-cancelling concurrency group, verify HEAD matches origin/<release-branch> before release:ship publishes or tags (and remove one-shot combined scripts that bypassed release-branch checks), drop --refs from peeled annotated-tag lookups in push-current-release-tag.mjs, retry lockfile sync in reconcile-release.mjs when package-lock.json version lags package.json, and document cutting from pre-existing tags. * fix(release): preserve TTY OTP prompts in npm publish and keep newer beta changelogs Inherit TTY stdin/stdout for interactive npm publish and dist-tag add (plus --otp passthrough) while keeping stderr piped for retry classification, and keep newer beta or promoted stable changelog entries intact when an older beta tag is reconciled.
66 lines
2.1 KiB
JavaScript
66 lines
2.1 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
import {
|
|
compareReleaseVersions,
|
|
computeNextReleaseVersion,
|
|
getReleaseInfoFromSourceTag,
|
|
parseReleaseVersion,
|
|
} from "./release-version-utils.mjs";
|
|
|
|
test("computes the next beta patch from a stable version", () => {
|
|
assert.equal(computeNextReleaseVersion("0.1.59", "beta-patch"), "0.1.60-beta.1");
|
|
});
|
|
|
|
test("advances beta versions", () => {
|
|
assert.equal(computeNextReleaseVersion("0.1.60-beta.1", "beta-next"), "0.1.60-beta.2");
|
|
});
|
|
|
|
test("promotes beta versions to stable", () => {
|
|
assert.equal(computeNextReleaseVersion("0.1.60-beta.2", "promote"), "0.1.60");
|
|
});
|
|
|
|
test("parses beta release metadata", () => {
|
|
assert.deepEqual(parseReleaseVersion("0.1.60-beta.1"), {
|
|
version: "0.1.60-beta.1",
|
|
major: 0,
|
|
minor: 1,
|
|
patch: 60,
|
|
prerelease: "beta.1",
|
|
baseVersion: "0.1.60",
|
|
isPrerelease: true,
|
|
isBeta: true,
|
|
betaNumber: 1,
|
|
});
|
|
});
|
|
|
|
test("emits beta release info from tags", () => {
|
|
assert.deepEqual(getReleaseInfoFromSourceTag("v0.1.60-beta.1"), {
|
|
sourceTag: "v0.1.60-beta.1",
|
|
releaseTag: "v0.1.60-beta.1",
|
|
version: "0.1.60-beta.1",
|
|
baseVersion: "0.1.60",
|
|
prerelease: "beta.1",
|
|
isPrerelease: true,
|
|
isBeta: true,
|
|
betaNumber: 1,
|
|
releaseType: "prerelease",
|
|
releaseChannel: "beta",
|
|
isSmokeTag: false,
|
|
});
|
|
});
|
|
|
|
test("rejects non-beta prerelease versions", () => {
|
|
assert.throws(() => parseReleaseVersion("0.1.60-canary.1"), /Expected beta prerelease versions/);
|
|
});
|
|
|
|
test("compares stable and beta release versions in semver order", () => {
|
|
assert.equal(compareReleaseVersions("0.17.0-beta.1", "0.16.2"), 1);
|
|
assert.equal(compareReleaseVersions("0.17.0-beta.2", "0.17.0-beta.1"), 1);
|
|
assert.equal(compareReleaseVersions("0.17.0", "0.17.0-beta.2"), 1);
|
|
assert.equal(compareReleaseVersions("0.17.0-beta.2", "0.17.0"), -1);
|
|
assert.equal(compareReleaseVersions("0.16.3", "0.17.0-beta.1"), -1);
|
|
assert.equal(compareReleaseVersions("0.16.3", "0.16.2"), 1);
|
|
assert.equal(compareReleaseVersions("0.17.0", "0.17.0"), 0);
|
|
assert.equal(compareReleaseVersions("0.17.0-beta.2", "0.17.0-beta.2"), 0);
|
|
});
|