npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yarn-completions

v0.0.8

Published

Tabtab plugin to handle completion results for Yarn

Downloads

17

Readme

yarn-completions

tabtab completion handler for Yarn. Supports bash, zsh or fish.


Install

with npm

npm i -g yarn-completions

On install, the package will add a line to source a SHELL specific config file, into either ~/.bashrc, ~/.zshrc or ~/.config/fish/config.fish.

On uninstall, these lines will be removed.

npm uninstall yarn-completions -g

with yarn

yarn global add yarn-completions

Uninstall, with

yarn global remove yarn-completions

Description

Example of completion results for zsh:

list all available commands and flags

$ yarn
config               clean            check      cache
dedupe               prune            help
generate-lock-entry  global           init       info
--global-folder      access           bin        add
licenses             install          login      link
lockfile             version          upgrade    why
outdated             logout           owner      ls
--prefer-offline     --strict-semver  --offline  --json
publish              remove           pack       run
self-update          unlink           team       tag     --
--help               -h                                  -- output usage information
--modules-folder                                         -- rather than installing modules into the node_modules folder relat
--mutex                                                  -- use a mutex to ensure only one yarn instance is executing
--packages-root                                          -- rather than storing modules into a global packages root, store th
--version            -V                                  -- output the version number

list subcommands and command specific option

$ yarn global
--global-folder   --strict-semver  --json
--prefer-offline  --offline        remove  bin  add  ls  --
--help            -h                                     -- output usage information
--modules-folder                                         -- rather than installing modules into the node_modules folder relat
--mutex                                                  -- use a mutex to ensure only one yarn instance is executing
--packages-root                                          -- rather than storing modules into a global packages root, store th
--version         -V                                     -- output the version number

$ yarn install
--flat                                                         -- only allow one version of a package
--global-folder    --json
--ignore-optional  --ignore-scripts  --force        --prod
--prefer-offline   --strict-semver    --production  --offline  --
--har                                                          -- save HAR output of network traffic
--help             -h                                          -- output usage information
--ignore-engines                                               -- ignore engines check
--modules-folder                                               -- rather than installing modules into the node_modules folder
--mutex                                                        -- use a mutex to ensure only one yarn instance is executing
--no-lockfile                                                  -- don't read or generate a lockfile
--packages-root                                                -- rather than storing modules into a global packages root, st
--pure-lockfile                                                -- don't generate a lockfile
 --save            -S                                          -- DEPRECATED - save package to your `dependencies`
 --save-dev        -D                                          -- DEPRECATED - save package to your `devDependencies`
 --save-exact       --global         -E             -g
 --save-tilde      -T                                          -- DEPRECATED
 --save-optional   -O                                          -- DEPRECATED - save package to your `optionalDependencies`
 --save-peer       -P                                          -- DEPRECATED - save package to your `peerDependencies`
--version          -V                                          -- output the version number

Some commands have more granular completion handlers defined in their own completion file (in lib/completions). Slightly more elaborated completion handlers may be developped for each specific command that would make sense.

yarn config get or yarn config set

$ yarn config set
ignore-optional      ignore-scripts    save-prefix
user-agent           registry
version-git-message  init-license      init-version
version-tag-prefix   version-git-sign  version-git-tag  --

yarn run that completes with package.json's script fields for instance.

$ yarn run
postuninstall  postinstall  prepublish  babel  test
watch                                                --

yarn link completes based off the links found in ~/.yarn-cache/.link.

$ yarn link
yarn-completions  tiny-lr  tabtab  --

yarn unlink completes based off the links found in node_modules folder, and the one found in ~/.yarn-cache/.link

$ yarn unlink
tabtab    --

yarn outdated completes based off dependencies and devDependencies found in project's package.json

$ yarn outdated
babel-preset-es2015  npm-watch  babel-cli  yarn
lodash.intersection  user-home  tabtab     lodash  --

same goes for yarn remove, completing based off dependencies and devDependencies found in project's package.json

$ yarn remove
babel-preset-es2015  npm-watch  babel-cli  yarn
lodash.intersection  user-home  tabtab     lodash  --

yarn why completes all packages found in node_modules folder.

$ yarn why babel-
babel-code-frame                                      babel-cli
babel-generator                                       babel-core
babel-helper-call-delegate                            babel-helper-define-map
babel-helper-get-function-arity                       babel-helper-function-name
babel-helper-optimise-call-expression                 babel-helper-hoist-variables
babel-helper-replace-supers                           babel-helper-regex
babel-messages                                        babel-helpers
babel-plugin-transform-es2015-arrow-functions         babel-plugin-check-es2015-constants
babel-plugin-transform-es2015-block-scoped-functions  babel-plugin-transform-es2015-block-scoping
babel-plugin-transform-es2015-computed-properties     babel-plugin-transform-es2015-classes
babel-plugin-transform-es2015-duplicate-keys          babel-plugin-transform-es2015-destructuring
babel-plugin-transform-es2015-function-name           babel-plugin-transform-es2015-for-of
babel-plugin-transform-es2015-modules-amd             babel-plugin-transform-es2015-literals
babel-plugin-transform-es2015-modules-systemjs        babel-plugin-transform-es2015-modules-commonjs
babel-plugin-transform-es2015-object-super            babel-plugin-transform-es2015-modules-umd
babel-plugin-transform-es2015-shorthand-properties    babel-plugin-transform-es2015-parameters
babel-plugin-transform-es2015-sticky-regex            babel-plugin-transform-es2015-spread
babel-plugin-transform-es2015-template-literals       babel-plugin-transform-es2015-typeof-symbol
babel-plugin-transform-inline-imports-commonjs        babel-plugin-transform-es2015-unicode-regex
babel-plugin-transform-strict-mode                    babel-plugin-transform-regenerator
babel-preset-es2015                                   babel-polyfill
babel-register                                        babel-runtime
babel-traverse                                        babel-template
babel-types