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

Update browserlist DB for caniuse-lite #149

Closed
1 task done
peterwilsoncc opened this issue May 29, 2023 · 6 comments · Fixed by #150
Closed
1 task done

Update browserlist DB for caniuse-lite #149

peterwilsoncc opened this issue May 29, 2023 · 6 comments · Fixed by #150
Assignees
Labels
type:bug Something isn't working.
Milestone

Comments

@peterwilsoncc
Copy link
Contributor

Describe the bug

During an npm install an alert is shown that the caniuse browserlist database is out of date. It can be updated by running npx browserslist@latest --update-db.

This will help reduce redundant JS and CSS required to support unsupported browsers.

Steps to Reproduce

  1. Clone the repository
  2. Run npm i; npm run build
  3. During this process a warning will be shown:
    Browserslist: caniuse-lite is outdated. Please run:
    npx browserslist@latest --update-db
    Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
    

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@peterwilsoncc peterwilsoncc added the type:bug Something isn't working. label May 29, 2023
@punndcoder28
Copy link
Contributor

Hi @peterwilsoncc from my cursory understanding of the library and it's workings, shouldn't this be done locally? Or does it need to be updated in the project?

@peterwilsoncc
Copy link
Contributor Author

@punndcoder28 You run the command above locally to update the package-lock.json file to refer the latest database. You can see an equivalent PR on Distributor 10up/distributor#1059

@punndcoder28
Copy link
Contributor

Thanks for pointing out how it should be done. I ran the following commands as suggested in the issue description which results in the error mentioned here. I also do not want to run the install command with --legacy-peer-deps as it might lead to other dependency related issues with the project. Here are my npm and node versions

npm: 8.19.3
node: 19.2.0

Should I use any other version than the ones mentioned above?

@peterwilsoncc
Copy link
Contributor Author

It looks like the GitHub actions run using node 12 so maybe give that a try. The linked npm version appears to be around 6.14.16. If you haven't got a node version manager installed already then https://github.com/Schniz/fnm/ is great.

- name: install node v12
uses: actions/setup-node@v1
with:
node-version: 12

@punndcoder28
Copy link
Contributor

Ended up using nvm since it was already on my machine. Will be sending out a PR from my forked repo.

@punndcoder28
Copy link
Contributor

I have opened up PR #150 which should fix this issue.

@jeffpaul jeffpaul added this to the 1.3.3 milestone May 30, 2023
@jeffpaul jeffpaul moved this from Incoming to In Review in Open Source Practice May 30, 2023
@github-project-automation github-project-automation bot moved this from In Review to Merged in Open Source Practice Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants