Skip to content

Regenerate package-lock.json #622

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bradenmacdonald
Copy link
Contributor

Currently on master, there are some dependency conflicts shown when running npm install. I've regenerated package-lock.json from scratch here (without changing package.json) and it seems to have resolved the issue. However, it also bumped the version of many dependencies and made 16,000 changed lines in the package-lock file.

The warning this fixes:

npm warn ERESOLVE overriding peer dependency
npm warn While resolving: [email protected]
npm warn Found: [email protected]
npm warn node_modules/jest
npm warn   dev jest@"30.0.4" from the root project
npm warn
npm warn Could not resolve dependency:
npm warn peer jest@"^29.0.0" from [email protected]
npm warn node_modules/ts-jest
npm warn   peerOptional ts-jest@"27 || 28 || 29" from @formatjs/[email protected]
npm warn   node_modules/@formatjs/ts-transformer
npm warn   2 more (@openedx/frontend-build, @formatjs/ts-transformer)
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/jest
npm warn   peer jest@"^29.0.0" from [email protected]
npm warn   node_modules/ts-jest
npm warn     peerOptional ts-jest@"27 || 28 || 29" from @formatjs/[email protected]
npm warn     node_modules/@formatjs/ts-transformer
npm warn     2 more (@openedx/frontend-build, @formatjs/ts-transformer

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Jul 21, 2025
@openedx-webhooks
Copy link

Thanks for the pull request, @bradenmacdonald!

This repository is currently maintained by @openedx/committers-frontend.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.


Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@bradenmacdonald
Copy link
Contributor Author

OK, it seems that to resolve the dependency issues, npm is just installing ts-jest for frontend-build, but that then causes jest to fail when it tries to load ts-jest to run the test suite. That means that simply regenerating package-lock.json produces a worse result - a version whose tests cannot run.

npm ls ts-jest
@edx/[email protected]
└─┬ @openedx/[email protected]
  └── [email protected]
npm test

Validation Error:

  Module ts-jest in the transform option was not found.

It can be fixed by (1) regenerating package-lock.json and (2) adding "ts-jest": "^29.4.0" as an explicit dependency. But the latter feels like it shouldn't be necessary, because nothing in this project itself mentions ts-jest directly; only the imported frontend-build jest config does.

Copy link

codecov bot commented Jul 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.89%. Comparing base (4dfb1b3) to head (2fea9a6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #622      +/-   ##
==========================================
+ Coverage   72.56%   72.89%   +0.33%     
==========================================
  Files          49       49              
  Lines         492      498       +6     
  Branches      100      100              
==========================================
+ Hits          357      363       +6     
  Misses        132      132              
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bradenmacdonald
Copy link
Contributor Author

bradenmacdonald commented Jul 21, 2025

I haven't been able to test this in an actual MFE so I'm not sure if this introduces any issues or not; but the tests are passing, and it resolves the dependency conflict.

@brian-smith-tcril
Copy link
Contributor

It seems to me like the issue is actually stemming from frontend-build using jest 29 and frontend-platform using jest 30. I think if we update frontend-build to use jest 30 then update the frontend-build dependency here things will work again.

@mphilbrick211 mphilbrick211 moved this from Needs Triage to In Eng Review in Contributions Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U
Projects
Status: In Eng Review
Development

Successfully merging this pull request may close these issues.

3 participants