Skip to content

Conversation

@LeoMcA
Copy link
Member

@LeoMcA LeoMcA commented Sep 26, 2025

Adds step to lint workflow to regenerate package-lock.json if it differs, to check unintended changes aren't included e.g. when changing deps with a dirty node_modules dir.

Draft while I test it works on github actions.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2025

732d906 was deployed to: https://fred-pr832.review.mdn.allizom.net/

Comment on lines +41 to +42
npm install
diff package-lock.json package-lock.json.branch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this correctly, then this assumes that running npm install results in the same package-lock.json. However, if a PR adds a dependency (with a subtree of transitive dependencies), then one simultaneous release of one of those transitive dependencies (while the PR is open) might cause this workflow to fail.

I also think this might fail if the PR branch is behind main, afaik github.base_ref points to the latest commit on main.

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