Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix 'TypeError: _browserslist.findConfigFile is not a function' #1346

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
nifgraup wants to merge 2 commits into testing-library:main
base: main
Choose a base branch
Loading
from nifgraup:fix-browserslist-type-error

Conversation

Copy link

@nifgraup nifgraup commented Jan 15, 2025

What:

I remove browserslist override which was causing errors on: npm run setup -s

Why:

Have to build.

How:

removed pin in package.json

Checklist:

  • N/A [ ] Documentation added to the
    docs site
  • N/A [ ] Tests
  • N/A [ ] TypeScript definitions updated
  • [ x] Ready to be merged

upupming reacted with thumbs up emoji
Copy link

codesandbox-ci bot commented Jan 15, 2025
edited
Loading

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 31b37f4:

Sandbox Source
react-testing-library-examples Configuration

Copy link
Member

eps1lon commented Jan 15, 2025

Have you checked why we added this? It used to ensure we always target the same syntax level. Changing it randomly on publish is unsafe since we might produce syntax that's only valid for newer Node.js/Browser versions i.e. a breaking change.

Copy link
Author

nifgraup commented Jan 15, 2025
edited
Loading

It was originally added in #1169 to avoid parsing error by Acorn < 7.3.0 (the Acorn JS parser is used by Webpack). Since then Node.js 12 has been dropped #1207 which similarly does not support Nullish coalescing like Acorn < 7.3.0.

I myself do similar thing as the reporter in #1169, use webpack to bundle the tests and run them in a browser. That webpack configuration sets the target of browsers to run the tests in.

Is webpack 4 (Acorn 6) within the support matrix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /