meta_package_manager.managers.yarn module¶

meta_package_manager.managers.yarn.NOT_FOUND_STATUSES = frozenset({400, 401, 404})¶

Registry answers that Yarn Classic reads as “no such package”.

Its request manager resolves a request answered with one of these codes to an empty result instead of an error. See request-manager.js.

class meta_package_manager.managers.yarn.Yarn[source]¶

Bases: PackageManager

Virtual base shared by Yarn Classic and Yarn Berry.

The two Yarn lines grew incompatible CLIs, so mpm models them as separate managers, YarnClassic and YarnBerry, both invoking the same yarn binary. The reported version decides which one is active: Classic claims the 1.x range, Berry 2.x and later. Only the shared cache-cleanup operation lives on this base.

Command equivalences with the sibling JS managers are listed in antfu-collective/ni.

Initialize cli_errors list.

Slug of the brand mark standing for this manager in the documentation.

Names an SVG vendored under docs/assets/managers/, whose provenance and license are recorded in docs/assets/managers/logos.yaml. Inlined at the top of the manager’s page by meta_package_manager._docs; a manager leaving it unset keeps the page’s default package glyph.

Several managers legitimately share one slug, either because they wrap the same upstream (brew and cask) or because the tool has no mark of its own and its ecosystem’s stands in (apt under Debian’s swirl, cargo under Rust’s gear). Documentation-only, like homepage_url: no CLI output reads it.

platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), Platform(id='almalinux', name='AlmaLinux'), Platform(id='alpine', name='Alpine Linux'), Platform(id='altlinux', name='ALT Linux'), Platform(id='amzn', name='Amazon Linux'), Platform(id='android', name='Android'), Platform(id='arch', name='Arch Linux'), Platform(id='buildroot', name='Buildroot'), Platform(id='cachyos', name='CachyOS'), Platform(id='centos', name='CentOS'), Platform(id='chromeos', name='ChromeOS'), Platform(id='clearlinux', name='Clear Linux OS'), Platform(id='cloudlinux', name='CloudLinux OS'), Platform(id='crux', name='CRUX'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), Platform(id='endeavouros', name='EndeavourOS'), Platform(id='exherbo', name='Exherbo Linux'), Platform(id='fedora', name='Fedora'), Platform(id='freebsd', name='FreeBSD'), Platform(id='generic_linux', name='Generic Linux'), Platform(id='gentoo', name='Gentoo Linux'), Platform(id='guix', name='Guix System'), Platform(id='haiku', name='Haiku'), Platform(id='hurd', name='GNU/Hurd'), Platform(id='ibm_powerkvm', name='IBM PowerKVM'), Platform(id='illumos', name='illumos'), Platform(id='kali', name='Kali Linux'), Platform(id='kvmibm', name='KVM for IBM z Systems'), Platform(id='linuxmint', name='Linux Mint'), Platform(id='macos', name='macOS'), Platform(id='mageia', name='Mageia'), Platform(id='mandriva', name='Mandriva Linux'), Platform(id='manjaro', name='Manjaro Linux'), Platform(id='midnightbsd', name='MidnightBSD'), Platform(id='netbsd', name='NetBSD'), Platform(id='nixos', name='NixOS'), Platform(id='nobara', name='Nobara'), Platform(id='nutyx', name='NuTyX'), Platform(id='openbsd', name='OpenBSD'), Platform(id='opensuse', name='openSUSE'), Platform(id='openwrt', name='OpenWrt'), Platform(id='oracle', name='Oracle Linux'), Platform(id='os400', name='IBM i'), Platform(id='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), Platform(id='pikaos', name='PikaOS'), Platform(id='raspbian', name='Raspbian'), Platform(id='rhel', name='RedHat Enterprise Linux'), Platform(id='rocky', name='Rocky Linux'), Platform(id='scientific', name='Scientific Linux'), Platform(id='slackware', name='Slackware'), Platform(id='sles', name='SUSE Linux Enterprise Server'), Platform(id='slitaz', name='SliTaz GNU/Linux'), Platform(id='solaris', name='Solaris'), Platform(id='solus', name='Solus'), Platform(id='sourcemage', name='Source Mage GNU/Linux'), Platform(id='sunos', name='SunOS'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='windows', name='Windows'), Platform(id='wsl1', name='Windows Subsystem for Linux v1'), Platform(id='wsl2', name='Windows Subsystem for Linux v2'), Platform(id='xenserver', name='XenServer')})¶

List of platforms supported by the manager.

Allows for a mishmash of platforms and groups of platforms. Will be normalized into a frozenset of Platform instances at instantiation.

virtual: bool = True¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

cleanup_cache()[source]¶

Removes things we don’t need anymore.

See yarn cache clean.

$ yarn cache clean --all
yarn cache v1.22.19
success Cleared cache.
✨  Done in 0.35s.
Return type:

None

cli_names: tuple[str, ...] = ('yarn',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

documentation_url: str | None = None¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

homepage_url: str | None = None¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

id: str = 'yarn'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

name: str = 'Yarn'¶

Return package manager’s common name.

Default value is based on class name.

repository_url: str | None = None¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

wikipedia_url: str | None = None¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

class meta_package_manager.managers.yarn.YarnClassic[source]¶

Bases: Yarn

Yarn Classic, the 1.x line.

mpm claims this class for any yarn binary reporting a 1.x version and drives it through the yarn global command family, so installs, upgrades and removals target the global prefix. Its --json output is a stream of one JSON object per line, not a single document, so every query is parsed line by line.

Note

Yarn has no dedicated search command by maintainer decision, so search is simulated with yarn info and only resolves exact package names.

Initialize cli_errors list.

maintenance_note: str | None = 'Yarn Classic (`1.x`) is [frozen](https://github.com/yarnpkg/yarn), taking only security fixes; the actively developed [Yarn Berry](https://github.com/yarnpkg/berry) line has a different CLI and is wrapped separately as the `yarn-berry` manager.'¶

A watch note about a still-maintained upstream whose activity is slowing or whose status is ambiguous, as a MyST markdown block.

Unlike unmaintained, this is purely informational: the manager stays in the default selection and in the test matrices. It renders as a {note} admonition atop the manager’s documentation page, flagging upstreams worth keeping an eye on (a slow release cadence, superseded-but-still-shipped tools, a discontinued platform still under vendor support). May embed markdown links. Mutually exclusive with unmaintained: a confirmed-dead manager carries an unmaintained_message instead. Enforced by test_maintenance_note.

id: str = 'yarn'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

name: str = 'Yarn Classic'¶

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://yarnpkg.com'¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

documentation_url: str | None = 'https://classic.yarnpkg.com/en/docs/cli/'¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

repository_url: str | None = 'https://github.com/yarnpkg/yarn'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

wikipedia_url: str | None = 'https://en.wikipedia.org/wiki/Yarn_(package_manager)'¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

requirement: str | None = '>=1.20.0,<2.0.0'¶

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

cli_names: tuple[str, ...] = ('yarn',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

pre_args: tuple[str, ...] = ('--silent',)¶
stderr_noise: Pattern[str] | None = re.compile('^(?:\\{"type":"warning",|warning |\\(node:\\d+\\) |\\(Use `node --trace-)')¶

Lines of <stderr> that report no failure, like a tool’s routine warnings.

The failure gate of run() drops them before it reads <stderr>. A non-zero exit whose <stderr> holds nothing else then reads as a status, the way a silent <stderr> already does, and the diagnosis of a real failure keeps only the lines that explain it. The run snapshot keeps the whole stream. None keeps every line.

property installed: Iterator[Package]¶

Fetch installed packages.

$ yarn --silent global --json list --depth 0
{"type":"activityStart","data":{"id":0}}
{"type":"activityTick","data":{"id":0,"name":"awesome-lint@^0.18.0"}}
{"type":"activityTick","data":{"id":0,"name":"arrify@^2.0.1"}}
{"type":"activityTick","data":{"id":0,"name":"case@^1.6.3"}}
{"type":"activityTick","data":{"id":0,"name":"emoji-regex@^9.2.0"}}
{"type":"activityEnd","data":{"id":0}}
{"type":"progressStart","data":{"id":0,"total":327}}
{"type":"progressTick","data":{"id":0,"current":1}}
{"type":"progressTick","data":{"id":0,"current":2}}
{"type":"progressTick","data":{"id":0,"current":3}}
{"type":"progressTick","data":{"id":0,"current":4}}
{"type":"progressTick","data":{"id":0,"current":5}}
{"type":"progressFinish","data":{"id":0}}
{"type":"info","data":""awesome-lint@0.18.0" has binaries:"}
{"type":"list","data":{"type":"bins-awesome-lint","items":["awesome-lint"]}}
$ yarn global list --depth 0
yarn global v1.22.19
info "awesome-lint@0.18.0" has binaries:
   - awesome-lint
✨  Done in 0.13s.
property global_dir: str[source]¶

Locate the global directory.

$ yarn global dir
~/.config/yarn/global
property outdated: Iterator[Package]¶

Fetch outdated packages.

Yarn emits its --json output as a stream of one JSON object per line (the sample below elides the info color-legend object; the human-readable transcript further down shows it):

$ yarn --silent --json outdated --cwd ~/.config/yarn/global
{"type":"warning","data":"package.json: No license field"}
{"type":"table","data":{"head":["Package","Current","Wanted","Latest","Package Type","URL"],"body":[["markdown","0.4.0","0.4.0","0.5.0","dependencies","git://github.com/evilstreak/markdown-js.git"]]}}
$ yarn outdated --cwd ~/.config/yarn/global
yarn outdated v1.22.19
warning package.json: No license field
info Color legend :
"<red>"    : Major Update backward-incompatible updates
"<yellow>" : Minor Update backward-compatible features
"<green>"  : Patch Update backward-compatible bug fixes
Package  Current Wanted Latest Package Type URL
markdown 0.4.0   0.4.0  0.5.0  dependencies git://github.com/.../md-js.git
✨  Done in 0.95s.

Note

yarn outdated exits 1 whenever an update exists, with its warnings on <stderr>. Those warnings are stderr_noise, so the exit reads as a status. A failed registry request prints an error record there instead, and still fails the run.

search(query, extended, exact)[source]¶

Fetch matching packages.

Warning

Yarn maintainers have decided to not implement a dedicated search command.

Search is simulated by a direct call to yarn info, and as a result only works for exact match.

Note

yarn info prints the same Received invalid response from npm. error record, and exits 0, both for a package that does not exist and for a registry request that failed. --verbose adds the status code each request finished with, which tells them apart: a NOT_FOUND_STATUSES answer is a package that does not exist, while any other answer, or none at all, raises a CLIError naming it.

$ yarn --silent --json --verbose info @bouzuya/borage
{"type":"verbose","data":"Checking for configuration file \"~/.npmrc\"."}
{"type":"verbose","data":"Found configuration file \"~/.npmrc\"."}
{"type":"verbose","data":"Checking for configuration file \"~/.npmrc\"."}
{"type":"verbose","data":"Found configuration file \"~/.npmrc\"."}
{"type":"verbose","data":"Checking for configuration file \"/opt/homebrew/Cellar/node/26.9.0/etc/npmrc\"."}
{"type":"verbose","data":"Checking for configuration file \"~/.npmrc\"."}
{"type":"verbose","data":"Found configuration file \"~/.npmrc\"."}
{"type":"verbose","data":"Checking for configuration file \"/Users/.npmrc\"."}
{"type":"verbose","data":"Checking for configuration file \"~/.yarnrc\"."}
{"type":"verbose","data":"Checking for configuration file \"~/.yarnrc\"."}
{"type":"verbose","data":"Checking for configuration file \"/opt/homebrew/Cellar/node/26.9.0/etc/yarnrc\"."}
{"type":"verbose","data":"Checking for configuration file \"~/.yarnrc\"."}
{"type":"verbose","data":"Checking for configuration file \"/Users/.yarnrc\"."}
{"type":"verbose","data":"current time: 2026-09-19T18:18:56.700Z"}
{"type":"verbose","data":"Performing \"GET\" request to \"https://registry.yarnpkg.com/@bouzuya%2fborage\"."}
{"type":"verbose","data":"Request \"https://registry.yarnpkg.com/@bouzuya%2fborage\" finished with status code 200."}
{"type":"inspect","data":{"name":"@bouzuya/borage","description":"A GitHub Pages deployer for bouzuya/blog.bouzuya.net","dist-tags":{"latest":"3.1.2"},"versions":["3.1.2"],"maintainers":[{"name":"bouzuya","email":"m@bouzuya.net"}],"time":{"modified":"2022-06-12T15:26:55.277Z","created":"2017-05-21T23:27:30.332Z","3.1.2":"2017-05-21T23:27:30.332Z"},"homepage":"https://github.com/bouzuya/borage","keywords":["bouzuya","bbn"],"repository":{"type":"git","url":"git+https://github.com/bouzuya/borage.git"},"author":{"name":"bouzuya","email":"m@bouzuya.net","url":"http://bouzuya.net"},"bugs":{"url":"https://github.com/bouzuya/borage/issues"},"license":"MIT","readmeFilename":"README.md","version":"3.1.2","dependencies":{"aws-sdk":"^2.1.30","es6-promise":"^2.1.1","glob":"^5.0.9","mime":"^1.3.4"},"devDependencies":{"coffee-script":"^1.9.2","del":"^1.1.1","gulp":"^3.8.11","gulp-coffee":"^2.3.1","gulp-concat":"^2.5.2","gulp-espower":"^0.10.1","gulp-mocha":"^2.0.1","gulp-sourcemaps":"^1.5.2","gulp-uglify":"^1.2.0","gulp-util":"^3.0.4","gulp-watch":"^4.2.4","power-assert":"^0.11.0","run-sequence":"^1.1.0","sinon":"^1.14.1"},"main":"index.js","scripts":{"build":"gulp build","clean":"gulp clean","start":"gulp","test":"gulp test","watch":"gulp watch"},"gitHead":"0f45887778f89ccf9a17e0a097067ae085c515e5","dist":{"shasum":"9be1578d9d2859833cca435d3501d439f6f27489","tarball":"https://registry.npmjs.org/@bouzuya/borage/-/borage-3.1.2.tgz","integrity":"sha512-gBp5eS2+5VSQqqgHs7fBwesw+ZhbfwewPoiyaINPIchhiIkAjnJ8gPN7RsBqzUftZNXF04x5HuHZG9xe/PHptw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDqfLdL4pGDRKMfJ3HvGGE6tmWoM2uKV8jZWAVshLaKAiAhfqB0YTsKYVz2SUSa1Jz/ZiBPlkF3jAPGqV7UN+lpBw=="}]}}}
Return type:

Iterator[Package]

install(package_id, version=None)[source]¶

Install one package.

$ yarn --silent global add awesome-lint
yarn global v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] đźšš  Fetching packages...
[3/4] đź”—  Linking dependencies...
[4/4] 🔨  Building fresh packages...

success Installed "awesome-lint@0.18.0" with binaries:
    - awesome-lint
✨  Done in 16.15s.
Return type:

str

upgrade_all_cli()[source]¶

Generates the CLI to upgrade all outdated packages.

$ yarn --silent global upgrade --latest
yarn global v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] đźšš  Fetching packages...
[3/4] đź”—  Linking dependencies...
[4/4] 🔨  Rebuilding all packages...
success Saved lockfile.
success Saved 271 new dependencies.
info Direct dependencies
├─ awesome-lint@0.18.0
└─ markdown@0.5.0
info All dependencies
├─ @babel/code-frame@7.18.6
├─ @babel/helper-validator-identifier@7.18.6
├─ @nodelib/fs.scandir@2.1.5
├─ array-to-sentence@1.1.0
├─ array-union@2.1.0
├─ awesome-lint@0.18.0
├─ fs.realpath@1.0.0
(...)
└─ zwitch@1.0.5
✨  Done in 19.89s.
Return type:

tuple[str, ...]

upgrade_one_cli(package_id, version=None)[source]¶

Generates the CLI to upgrade the provided package.

$ yarn --silent global upgrade markdown --latest
yarn global v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] đźšš  Fetching packages...
[3/4] đź”—  Linking dependencies...
[4/4] 🔨  Rebuilding all packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ markdown@0.5.0
info All dependencies
├─ markdown@0.5.0
└─ nopt@2.1.2
✨  Done in 1.77s.
Return type:

