-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support --dev
/-D
and support dependency flags on bun install
#3989
Conversation
❌ @colinhacks 1 files with test failures on linux-x64-baseline:
|
❌ @colinhacks 1 files with test failures on linux-x64:
|
❌ @colinhacks 5 files with test failures on bun-darwin-aarch64:
|
❌ @colinhacks 4 files with test failures on bun-darwin-x64-baseline:
|
you manually checked this works, right? i remember clap had weird issues with single-letter uppercase CLI arguments |
@Jarred-Sumner Yep. Also verified that this is adding to $ bun-debug remove lodash && bun-debug add --dev lodash
[SYS] read(3, 4096) = 4096 (0.019ms)
[SYS] close(3)
[0.05ms] ".env.local", ".env"
bun remove v0.7.3_debug (18a2e18a)
- lodash
1 packages removed [34.00ms]
[SYS] read(3, 4096) = 4096 (0.019ms)
[SYS] close(3)
[0.04ms] ".env.local", ".env"
bun add v0.7.3_debug (18a2e18a)
installed lodash@4.17.21
[25.00ms] done
$ bun-debug remove lodash && bun-debug add --development lodash
[SYS] read(3, 4096) = 4096 (0.037ms)
[SYS] close(3)
[0.07ms] ".env.local", ".env"
bun remove v0.7.3_debug (18a2e18a)
- lodash
1 packages removed [30.00ms]
[SYS] read(3, 4096) = 4096 (0.019ms)
[SYS] close(3)
[0.04ms] ".env.local", ".env"
bun add v0.7.3_debug (18a2e18a)
installed lodash@4.17.21
[26.00ms] done
$ bun-debug remove lodash && bun-debug add -D lodash
[SYS] read(3, 4096) = 4096 (0.034ms)
[SYS] close(3)
[0.08ms] ".env.local", ".env"
bun remove v0.7.3_debug (18a2e18a)
- lodash
1 packages removed [34.00ms]
[SYS] read(3, 4096) = 4096 (0.024ms)
[SYS] close(3)
[0.04ms] ".env.local", ".env"
bun add v0.7.3_debug (18a2e18a)
installed lodash@4.17.21
[25.00ms] done
$ bun-debug remove lodash && bun-debug add -d lodash
[SYS] read(3, 4096) = 4096 (0.057ms)
[SYS] close(3)
[0.13ms] ".env.local", ".env"
bun remove v0.7.3_debug (18a2e18a)
- lodash
1 packages removed [40.00ms]
[SYS] read(3, 4096) = 4096 (0.020ms)
[SYS] close(3)
[0.05ms] ".env.local", ".env"
bun add v0.7.3_debug (18a2e18a)
installed lodash@4.17.21
[27.00ms] done |
Thank you |
What does this PR do?
Support
--dev
/-D
. Yarnand pnpmuse--dev
so it is more expected.Support dependency flags on
bun install
(long overdue)Ideally we'd rework clap to support "hidden flags". Currently the helptext looks as below. Separate lines for both
-d, --dev
and-D, --development
but visually they share a description.bun-debug add -h [SYS] read(3, 4096) = 4096 (0.211ms) [SYS] close(3) -c, --config <STR>? Load config (bunfig.toml) -y, --yarn Write a yarn.lock file (yarn v1) -p, --production Don't install devDependencies --no-save Don't save a lockfile --save Save to package.json --dry-run Don't install anything --lockfile <PATH> Store & load a lockfile at a specific filepath --frozen-lockfile Disallow changes to lockfile -f, --force Always request the latest versions from the registry & reinstall all dependencies --cache-dir <PATH> Store & load cached data from a specific directory path --no-cache Ignore manifest cache entirely --silent Don't log anything --verbose Excessively verbose logging --no-progress Disable the progress bar --no-summary Don't print a summary --no-verify Skip verifying integrity of newly downloaded packages --ignore-scripts Skip lifecycle scripts in the project's package.json (dependency scripts are never run) -g, --global Install globally --cwd <STR> Set a specific cwd --backend <STR> Platform-specific optimizations for installing dependencies. Possible values: "clonefile" (default), "hardlink", "symlink", "copyfile" --link-native-bins <STR>... Link "bin" from a matching platform-specific "optionalDependencies" instead. Default: esbuild, turbo --help Print this help menu -d, --dev Add dependency to "devDependencies" -D, --development --optional Add dependency to "optionalDependencies" --exact Add the exact version instead of the ^range