Skip to content

Commit bea84cd

Browse files
KyleAMathewsTest
andauthored
ci: publish release candidates under latest (#2300)
Co-authored-by: Test <test@test.com>
1 parent 3937a73 commit bea84cd

7 files changed

Lines changed: 42 additions & 21 deletions

‎CONTRIBUTING.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ produces `1.0.0-rc.1.2`. A minor or major change advances the candidate number:
164164
`1.0.0-rc.1.2` becomes `1.0.0-rc.2`. Packages already on stable 1.x versions,
165165
including `@tanstack/query-db-collection` and
166166
`@tanstack/offline-transactions`, continue to use normal semantic versioning
167-
and publish under npm's `latest` tag.
167+
and publish under npm's `latest` tag. Release candidates also publish under
168+
`latest`, per the maintainer's 2026-10-29 decision. Existing versions are not
169+
republished to move a tag: use `npm dist-tag add <package>@<version> latest`.
170+
This preserves any existing `rc` alias.
168171

169172
## Pull requests
170173

‎docs/contributing/oracle-coverage.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Oracle coverage and closeout
22

3+
## RC npm tag policy, 2026-10-29
4+
5+
The maintainer directed RC versions to npm's `latest` tag on 2026-10-29.
6+
`CONTRIBUTING.md` records this policy. The release-history model and command/HTTP
7+
receivers now expect `latest` for candidate and stable uploads. Exact-version
8+
membership still decides whether an upload is needed; an existing version is
9+
never republished to move a tag. Existing `rc` aliases are preserved by the
10+
separate `npm dist-tag add <package>@<version> latest` operation.
11+
12+
Historical campaign records below retain the former `rc`-only authority and
13+
its P01 findings. They are not current tag-policy evidence. The existing
14+
histories, comparisons, reach declarations, and run budgets remain intact.
15+
The maintainer explicitly stopped local tests during this release. No RED,
16+
GREEN, or mutant campaign was run for this policy change; execution evidence
17+
is pending CI. The command/HTTP owners do not cover manual tag promotion,
18+
production npm credentials, or Actions authentication.
19+
320
## RC scope partition, 2026-10-29
421

522
The [deferred oracle record](oracle-reviews/2026-10-29-pr-2171-deferred-oracles.md)

‎scripts/publish-history-oracle.property.test.js‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Candidates must reach rc and stable versions must reach latest, independent
3-
* of registry history. CONTRIBUTING.md supplies this policy; stable minors are
4-
* the maintainer's deliberate policy. The shared model states the independent
2+
* Candidates and stable versions must reach latest, independent of registry
3+
* history (maintainer decision 2026-10-29, recorded in CONTRIBUTING.md).
4+
* Stable minors are the maintainer's deliberate policy. The shared model states the independent
55
* version/tag law. A registry ledger is controlled input, not a tag classifier.
66
*
77
* The receiver invokes production publishDuringRc with its default command.
@@ -150,7 +150,7 @@ test.each(['duplicate', 'omission', 'tag', 'version', 'registry', 'access'])(
150150
'release publish judgment rejects wrong %s observation',
151151
(fault) => {
152152
const expected = [
153-
{ name: packageNames.db, version: '1.0.0-rc.1.10', tag: 'rc' },
153+
{ name: packageNames.db, version: '1.0.0-rc.1.10', tag: 'latest' },
154154
]
155155
const correct = [
156156
{
@@ -168,7 +168,7 @@ test.each(['duplicate', 'omission', 'tag', 'version', 'registry', 'access'])(
168168
else
169169
wrong[0][fault] =
170170
fault === 'tag'
171-
? 'latest'
171+
? 'rc'
172172
: fault === 'version'
173173
? '1.0.0-rc.1.9'
174174
: fault === 'registry'

‎scripts/publish-http-oracle.property.test.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Candidate releases reach rc; stable releases reach latest exactly once.
3-
* Authority: CONTRIBUTING.md Changesets/Releases and the accepted RC policy.
2+
* Candidate and stable releases reach latest exactly once.
3+
* Authority: CONTRIBUTING.md Changesets/Releases, maintainer decision 2026-10-29.
44
* The existing release ledger supplies the independent version/tag judgment.
55
* This receiver crosses the real npm11/pnpm11/Changesets HTTP boundary, with
66
* the default production publish command and real package-manager archives.
@@ -9,8 +9,9 @@
99
* The bounded shared grammar retains the original metadata/failure histories
1010
* and varies exact-version presence independently of tags. Current candidates
1111
* can have only latest, no tags, or rc pointing to an older present version.
12-
* The exact wrong-tag aftermath keeps old rc alongside latest=current. A
13-
* separate stable-phase neighbor removes stable latest while versions remain.
12+
* A historical old-policy wrong-tag aftermath keeps old rc alongside
13+
* latest=current. A separate stable-phase neighbor removes stable latest
14+
* while versions remain.
1415
* Missing targets also have a no-tags neighbor. Two different candidate
1516
* versions vary which package is already current and reverse their assignment.
1617
* A later-candidate fault follows an actual successful candidate upload, in

‎scripts/publish-packages.mjs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ async function publishWithHiddenPackages(
5757
/**
5858
* Publish stable versions first, then candidates, grouped by exact version.
5959
* npm reads that exact version even when dist-tags are missing or stale.
60-
* Explicit upload tags are independent of the metadata selector.
60+
* Uploads use latest under the maintainer's RC policy (CONTRIBUTING.md),
61+
* independently of the exact-version metadata selector. Existing versions
62+
* are skipped; promoting their tags requires a separate npm dist-tag command.
6163
*/
6264
export async function publishDuringRc(
6365
rootDirectory = root,
@@ -91,7 +93,7 @@ export async function publishDuringRc(
9193
publicPackages.filter(
9294
({ packageJson }) => packageJson.version !== version,
9395
),
94-
{ version, tag: stableVersion.test(version) ? 'latest' : 'rc' },
96+
{ version, tag: 'latest' },
9597
publishCommand,
9698
)
9799
}

‎scripts/publish-packages.test.mjs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function packageState(root) {
4949
)
5050
}
5151

52-
test('RC publishing gives candidate and stable packages their own npm tags', async (t) => {
52+
test('RC publishing uses latest while isolating candidate and stable versions', async (t) => {
5353
const root = createWorkspace()
5454
t.after(() => rmSync(root, { recursive: true, force: true }))
5555
const before = packageState(root)
@@ -82,7 +82,7 @@ test('RC publishing gives candidate and stable packages their own npm tags', asy
8282
publicNames: ['@tanstack/db'],
8383
preMode: false,
8484
version: '1.0.0-rc.2',
85-
tag: 'rc',
85+
tag: 'latest',
8686
},
8787
])
8888
assert.deepEqual(packageState(root), before)
@@ -98,7 +98,8 @@ test('failed candidate publishing restores package manifests and prerelease stat
9898
await assert.rejects(
9999
publishDuringRc(root, (_, publication) => {
100100
phase++
101-
if (publication.tag === 'rc') throw new Error('publish failed')
101+
if (publication.version.startsWith('1.0.0-rc.'))
102+
throw new Error('publish failed')
102103
}),
103104
/publish failed/,
104105
)

‎scripts/release-history-oracle.js‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* Release laws come from CONTRIBUTING.md's Changesets and Releases sections:
33
* candidates start at 1.0.0-rc.1, patches extend the current candidate, and a
44
* minor or major starts the next candidate. Stable packages use ordinary semver
5-
* and latest; candidates use rc. Versioning consumes each changeset once.
5+
* and latest. Candidates also use latest (maintainer decision 2026-10-29,
6+
* recorded in CONTRIBUTING.md). Versioning consumes each changeset once.
67
* Exit promotes candidates to 1.0.0 and applies only still-pending work.
78
*
89
* This independent model uses numeric tuples and an authored changeset ledger.
@@ -318,11 +319,7 @@ export function expectedPublishes(manifests, registry) {
318319
.map((manifest) => ({
319320
name: manifest.name,
320321
version: manifest.version,
321-
tag:
322-
manifest.name === packageNames.db ||
323-
manifest.name === packageNames.react
324-
? 'rc'
325-
: 'latest',
322+
tag: 'latest',
326323
}))
327324
}
328325

0 commit comments

Comments
 (0)