tuple[str, ...]

remove(package_id)[source]¶

Remove one package.

$ yarn --silent global remove awesome-lint
yarn global v1.22.19
[1/2] đź—‘  Removing module awesome-lint...
[2/2] 🔨  Regenerating lockfile and installing missing dependencies...
success Uninstalled packages.
✨  Done in 0.21s.
Return type:

str

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

class meta_package_manager.managers.yarn.YarnBerry[source]¶

Bases: Yarn

Yarn Berry, the 2.x and later line.

mpm claims this class for any yarn binary reporting a 2.x or newer version.

Warning

Yarn Berry removed the yarn global command family entirely: it has no notion of globally installed packages. Only search is available, while installed, outdated, install, upgrade and remove are all unsupported.

Note

search is simulated with yarn npm info and only resolves exact package names.

Initialize cli_errors list.

id: str = 'yarn-berry'¶

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

name: str = 'Yarn Berry'¶

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://yarnpkg.com'¶

Home page of the project, only used in documentation for reference.

Left unset when the home page is the project’s repository, which repository_url names on its own, and when it is the project’s manual, which documentation_url names. Never inherited, like the other links.

documentation_url: str | None = 'https://yarnpkg.com/cli'¶

Entry point of the project’s own documentation, or None when it has none.

The manual, the documentation site, or the man page of the CLI mpm drives: whichever page a user reads to learn the commands this manager wraps. Listed between homepage_url and repository_url in the links of the manager’s page, so a reader reaching for the tool’s reference finds it in the box of facts rather than in the prose below it.

