update-db
update-db copied to clipboard
Follow the prompts to execute npxupdate-browserslist-db@latest Afterwards, all packages in the project package.json file were released with automatic upgrades. Why is this?
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
postcss-px-media-pc: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
postcss-px-to-viewport: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
pre-commit hook failed (add --no-verify to bypass)
➜ msfe-pangu git:(feature/fixed-quality-check-record) ✗ npx update-browserslist-db@latest
Latest version: 1.0.30001620
Updating caniuse-lite version
$ pnpm up caniuse-lite
caniuse-lite has been successfully updated
No target browser changes
Follow the prompts to execute npxupdate-browserslist-db@latest Afterwards, all packages in the project package.json file were released with automatic upgrades. Why is this?
I don’t know. We are just calling pnpm up caniuse-lite, which should update only caniuse-lite. Maybe pnpm does something more?
@ai use pnpm up caniuse-lite --no-save
@ai I second @mdogadailo ! Use --no-save in the script with pnpm.
the browserslist script has crazy unexpected and unwanted side effects that causes headaches and wasted hours because it updates deps far outside the scope of caniuse-lite / browserslist when used in projects with pnpm.
The answer is "yes" pnpm does something more unless you use this option :)
@firxworx @mdogadailo we can add --no-save to the script. But what it does and how it fixes it? There is --no-save in pnpm update --help and why pnpm up -r caniuse-lite (don forget about -r) update other dependencies for some users?
@firxworx @mdogadailo we can add
--no-saveto the script. But what it does and how it fixes it? There is--no-saveinpnpm update --helpand whypnpm up -r caniuse-lite(don forget about-r) update other dependencies for some users?
Hi @ai check here as it is in the online version of the docs: https://pnpm.io/cli/update#--no-save
It tells pnpm to not bump any version ranges in package.json.
As for the -r flag that is recursive option and typically applies to pnpm workspaces (monorepo):
- https://pnpm.io/cli/update#--recursive--r
- https://pnpm.io/workspaces
If you want to detect if pnpm believes it is in a workspace/monorepo configuration or not I don't think there's a single clean command. A popular approach is looking for presence of pnpm-workspace.yaml file however pnpm can also read workspaces in package.json, etc. I think the following should be robust:
pnpm list -r --depth=-1
There will only be one line of output if pnpm is not a workspace / monorepo.
In a workspace / monorepo there will be multiple lines of output, one for each app/package/etc. detected.
If you want to try it out to confirm and debug the pnpm docs list popular open source projects that use pnpm workspaces feature. You could try cloning them and running pnpm commands to see:
https://pnpm.io/next/workspaces#usage-examples
I hope this helps answer your questions
Done https://github.com/browserslist/update-db/commit/f4a47a7df073b86b24881a9f2369b0655f9b5229