Repository navigation
Conversation
…bumps Dependabot runtime-dependency PRs fail "Verify dist is up to date" (e.g. #80, undici 6.28.0 -> 6.29.0: 453+/187- in dist/index.js). The bump changes the ncc bundle, but Dependabot only edits package.json and package-lock.json and cannot rebuild dist/, so every such PR needed a manual "rebuild dist" commit (#71) or merged red (#80). package.yml already rebuilds, attests and commits dist/ on main after merge, which is what fixed main after #80. For a PR opened by dependabot[bot] that changes only package.json and package-lock.json, drift is now a warning with a dist/ diff stat in the step summary. The rebuild itself must still succeed, so a bump that breaks the ncc build still fails. Any other PR, including a Dependabot PR someone has pushed src/ or dist/ changes to, fails on drift as before. Checkout fetches depth 2 so the step can diff the merge commit against its base. dist/ is deliberately not committed back on the PR's behalf: that needs a write token while `npm ci` runs the just-bumped package's install scripts. Checked the step's shell logic locally against seven cases (Dependabot manifests-only, lock-only, with src/, with dist/; human manifests-only and src/; no drift) and actionlint passes. Signed-off-by: yuriyryabikov <22548029+kurok@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.
Problem
Dependabot runtime-dependency PRs fail Verify dist is up to date, for example #80 (run), where the undici 6.28.0 → 6.29.0 bump changed
dist/index.jsby 453+/187−. The bump changes the ncc bundle, but Dependabot only editspackage.jsonandpackage-lock.jsonand can't rebuilddist/. So every such PR either needed a manual "rebuild dist" commit (#71) or was merged red (#80).package.ymlalready rebuilds, attests and commitsdist/onmainafter merge. That is what fixedmainafter #80 (77e809f Update dist). The failing check adds no protection for these PRs, it just has to be overridden.Change
verify-distinpr.yml:dependabot[bot], changes onlypackage.json/package-lock.jsondist/diff stat in the step summarysrc/ordist/changes tonpm ciandnpm run packagestill have to pass, so a bump that breaks the ncc build still fails the check.Not done, on purpose: committing
dist/back to the PR. That would need a write token in a job wherenpm ciruns install scripts from the package that was just bumped.Verification
actionlintpasses.src/dist/src/mainitself rebuilds with 0 drift after a freshnpm cion Node 24.This PR is authored by a human, so its own CI run only exercises the unchanged path. The Dependabot path runs on the next runtime bump.