Skip to content

Commit b553533

Browse files
pudovmaximarcanis
andauthored
fix(plugin-essentials): fix hash validation pattern of explain peer-requirements (#6881)
## What's the problem this PR addresses? This fix of issue described here #6880 ## How did you fix it? Fix validation of hash at `explain peer-requirements` command ## 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. --------- Co-authored-by: Maël Nison <[email protected]>
1 parent 8ee54a2 commit b553533

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.yarn/versions/d432d26e.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
releases:
2+
"@yarnpkg/cli": patch
3+
"@yarnpkg/plugin-essentials": patch
4+
5+
declined:
6+
- "@yarnpkg/plugin-compat"
7+
- "@yarnpkg/plugin-constraints"
8+
- "@yarnpkg/plugin-dlx"
9+
- "@yarnpkg/plugin-init"
10+
- "@yarnpkg/plugin-interactive-tools"
11+
- "@yarnpkg/plugin-nm"
12+
- "@yarnpkg/plugin-npm-cli"
13+
- "@yarnpkg/plugin-pack"
14+
- "@yarnpkg/plugin-patch"
15+
- "@yarnpkg/plugin-pnp"
16+
- "@yarnpkg/plugin-pnpm"
17+
- "@yarnpkg/plugin-stage"
18+
- "@yarnpkg/plugin-typescript"
19+
- "@yarnpkg/plugin-version"
20+
- "@yarnpkg/plugin-workspace-tools"
21+
- "@yarnpkg/builder"
22+
- "@yarnpkg/core"
23+
- "@yarnpkg/doctor"

packages/plugin-essentials/sources/commands/explain/peerRequirements.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class ExplainPeerRequirementsCommand extends BaseCommand {
2020
2121
When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.
2222
23-
**Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
23+
**Note:** A hash is a seven-letter code consisting of the letter 'p' followed by six characters that can be obtained from peer dependency warnings or from the list of all peer requirements(\`yarn explain peer-requirements\`).
2424
`,
2525
examples: [[
2626
`Explain the corresponding peer requirement for a hash`,
@@ -34,7 +34,7 @@ export default class ExplainPeerRequirementsCommand extends BaseCommand {
3434
hash = Option.String({
3535
required: false,
3636
validator: t.cascade(t.isString(), [
37-
t.matchesRegExp(/^p[0-9a-f]{5}$/),
37+
t.matchesRegExp(/^p[0-9a-f]{6}$/),
3838
]),
3939
});
4040

0 commit comments

Comments
 (0)