Left unset where a link would state a fact twice or invent one: a tool documenting itself in its repository alone, whose README repository_url already reaches. A page about the ecosystem rather than the tool does not qualify either.

Where a project’s only site is its manual, that address belongs here and homepage_url stays unset: the slot names what the page is, and a reader reaching for the reference looks under the documentation link.

Never inherited, like every other link: the AUR helpers extending pacman each document themselves.

repository_url: str | None = 'https://github.com/yarnpkg/berry'¶

Repository holding the project’s code, or None when it has no public one.

Linked from the manager’s documentation page. Also what the weekly metrics sample reads: docs/docs_update.py writes it into the [tool.repomatic.metrics] subjects of pyproject.toml when its forge answers the sampler, through a mirror for a forge that does not.

Never inherited, for the same reason as wikipedia_url: the AUR helpers extending pacman each live in a repository of their own.

wikipedia_url: str | None = 'https://en.wikipedia.org/wiki/Yarn_(package_manager)'¶

English Wikipedia article about the project, or None when it has none.

Listed last in the links of the manager’s documentation page. The article covers the project that home page names, or is a redirect Wikipedia keeps under the project’s name, landing on the part of a broader article that describes it: Cargo_(software) opens the Cargo section of the Rust article. An article that merely mentions the project does not count, nor does one about a related subject: lazy is a Neovim plugin manager, and the Neovim article is not about it.

Never inherited: the metaclass resets it to None on any class not declaring its own. A subclass often wraps a distinct project, like the six AUR helpers extending pacman, and would otherwise present pacman’s article as its own. Documentation-only, like homepage_url.

