Skip to content

Renovate: honor pnpm's minimum-release-age and flag bundle-affecting deps#46

Merged
fengmk2 merged 2 commits into
mainfrom
renovate-minimum-release-age
Jul 1, 2026
Merged

Renovate: honor pnpm's minimum-release-age and flag bundle-affecting deps#46
fengmk2 merged 2 commits into
mainfrom
renovate-minimum-release-age

Conversation

@fengmk2

@fengmk2 fengmk2 commented Jul 1, 2026

Copy link
Copy Markdown
Member

Two Renovate config hardenings (same file).

1. Wait out pnpm's minimum-release-age cooldown

Renovate PRs like #40 fail CI at pnpm install --frozen-lockfile:

[ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION] wrangler@4.106.0 was published ... within the minimumReleaseAge cutoff

pnpm 11 enforces a 1-day supply-chain cooldown, but Renovate (config:recommended) proposes bumps the same day a version publishes, so the lockfile entry is too new and the PR is dead on arrival.

  • minimumReleaseAge: "3 days" , clears pnpm's 1-day floor with margin.
  • internalChecksFilter: "strict" , holds a too-new update instead of opening a red PR.

2. Flag deps compiled into the committed bundle

.github/actions/publish-preview/dist is a committed artifact an external repo consumes by ref, so it must stay fresh. Only nanotar (bundled) and esbuild (the bundler) stale it. Renovate can't rebuild it here (Mend-hosted, no push token), so a packageRule adds a needs-bundle-rebuild label + a PR note telling the author to run pnpm build:action and commit the dist. CI's "Verify action bundle" check stays the backstop for anything else.

Config-only; no lockfile touched, so this PR's own CI is unaffected.

@fengmk2 fengmk2 changed the title Renovate: wait out pnpm's minimum-release-age cooldown Renovate: honor pnpm's minimum-release-age and flag bundle-affecting deps Jul 1, 2026
fengmk2 added a commit that referenced this pull request Jul 1, 2026
Completes the bundle-freshness automation. Pairs with the
`needs-bundle-rebuild` label (created) and the Renovate rule in #46.

## Flow

1. Renovate bumps a bundled dep (`nanotar`/`esbuild`) → adds the
`needs-bundle-rebuild` label (#46's rule).
2. This workflow fires on `pull_request: labeled`, guarded to that
label, rebuilds via `pnpm build:action`, and pushes the refreshed
`.github/actions/publish-preview/dist` if it changed.
3. "Verify action bundle" re-runs on the pushed commit and passes.

## App token

A push made with the default `GITHUB_TOKEN` does not re-trigger a PR's
required checks (GitHub loop prevention). So it mints a GitHub App token
first and checks out / pushes with it, matching the org convention
(`actions/create-github-app-token`, `client-id: APP_ID` / `private-key:
APP_PRIVATE_KEY`, same as vite-plus's `update-node-release-keys.yml`).

Needs the `APP_ID` and `APP_PRIVATE_KEY` secrets available to this repo
(org-level, or granted). The App needs `contents: write` on the repo.

Same-repo PRs only (fork branches can't be pushed to; Renovate is
same-repo).
fengmk2 added 2 commits July 1, 2026 15:53
pnpm 11 enforces a 1-day supply-chain minimum-release-age on
`pnpm install --frozen-lockfile`, but Renovate (config:recommended) proposes
updates the day a version is published, so the too-new lockfile entry fails CI
with ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION (e.g. #40 bumping wrangler).

Set minimumReleaseAge to 3 days (clears the 1-day floor with margin) with
internalChecksFilter=strict, so Renovate holds an update until it has aged past
the cooldown instead of opening a PR that can only fail.
nanotar (bundled) and esbuild (the bundler) compile into the committed
publish-action bundle, which an external repo consumes by ref. Renovate can't
rebuild it here (Mend-hosted, no push token), so label + PR-note bumps to those
two so the dist is rebuilt (`pnpm build:action`) before merge. The CI
"Verify action bundle" check remains the backstop for any missed dep.
@fengmk2 fengmk2 force-pushed the renovate-minimum-release-age branch from e1deceb to c4c19d1 Compare July 1, 2026 07:54
@fengmk2 fengmk2 added needs-bundle-rebuild Dep compiled into the publish-action bundle; run pnpm build:action and commit the dist and removed needs-bundle-rebuild Dep compiled into the publish-action bundle; run pnpm build:action and commit the dist labels Jul 1, 2026
@fengmk2 fengmk2 merged commit 3000469 into main Jul 1, 2026
4 checks passed
@fengmk2 fengmk2 deleted the renovate-minimum-release-age branch July 1, 2026 08:04
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