Skip to content

Conversation

@jonathanKingston
Copy link
Contributor

Asana Task/Github Issue:

Description

Adds a dedicated script (scripts/check-lockfile.mjs) to validate that package.json files (root and all workspaces) are in sync with package-lock.json. This script is integrated into the lint command and added as an early step in various CI workflows to catch lockfile drift proactively and provide clear error messages, preventing silent lockfile rewrites by npm install.

Testing Steps

  • Run npm run check-lockfile (should pass).
  • Run npm run lint (should pass, including the lockfile check).
  • To verify failure:
    1. Manually edit a dependency version in package.json (e.g., package.json or injected/package.json).
    2. Run npm run check-lockfile and confirm it fails with a descriptive error.
    3. Revert the change or run npm install to fix.

Checklist

Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Open in Cursor Open in Web

This commit introduces a new script to verify that package-lock.json is in sync with package.json. This check is now integrated into various CI workflows and the linting process to prevent lockfile drift.

Co-authored-by: jkingston <jkingston@duckduckgo.com>
@cursor
Copy link

cursor bot commented Dec 18, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@netlify
Copy link

netlify bot commented Dec 18, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit fd215bb
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/6943d991adc4e600085c3336
😎 Deploy Preview https://deploy-preview-2120--content-scope-scripts.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 18, 2025

[Beta] Generated file diff

Time updated: Thu, 18 Dec 2025 10:39:13 GMT

cursoragent and others added 2 commits December 18, 2025 10:27
The lockfile check is now optional and can be skipped using an environment variable. This allows for more flexibility in CI workflows.

Co-authored-by: jkingston <jkingston@duckduckgo.com>
Co-authored-by: jkingston <jkingston@duckduckgo.com>
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