Implement bun add --peer <pkg> (#16150)

This commit is contained in:
Michael H
2025-01-07 07:59:59 +11:00
committed by GitHub
parent 0db90583e8
commit 193a6306d5
7 changed files with 191 additions and 4 deletions

View File

@@ -87,7 +87,7 @@ _bun_completions() {
GLOBAL_OPTIONS[LONG_OPTIONS]="--use --cwd --bunfile --server-bunfile --config --disable-react-fast-refresh --disable-hmr --env-file --extension-order --jsx-factory --jsx-fragment --extension-order --jsx-factory --jsx-fragment --jsx-import-source --jsx-production --jsx-runtime --main-fields --no-summary --version --platform --public-dir --tsconfig-override --define --external --help --inject --loader --origin --port --dump-environment-variables --dump-limits --disable-bun-js";
GLOBAL_OPTIONS[SHORT_OPTIONS]="-c -v -d -e -h -i -l -u -p";
PACKAGE_OPTIONS[ADD_OPTIONS_LONG]="--development --optional";
PACKAGE_OPTIONS[ADD_OPTIONS_LONG]="--development --optional --peer";
PACKAGE_OPTIONS[ADD_OPTIONS_SHORT]="-d";
PACKAGE_OPTIONS[REMOVE_OPTIONS_LONG]="";
PACKAGE_OPTIONS[REMOVE_OPTIONS_SHORT]="";

View File

@@ -35,6 +35,7 @@ _bun_add_completion() {
'-D[]' \
'--development[]' \
'--optional[Add dependency to "optionalDependencies]' \
'--peer[Add dependency to "peerDependencies]' \
'--exact[Add the exact version instead of the ^range]' &&
ret=0
@@ -339,6 +340,7 @@ _bun_install_completion() {
'--development[]' \
'-D[]' \
'--optional[Add dependency to "optionalDependencies]' \
'--peer[Add dependency to "peerDependencies]' \
'--exact[Add the exact version instead of the ^range]' &&
ret=0