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

Automatically enable --yarn if yarn.lock is found #480

Closed
felipecrs opened this issue Aug 27, 2020 · 6 comments · Fixed by #492
Closed

Automatically enable --yarn if yarn.lock is found #480

felipecrs opened this issue Aug 27, 2020 · 6 comments · Fixed by #492
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities

Comments

@felipecrs
Copy link
Contributor

How about that guys?

@joaomoreno joaomoreno self-assigned this Aug 31, 2020
@joaomoreno joaomoreno added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality labels Aug 31, 2020
@rbuckton
Copy link
Member

It could also detect the presence of a .yarnrc file.

Or, as an alternative, support adding a way to add project-local configuration that vsce could pick up and would allow you to specify defaults for --yarn (as well as --baseContentUrl, --baseImagesUrl, and a few others). Something like one of the following:

  • An entry in package.json (since that's used for other settings related to the extension)
  • A .vscerc or other configuration file.

@felipecrs
Copy link
Contributor Author

felipecrs commented Sep 24, 2020

It could also detect the presence of a .yarnrc file.

Nice catch, you're right.

Yes, that would be very useful, but I believe it deserves its own Issue. To do that, I strongly recommend cosmiconfig. :-)

@rbuckton
Copy link
Member

I created a PR for this since I'd also find it useful.

@rbuckton
Copy link
Member

Another detection method might be the presence of a "workspaces" key in package.json, since that is generally indicative of a project using yarn workspaces.

@felipecrs
Copy link
Contributor Author

Another detection method might be the presence of a "workspaces" key in package.json, since that is generally indicative of a project using yarn workspaces.

It seems that npm v7+ is going to support Yarn workspaces, so I think it's not a good idea to use as detection criteria.

@felipecrs
Copy link
Contributor Author

felipecrs commented Oct 1, 2020

@joaomoreno are you planning to release this anytime soon?

felipecrs added a commit to felipecrs/semantic-release-vsce that referenced this issue Jan 18, 2022
As `vsce` now supports configuration through the `package.json` file
(see microsoft/vscode-vsce#548), this option
was dropped to simplify the codebase. One should either rely on the
`vsce` automatically detecting when to use `yarn` (see
microsoft/vscode-vsce#480), or add the
following to `package.json`:

```json
{
    "vsce": {
        "yarn": true
    }
}
```
felipecrs added a commit to felipecrs/semantic-release-vsce that referenced this issue Jan 18, 2022
As `vsce` now supports configuration through the `package.json` file
(see microsoft/vscode-vsce#548), this option
was dropped to simplify the codebase. One should either rely on the
`vsce` automatically detecting when to use `yarn` (see
microsoft/vscode-vsce#480), or add the
following to `package.json`:

```json
{
    "vsce": {
        "yarn": true
    }
}
```
felipecrs added a commit to felipecrs/semantic-release-vsce that referenced this issue Jan 18, 2022
As `vsce` now supports configuration through the `package.json` file
(see microsoft/vscode-vsce#548), this option
was dropped to simplify the codebase. One should either rely on the
`vsce` automatically detecting when to use `yarn` (see
microsoft/vscode-vsce#480), or add the
following to `package.json`:

```json
{
    "vsce": {
        "yarn": true
    }
}
```
felipecrs added a commit to felipecrs/semantic-release-vsce that referenced this issue Jan 18, 2022
As `vsce` now supports configuration through the `package.json` file
(see microsoft/vscode-vsce#548), this option
was dropped to simplify the codebase. One should either rely on the
`vsce` automatically detecting when to use `yarn` (see
microsoft/vscode-vsce#480), or add the
following to `package.json`:

```json
{
    "vsce": {
        "yarn": true
    }
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants