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

Adds detection for yarn, and '--no-yarn' to suppress detection #492

Merged
merged 4 commits into from
Oct 1, 2020

Conversation

rbuckton
Copy link
Member

This adds automatic detection of yarn based on the presence of either a yarn.lock or .yarnrc file in the current directory. Passing --yarn or --no-yarn disables automatic detection.

Fixes #480

Copy link
Contributor

@felipecrs felipecrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rbuckton
Copy link
Member Author

This might need to be updated if #458 goes in, as this currently only looks for yarn.lock and .yarnrc in the current directory, but if you're publishing an from a package subdirectory in a yarn workspace, neither of those two files will be present since the current directory is not the workspace root.

@rbuckton
Copy link
Member Author

Build is failing before it starts due to the node version used to run the build:

yarn install v1.22.5
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=10". Got "8.17.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

https://dev.azure.com/vscode/VSCE/_build/results?buildId=53730&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=f8ed7bd8-2a7f-56f6-9385-7fc29a8b5b7b&l=18

@rbuckton
Copy link
Member Author

@joaomoreno I bumped the node version in azure-pipelines.yml to get the build to pass. I can revert that if you still want to be sure it builds/tests on NodeJS 8, but I can't do much about husky 4.3.0 not supporting node 8.

Copy link
Member

@joaomoreno joaomoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Automatically enable --yarn if yarn.lock is found
3 participants