Skip to content

fix: remove unused jest-chain, babel-polyfill, axios-mock-adapter #603

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 2 commits into from
Jul 21, 2025

Conversation

bradenmacdonald
Copy link
Contributor

This repo has some unused dependencies.

Removing babel-polyfill is because (A) it's not needed, and (B) I'm trying to get rid of this warning seen when compiling any of our MFEs:

npm warn deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

@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.

@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 Jun 11, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Jun 11, 2025
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.56%. Comparing base (f47c1ed) to head (b5244ff).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #603      +/-   ##
==========================================
+ Coverage   68.75%   72.56%   +3.81%     
==========================================
  Files          48       49       +1     
  Lines         432      492      +60     
  Branches       97      100       +3     
==========================================
+ Hits          297      357      +60     
  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.

@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Jun 12, 2025
@bradenmacdonald bradenmacdonald removed the request for review from adamstankiewicz July 9, 2025 17:27
Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

LGTM!

Once the conflicts are resolved let's land this!

@bradenmacdonald
Copy link
Contributor Author

bradenmacdonald commented Jul 21, 2025

Conflicts resolved!

Unrelated to this PR, the latest master is currently showing some dependency conflicts when running npm install:

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

I think it came from #620 . It can be fixed by removing node_modules and package-lock.json and then running npm install to re-generate it, but that also bumps many other package minor versions. I'm not sure if there's a simpler way to fix it.

@bradenmacdonald bradenmacdonald merged commit 4dfb1b3 into master Jul 21, 2025
6 checks passed
@bradenmacdonald bradenmacdonald deleted the braden/simplify-dependencies branch July 21, 2025 17:38
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in Contributions Jul 21, 2025
@brian-smith-tcril
Copy link
Contributor

It can be fixed by removing node_modules and package-lock.json and then running npm install to re-generate it, but that also bumps many other package minor versions. I'm not sure if there's a simpler way to fix it.

I think regenerating the package lock is perfectly reasonable (and preferable to manually editing it). I've run into similar issues before and resolved them by doing just that. It seems to happen sometimes after relying on renovate to update the package lock for a while. If you want to make a "regenerate package lock" PR I'll gladly approve/merge it.

@bradenmacdonald
Copy link
Contributor Author

@brian-smith-tcril OK sure. I've done that here but I have had some issues so haven't been able to test it in an actual MFE: #622

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: Done
Development

Successfully merging this pull request may close these issues.

3 participants