Repository navigation
feat: never target a release younger than the repository's release-age policy - #101
Merged
Merged
Conversation
…e policy list, check, fix and the Action read npm min-release-age (.npmrc layers, days), pnpm minimumReleaseAge and minimumReleaseAgeExclude (pnpm-workspace.yaml, minutes) and Yarn npmMinimalAgeGate and npmPreapprovedPackages (.yarnrc.yml, durations). The registry configuration carries the policy, so both fetchers apply it: `latest` becomes the newest release old enough, and versions and manifests leave out younger ones, so companions and peers follow it too. Publish dates come from the full package document, fetched once per package and only when the abbreviated one says something changed inside the window. When the newest release is too young the output says why and what it targets; when nothing newer than the installed version qualifies the package is skipped with that reason (status skipped in uptide.run/v1). fix refuses an explicit target the policy refuses. uptide.yml gains min-release-age (days), used only when the repository sets no policy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
…nd plan - uptide.yml's field is minReleaseAgeDays: camelCase like the rest of the file, with the unit in the name since pnpm counts minutes. - When the repository sets no release-age policy, the default of the package manager version it pins applies, labelled in the reason: pnpm 11 and 12 (minimumReleaseAge 1440, pnpm/pnpm#11158) and Yarn 4.15+ (npmMinimalAgeGate 1d, yarnpkg/berry#7135). The version comes from packageManager, devEngines.packageManager or yarnPath; lockfiles cannot tell, and an unknown version gets no default. minReleaseAgeDays still applies next to a default. - The HTML list report shows the release-age section; plan reads uptide.yml (--config) so its targets follow minReleaseAgeDays too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lucas Braum <[email protected]>
Merged
lucasbraum
pushed a commit
that referenced
this pull request
Oct 13, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Minor Changes - [#108](#108) [`38dcd4b`](38dcd4b) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The Uptide Action now requires the Anthropic API key. Without `anthropic-api-key` (or with it empty), in any mode, it stops before doing anything: the job summary says to add the repository secret `ANTHROPIC_API_KEY` (Settings → Secrets and variables → Actions), the run report has no upgrades and an error starting with `LLM_KEY_MISSING`, and the job fails. `uptide.run/v1` gains `llmKey` (`present` or `missing`; never the key). `uptide init` no longer writes `llm.enabled`, and refuses an existing `uptide.yml` that sets it to `false`, which the Action rejects. The CLI on your own machine still runs without a key. - [#101](#101) [`8452329`](8452329) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `list`, `check`, `fix`, `plan` and the Action never target a release younger than the repository's release-age policy: npm `min-release-age` (`.npmrc`), pnpm `minimumReleaseAge` with `minimumReleaseAgeExclude` (`pnpm-workspace.yaml`), or Yarn `npmMinimalAgeGate` with `npmPreapprovedPackages` (`.yarnrc.yml`). When none is set, the default of the pinned package manager version applies (pnpm 11 and 12, Yarn 4.15 and later: one day), labelled as such. When the newest release is too young, the newest one old enough is the target and the output says why (`4.6.7 is 2 days old; your policy is 7 days (min-release-age in .npmrc); targeting 4.6.5`). When nothing newer than the installed version qualifies, the package is skipped with that reason, shown as `status: skipped` in `uptide.run/v1` and in the HTML list report. Companions and peers follow the same policy. `minReleaseAgeDays` in `uptide.yml` applies when the repository sets no policy itself. See `docs/config.md#release-age`. ### Patch Changes - [#107](#107) [`008f84a`](008f84a) Thanks [@lucasbraum](https://github.com/lucasbraum)! - The Action's commits are authored by the Uptide App's own bot account, `<app slug>[bot] <<bot user id>+<app slug>[bot]@users.noreply.github.com>`, resolved with the installation token, so GitHub links them to the App. When it cannot be resolved they keep `uptide[bot] <[email protected]>` and the job log warns. - [#107](#107) [`008f84a`](008f84a) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide.run/v1` gains `verification.baselineHealth`: the repository before the upgrade in counts only (type errors, failing test runs, and missing-module errors under its own paths and in packages), so the dashboard can tell a run that could only compare from one that proved. No module or alias name leaves the fix report. Optional; absent in older reports. - [#107](#107) [`008f84a`](008f84a) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `check` analyzes a package's companions at the versions its upgrade moves them to, even when nothing imports them or they only carry types: `check react` in a Next app used to report `react-dom` and `@types/react` on their own at their installed versions, while `react` moved to 19. They are now members of `react`'s group, linked into the compile at 19, and the Action's job summary shows each one moving with `react`. - [#102](#102) [`78f1f7a`](78f1f7a) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `uptide init` writes a workflow that runs the released Uptide Action, `uptide-dev/uptide@2045c7d # v0.9.0`, and no longer notes that the action is not released yet. - [#100](#100) [`53f9f7d`](53f9f7d) Thanks [@lucasbraum](https://github.com/lucasbraum)! - `fix` reads pnpm lockfiles that install a package once per version of the upgraded one (`x@1([email protected])` next to `x@1([email protected])`) instead of failing with "Map keys must be unique". Variants that differ only by that version are compared as one entry; variants that differ in anything else are still checked one by one. - [#107](#107) [`008f84a`](008f84a) Thanks [@lucasbraum](https://github.com/lucasbraum)! - When Uptide refuses to publish a migration that did not verify, it words the reason as the run's verdict does: `1 type error introduced by the upgrade, 2 pre-existing` instead of `1 new type error`, and a test run that was already failing before the upgrade is named as such instead of as a failure of the migration. - [#104](#104) [`8fd120e`](8fd120e) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Reports no longer show a breaking count of 0 for a package without a migration pack: the terminal, the HTML report and the Action's job summary say `not analyzed: no pack yet` instead, and `uptide.run/v1` gains `analysis` (`pack` or `none`, absent when nothing was analyzed). A companion that `check` reports at its installed version (`react-dom` or `@types/react` with `react`) shows the versions it moves to and `moves with react`, carried as `movesWith`, instead of `up to date`; no upgrade kind is printed when nothing moves. The job summary lists breaking sites per package by path and line, and has no breaking-sites section when there are none. The generated workflow runs on `ubuntu-24.04` instead of `ubuntu-latest`. - [#107](#107) [`008f84a`](008f84a) Thanks [@lucasbraum](https://github.com/lucasbraum)! - Reports say what the upgrade broke and what the migration left. `uptide.run/v1` gains `verification.typecheck.afterUpgrade`, the type errors right after the version bump and before any fix, next to `before` and `after` (optional; absent in older reports). The job summary prints `types 0 → 4 with the upgrade → 0 after Uptide`, and the pull request body and the terminal say `the upgrade broke 4 · Uptide left 0`. Co-authored-by: uptide-release[bot] <338861287+uptide-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes UPT-7.
What
list,check,fix,planand the Action never pick a target version younger than the repository's release-age policy.min-release-agein.npmrc(env > project > user > global)minimumReleaseAgeinpnpm-workspace.yamlminimumReleaseAgeExclude(names,@org/*,[email protected] || 1.2.4)npmMinimalAgeGatein.yarnrc.yml3d,1w), bare number = minutesnpmPreapprovedPackagesI checked the key names and units against the npm config docs, pnpm's dependency-resolution settings and Yarn's
plugin-npmsource (DurationUnit.MINUTES).loadRegistryConfigattaches the policy, and both fetchers (npm and discovery) apply it.resolve(name, 'latest')returns the newest release old enough, never a prerelease in place of a stable release.versionsandmanifestsleave out younger releases, so companions and re-resolved peers follow the policy too.modifiedfalls inside the window. Packages with no recent change cost no extra request. Nothing is fetched per version.4.6.7 is 2 days old; your policy is 7 days (min-release-age in .npmrc); targeting 4.6.5.listshows this under a RELEASE AGE section, in both the terminal and the HTML report, and the JSON has a newreleaseAgefield.checkprints the line under its table and labels the targetrelease-age policy.fixprints it in the summary and addstargetSource: release-age policy.checkthis isskipReason: RELEASE_AGE, which is not a failure and does not change the exit code. Inuptide.run/v1it isstatus: skippedwith the reason.fix pkg@xwith a version the policy refuses stops before any work and names the newest release old enough. When nothing is old enough,fixnever falls back to the pack's tested target.your policy is 1 day (pnpm 11 default)). An explicit0turns it off.minimumReleaseAge1440 minutes, together with anyminimumReleaseAgeExclude. Sources: the v11.0.0 release notes (pnpm#11158),config/reader/src/index.ts#L175at v11.0.0 ('minimum-release-age': 24 * 60), and the v12.11.2 settings reference ("Default: 1440 (since v11)").minimumReleaseAgeStrict: false): pnpm falls back to a younger release rather than fail. Here it keeps Uptide on the release pnpm prefers; it doesn't prevent an install failure.npmMinimalAgeGate1d, together with anynpmPreapprovedPackages. Sources: yarnpkg/berry#7135 (commitb11eb6d,plugin-npm/sources/index.ts), listed in the 4.15.0 release and absent from 4.14.1. Upgrading Yarn writes the old value into existing projects'.yarnrc.yml, and Uptide reads that as an explicit setting.packageManager, fromdevEngines.packageManagerwhen its range stays inside one of those rows, or from Yarn'syarnPath.lockfileVersion: '9.0', and every Yarn 4 writes__metadata.version: 8.>=10), or a version not verified (pnpm 13, Yarn 5) gets no default.uptide.yml: a new optionalminReleaseAgeDaysfield. It's camelCase like the other fields, and the unit is in the name because pnpm counts minutes.UPTIDE_MIN_RELEASE_AGE_DAYS, so--config, the Action andplan(which now takes--config) are covered.docs/config.md#release-age,SECURITY.md(Release age) anddocs/privacy.md(the extra registry request). They include thenpx uptide@latestnote from the issue.Decisions to review
before, Yarn per-scopenpmScopes.*.npmMinimalAgeGateand pnpm settings in.npmrcare not read. pnpm 11 reads only auth and registry settings from.npmrc.checkand the fix workers now load the registry config from the repository (--cwd) instead of the process cwd. This also fixes private registries when--cwdpoints elsewhere.Tests
fixtures/repos/release-age/{npm,pnpm,yarn,pnpm-11-default,yarn-default,none}are synthetic.fetch/release-age.test.ts(17 tests) covers each manager's units, the built-in defaults (pinned throughpackageManager,devEnginesandyarnPath, with every no-default case including explicit0and unknown versions), npm layer precedence, the fallback, the exclude lists, the npm and discovery fetchers including the no-full-document fast path,listend to end,resolveTargetand the run report.action/run.test.tshas one more test for the skipped rows, andhtml/list.test.tsone for the HTML and terminal sections.pnpm test,pnpm lint,pnpm typecheck,pnpm docs:linksandpnpm public:checkall pass.🤖 Generated with Claude Code