Yarn: exact match for yarn list --pattern

Created on 14 Jan 2019  路  1Comment  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?
feature

What is the current behavior?
listing packages with exact matches is possible via yarn list $args but deprecated

What is the expected behavior?
yarn list has the capability to filter dependencies with an exact match

Please mention your node.js, yarn and operating system version.

$ yarn -v
1.13.0
$ node -v
v10.15.0
$lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

Context
Feature was deprecated in #4609.
Use case:
yarn list @types/react (or similar yarn list react) is useful when debugging typescript issues. However this matches any types package if used with the recommend --pattern flag for react dependencies since it's common to prefix them with react e.g. react-redux, react-router etc. This can add quite some noise.

cat-feature

Most helpful comment

I haven't really seen anybody say this yet, but it would be nice if the "filtering by arguments" feature simply wasn't deprecated. One nice thing about yarn is it's "kind-of" parity with common npm commands, even those which are renamed (eg. install -> add). It would be nice if the semantics and usage of "list" didn't change much between yarn and npm. npm list [package] is super useful and commonly used, but doesn't work with workspaces, so it'd be nice if yarn list [package] afforded the same conveniences as npm list... especially the number of keystrokes.

>All comments

I haven't really seen anybody say this yet, but it would be nice if the "filtering by arguments" feature simply wasn't deprecated. One nice thing about yarn is it's "kind-of" parity with common npm commands, even those which are renamed (eg. install -> add). It would be nice if the semantics and usage of "list" didn't change much between yarn and npm. npm list [package] is super useful and commonly used, but doesn't work with workspaces, so it'd be nice if yarn list [package] afforded the same conveniences as npm list... especially the number of keystrokes.

Was this page helpful?
0 / 5 - 0 ratings