Skip to content
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

fix: Use browserslist-config #379

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

arbrandes
Copy link
Contributor

@arbrandes arbrandes commented Dec 5, 2024

We were installing browserslist-config but not declaring it (as per the documentation and frontend-template-application). This had the effect that webpack - and likely others - were not using it.

For those curious, we discovered this by way of trying to get this to work: overhangio/tutor-indigo#109 (comment).

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e39533c) to head (b2cfff5).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #379   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          109       109           
  Lines         1086      1086           
  Branches       165       166    +1     
=========================================
  Hits          1086      1086           

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

We were installing browserslist-config but not declaring it.  This had
the effect that webpack - and likely others - were not using it.
Declaring `browserslist` in package.json exposed a bug in the
download.js tests that wasn't causing failures before (but arguably,
should): one can't use arrow functions to mock constructors because
calling `new` on them doesn't work.  See the NOTE under:

https://jestjs.io/docs/es6-class-mocks#-module-factory-function-must-return-a-function
Remove a file that was previously added by mistake.
@arbrandes arbrandes force-pushed the fix-browserslist-config branch from 365acda to b2cfff5 Compare December 6, 2024 13:42
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.

Great catch on the fix for the "is not a constructor" error!

:shipit:

@arbrandes arbrandes merged commit 0219f5c into openedx:master Dec 6, 2024
6 checks passed
@arbrandes arbrandes deleted the fix-browserslist-config branch December 6, 2024 13:55
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