From e9470121d2f2feeeebb449639319ea799e483075 Mon Sep 17 00:00:00 2001 From: Dylan Conway Date: Tue, 10 Oct 2023 18:50:46 -0700 Subject: more docs --- docs/cli/bun-install.md | 3 +++ docs/cli/install.md | 3 +++ docs/install/index.md | 3 +++ docs/runtime/bunfig.md | 11 +++++++++++ src/install/lockfile.zig | 3 ++- 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/cli/bun-install.md b/docs/cli/bun-install.md index 0cbc21e1d..2fa3afd71 100644 --- a/docs/cli/bun-install.md +++ b/docs/cli/bun-install.md @@ -62,6 +62,9 @@ dev = true # Install peerDependencies (default: false) peer = false +# Whether to use the github REST api (unauthenticated) +github.api = true + # When using `bun install -g`, install packages here globalDir = "~/.bun/install/global" diff --git a/docs/cli/install.md b/docs/cli/install.md index 9aafae301..dd6f68cca 100644 --- a/docs/cli/install.md +++ b/docs/cli/install.md @@ -89,6 +89,9 @@ frozenLockfile = false # equivalent to `--dry-run` flag dryRun = false + +# whether to use the github REST api (unauthenticated) +github.api = true ``` {% /details %} diff --git a/docs/install/index.md b/docs/install/index.md index 11e0d4fd4..d2f684c09 100644 --- a/docs/install/index.md +++ b/docs/install/index.md @@ -91,6 +91,9 @@ frozenLockfile = false # equivalent to `--dry-run` flag dryRun = false + +# whether to use the github REST api (unauthenticated) +github.api = true ``` {% /details %} diff --git a/docs/runtime/bunfig.md b/docs/runtime/bunfig.md index 83f66b1b1..49c7513b1 100644 --- a/docs/runtime/bunfig.md +++ b/docs/runtime/bunfig.md @@ -216,6 +216,17 @@ Whether to install peer dependencies. Default `false`. peer = false ``` +### `install.github.api` + +Enable using the github REST API to install github dependencies. Default `true`. + +Private github repositories will fail to install if this option is true because the REST API is unauthenticated. + +```toml +[install] +github.api = true +``` + ### `install.production` Whether `bun install` will run in "production mode". Default `false`. diff --git a/src/install/lockfile.zig b/src/install/lockfile.zig index 76f6fedc7..2a2e86514 100644 --- a/src/install/lockfile.zig +++ b/src/install/lockfile.zig @@ -1507,10 +1507,11 @@ pub fn verifyResolutions(this: *Lockfile, local_features: Features, remote_featu } else { if (failed_dep.version.tag == .github) { Output.prettyErrorln( - "error: {s}@{} failed to resolve\nIf this is a private repository set install.github.api to false in bunfig.toml\n\n", + "error: {s}@{} failed to resolve\nIf \"{s}\" is a private repository, set install.github.api to false in bunfig.toml\n\n", .{ failed_dep.name.slice(string_buf), failed_dep.version.literal.fmt(string_buf), + failed_dep.name.slice(string_buf), }, ); } else { -- cgit v1.2.3