requirement: str | None = '>=2.0.0'¶

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

cli_names: tuple[str, ...] = ('yarn',)¶

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

virtual: bool = False¶

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

search(query, extended, exact)[source]¶

Fetch matching packages.

Warning

Search is simulated by a direct call to yarn npm info, and as a result only works for exact match.

$ yarn npm info @bouzuya/borage --json
{"name":"@bouzuya/borage","description":"A GitHub Pages deployer for bouzuya/blog.bouzuya.net","dist-tags":{"latest":"3.1.2"},"versions":["3.1.2"],"readme":"![borage logo](https://cloud.githubusercontent.com/assets/1221346/17835500/a6087528-67aa-11e6-9370-9f16dd9988b0.png)

borage is a deployer for `blog.bouzuya.net <http://blog.bouzuya.net>`_.

See: [bouzuya/blog.bouzuya.net][]

## Installation

$ npm install https://github.com/bouzuya/borage/archive/master.tar.gz

or

$ npm install https://github.com/bouzuya/borage/archive/{VERSION}.tar.gz

## License

`MIT <LICENSE>`_

## Author

[bouzuya][user] &lt;[m@bouzuya.net][email]&gt; ([http://bouzuya.net][url])

[user]: https://github.com/bouzuya
[email]: mailto:m@bouzuya.net
[url]: http://bouzuya.net
[bouzuya/blog.bouzuya.net]: https://github.com/bouzuya/blog.bouzuya.net
[bouzuya/grunt-tentacles]: https://github.com/bouzuya/grunt-tentacles
[bouzuya/kraken]: https://github.com/bouzuya/kraken
","maintainers":[{"name":"bouzuya","email":"m@bouzuya.net"}],"time":{"modified":"2022-06-12T15:26:55.277Z","created":"2017-05-21T23:27:30.332Z","3.1.2":"2017-05-21T23:27:30.332Z"},"homepage":"https://github.com/bouzuya/borage","keywords":["bouzuya","bbn"],"repository":{"type":"git","url":"git+https://github.com/bouzuya/borage.git"},"author":{"name":"bouzuya","email":"m@bouzuya.net","url":"http://bouzuya.net"},"bugs":{"url":"https://github.com/bouzuya/borage/issues"},"license":"MIT","readmeFilename":"README.md","version":"3.1.2","dependencies":{"aws-sdk":"^2.1.30","es6-promise":"^2.1.1","glob":"^5.0.9","mime":"^1.3.4"},"devDependencies":{"coffee-script":"^1.9.2","del":"^1.1.1","gulp":"^3.8.11","gulp-coffee":"^2.3.1","gulp-concat":"^2.5.2","gulp-espower":"^0.10.1","gulp-mocha":"^2.0.1","gulp-sourcemaps":"^1.5.2","gulp-uglify":"^1.2.0","gulp-util":"^3.0.4","gulp-watch":"^4.2.4","power-assert":"^0.11.0","run-sequence":"^1.1.0","sinon":"^1.14.1"},"main":"index.js","scripts":{"build":"gulp build","clean":"gulp clean","start":"gulp","test":"gulp test","watch":"gulp watch"},"gitHead":"0f45887778f89ccf9a17e0a097067ae085c515e5","dist":{"shasum":"9be1578d9d2859833cca435d3501d439f6f27489","tarball":"https://registry.npmjs.org/@bouzuya/borage/-/borage-3.1.2.tgz","integrity":"sha512-gBp5eS2+5VSQqqgHs7fBwesw+ZhbfwewPoiyaINPIchhiIkAjnJ8gPN7RsBqzUftZNXF04x5HuHZG9xe/PHptw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBDqfLdL4pGDRKMfJ3HvGGE6tmWoM2uKV8jZWAVshLaKAiAhfqB0YTsKYVz2SUSa1Jz/ZiBPlkF3jAPGqV7UN+lpBw=="}]}}
Return type:

Iterator[Package]