browserslist / update-db

CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
https://browsersl.ist/
MIT License
286 stars 57 forks source link

fix: yarnpkg not found with collect latest info #32

Closed mralaminahamed closed 2 months ago

mralaminahamed commented 2 months ago

This pull request addresses the issue where the yarnpkg command was not found when trying to collect the latest information. The issue was caused by a missing dependency or an outdated version of Yarn installed on the system.

Closes #27, #33

Changes:

How to Test:

  1. Follow the updated installation instructions in the README file to install the required dependencies, including Yarn.
  2. Run the build script or the command that was previously failing due to the missing yarnpkg command.
  3. Verify that the build process completes successfully and that the latest information is collected correctly.

Additional Notes:

Please review the changes and let me know if you have any questions or concerns.

ai commented 2 months ago

What is the output before and after PR?

mralaminahamed commented 2 months ago

before: descibed at issue #33 after: no error message.

ai commented 2 months ago

Add tests are falling after the PR. Can you fix them in another PR?

mralaminahamed commented 2 months ago

i will try to fix the tests failing issue in this pr. Would you please share me the documentation for writing test for this repo? It will be helpful for writing tests.

ai commented 2 months ago

You don't need to write new tests, just do not break the current one.

To run test do:

pnpm install
pnpm unit

For each test, we create a temporary dir. Copy some real projects there and run tool to update dependency. Then we check tool output and lock file.

mralaminahamed commented 2 months ago

thanks