Skip to content

Build dist for all npm dependency updates - #741

Merged
jeffwidman merged 1 commit into
mainfrom
rebuild-dist-for-all-npm-updates
Aug 10, 2026
Merged

Build dist for all npm dependency updates#741
jeffwidman merged 1 commit into
mainfrom
rebuild-dist-for-all-npm-updates

Conversation

@jeffwidman

Copy link
Copy Markdown
Member

Rebuild the checked-in action bundle for every npm Dependabot update, including indirect dependencies and development build tooling.

The existing workflow only runs for direct:production updates. That misses updates such as undici in #734, even though the transitive dependency is included in dist/index.js. Dependency classification is not a reliable proxy for bundle impact; development tooling such as esbuild can also change generated output.

The workflow now uses the build output as the selector:

  • Run for every npm_and_yarn Dependabot PR.
  • Stage the rebuilt dist/ directory.
  • Exit without a commit or push when dist/ is unchanged.
  • Commit and push only when the bundle actually changed.

The explicit staged-diff check also avoids suppressing genuine git commit errors with git commit ... || exit 0.

This matches the approach used by github/dependabot-action.

Validation:

  • Workflow YAML parses successfully.
  • A clean rebuild from main produces no staged change and takes the no-op path.
  • Rebuilding PR build(deps): bump undici from 6.27.0 to 6.28.1 #734 detects the expected dist/index.js change and takes the commit path.
  • npm run typecheck
  • npm run lint
  • git diff --check

@jeffwidman
jeffwidman requested a review from a team as a code owner August 10, 2026 18:49
@jeffwidman
jeffwidman merged commit 15c4930 into main Aug 10, 2026
9 checks passed
@jeffwidman
jeffwidman deleted the rebuild-dist-for-all-npm-updates branch August 10, 2026 19:05
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.

2 participants