Skip to content

feat: verify package-lock.json is UTD (up to date) & audited #4598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 43 commits into from
Aug 14, 2025

Conversation

mfranzke
Copy link
Collaborator

@mfranzke mfranzke commented Jul 22, 2025

Proposed changes

From time to time we experience out of date package-lock.json files. To prevent that those are resulting out of our local development (as they are unlikely based on dependabot updates), we should enforce that those are quickly checked in git push lifecycle phase.
Additionally running npm audit fix would ensure that some of the easy dependency fixes would get adapted directly.

Types of changes

  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improvements to existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Further comments

@mfranzke mfranzke self-assigned this Jul 22, 2025
@mfranzke mfranzke requested a review from nmerget as a code owner July 22, 2025 07:25
@mfranzke mfranzke added the 🍄🆙improvement New feature or request label Jul 22, 2025
@mfranzke mfranzke moved this to 👀 In review in UX Engineering Team Backlog Jul 22, 2025
@mfranzke mfranzke removed their assignment Jul 22, 2025
@mfranzke mfranzke enabled auto-merge (squash) July 22, 2025 07:45
@mfranzke mfranzke moved this from 👀 In review to 🏗 In development in UX Engineering Team Backlog Jul 28, 2025
@mfranzke mfranzke marked this pull request as draft July 28, 2025 04:49
auto-merge was automatically disabled July 28, 2025 04:49

Pull request was converted to draft

@mfranzke mfranzke moved this from 🏗 In development to 👀 In review in UX Engineering Team Backlog Aug 1, 2025
@mfranzke mfranzke marked this pull request as ready for review August 1, 2025 20:48
@mfranzke mfranzke enabled auto-merge (squash) August 1, 2025 20:49
@mfranzke mfranzke requested a review from Copilot August 2, 2025 01:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds verification to ensure package-lock.json files are up-to-date before pushing changes to prevent out-of-date lock files from being committed. The implementation adds both pre-push and pre-commit hooks to detect and handle package manager file changes.

  • Adds a pre-push hook that detects changes to package manager files and automatically runs install commands to verify lock files are current
  • Adds a lint-staged rule to run npm audit fix on package-lock.json changes during pre-commit
  • Supports both npm and pnpm package managers with automatic detection based on lock file presence

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.husky/pre-push New pre-push hook script that detects package manager files and runs install commands to verify lock files are up-to-date
.config/.lintstagedrc.js Adds npm audit fix rule for package-lock.json files during pre-commit

@mfranzke mfranzke changed the title feat: verify package-lock.json UTD (up to date) feat: verify package-lock.json UTD (up to date) & audited Aug 4, 2025
@mfranzke mfranzke changed the title feat: verify package-lock.json UTD (up to date) & audited feat: verify package-lock.json is UTD (up to date) & audited Aug 13, 2025
@mfranzke mfranzke merged commit 56ee510 into main Aug 14, 2025
54 checks passed
@mfranzke mfranzke deleted the feat-verify-package-lock-utd branch August 14, 2025 08:59
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in UX Engineering Team Backlog Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 cherryPick Code that we should adapt from one repository to another. 🛠️configuration 🍄🆙improvement New feature or request
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants