Skip to content

Commit

Permalink
Improves the output of "yarn config" (#5713)
Browse files Browse the repository at this point in the history
**What's the problem this PR addresses?**

It's a little difficult to ask people to check specific values of their
configuration at the moment. They need to run `yarn config get <name>`
to see the value, or `yarn config --why | grep <name>`, but that isn't
very visible.

**How did you fix it?**

It's a bit of an experiment to try to change the output from:

<img width="1383" alt="image"
src="https://github.com/yarnpkg/berry/assets/1037931/9bf659e3-52e8-44ff-bb0a-e626c4235a68">

To the new tree display:

<img width="952" alt="image"
src="https://github.com/yarnpkg/berry/assets/1037931/3d8ef4d7-751d-4d1e-abc9-8757c3ae564a">

To offset the lack of compaction, the command now also accepts a list of
setting names on the command line, so you can write the following:

```
yarn config nodeLinker
```

Or even multiple parameters:

```
yarn config supportedArchitectures enableGlobalCache
```

<img width="831" alt="image"
src="https://github.com/yarnpkg/berry/assets/1037931/eec9490c-6e14-4c1b-a3b6-dfb858890298">

**Checklist**
<!--- Don't worry if you miss something, chores are automatically
tested. -->
<!--- This checklist exists to help you remember doing the chores when
you submit a PR. -->
<!--- Put an `x` in all the boxes that apply. -->
- [x] I have read the [Contributing
Guide](https://yarnpkg.com/advanced/contributing).

<!-- See
https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released
for more details. -->
<!-- Check with `yarn version check` and fix with `yarn version check
-i` -->
- [x] I have set the packages that need to be released for my changes to
be effective.

<!-- The "Testing chores" workflow validates that your PR follows our
guidelines. -->
<!-- If it doesn't pass, click on it to see details as to what your PR
might be missing. -->
- [x] I will check that all automated PR checks pass before the PR gets
reviewed.
  • Loading branch information
arcanis authored Sep 28, 2023
1 parent 4a6f932 commit 48327b2
Show file tree
Hide file tree
Showing 12 changed files with 533 additions and 466 deletions.
34 changes: 34 additions & 0 deletions .yarn/versions/b9bd2984.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
releases:
"@yarnpkg/cli": major
"@yarnpkg/core": major
"@yarnpkg/plugin-essentials": major
"@yarnpkg/plugin-nm": patch

declined:
- "@yarnpkg/plugin-compat"
- "@yarnpkg/plugin-constraints"
- "@yarnpkg/plugin-dlx"
- "@yarnpkg/plugin-exec"
- "@yarnpkg/plugin-file"
- "@yarnpkg/plugin-git"
- "@yarnpkg/plugin-github"
- "@yarnpkg/plugin-http"
- "@yarnpkg/plugin-init"
- "@yarnpkg/plugin-interactive-tools"
- "@yarnpkg/plugin-link"
- "@yarnpkg/plugin-npm"
- "@yarnpkg/plugin-npm-cli"
- "@yarnpkg/plugin-pack"
- "@yarnpkg/plugin-patch"
- "@yarnpkg/plugin-pnp"
- "@yarnpkg/plugin-pnpm"
- "@yarnpkg/plugin-stage"
- "@yarnpkg/plugin-typescript"
- "@yarnpkg/plugin-version"
- "@yarnpkg/plugin-workspace-tools"
- "@yarnpkg/builder"
- "@yarnpkg/doctor"
- "@yarnpkg/extensions"
- "@yarnpkg/nm"
- "@yarnpkg/pnpify"
- "@yarnpkg/sdks"

This file was deleted.

Loading

0 comments on commit 48327b2

Please sign in to comment.