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: yarnpkg not found with collect latest info #32

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

mralaminahamed
Copy link
Contributor

@mralaminahamed mralaminahamed commented Apr 29, 2024

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:

  • Updated the installation instructions in the README file to ensure that users have the latest version of Yarn installed.
  • Added a check in the build script to verify the presence of yarnpkg and provide a helpful error message if it's not found.
  • Included a fallback option to install Yarn automatically if it's not present on the system.

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:

  • If users encounter any issues during the installation process or with the updated build script, they should consult the documentation or reach out to the support team for further assistance.
  • This fix ensures that the application can collect the latest information reliably, regardless of the user's system configuration or the presence of Yarn.

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

@ai
Copy link
Member

ai commented Apr 29, 2024

What is the output before and after PR?

@mralaminahamed
Copy link
Contributor Author

mralaminahamed commented Apr 29, 2024

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

@ai ai merged commit e39e2f8 into browserslist:main Apr 29, 2024
0 of 4 checks passed
@ai
Copy link
Member

ai commented Apr 29, 2024

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

@mralaminahamed
Copy link
Contributor Author

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
Copy link
Member

ai commented Apr 30, 2024

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
Copy link
Contributor Author

thanks

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.

npx update-browserslist-db@latest is broken due to yarnpkg: command not found
2 participants