diff options
author | 2023-10-10 18:50:46 -0700 | |
---|---|---|
committer | 2023-10-10 18:50:46 -0700 | |
commit | e9470121d2f2feeeebb449639319ea799e483075 (patch) | |
tree | d7f3c541cc8eeec6f16d167204b3e36274708f1b | |
parent | ee2e34866e3bc0d12ba5cb1d5041524776472d71 (diff) | |
download | bun-dylan/github-api-option.tar.gz bun-dylan/github-api-option.tar.zst bun-dylan/github-api-option.zip |
more docsdylan/github-api-option
-rw-r--r-- | docs/cli/bun-install.md | 3 | ||||
-rw-r--r-- | docs/cli/install.md | 3 | ||||
-rw-r--r-- | docs/install/index.md | 3 | ||||
-rw-r--r-- | docs/runtime/bunfig.md | 11 | ||||
-rw-r--r-- | src/install/lockfile.zig | 3 |
5 files changed, 22 insertions, 1 deletions
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( - "<r><red>error<r><d>:<r> <b>{s}<r><d>@<b>{}<r><d> failed to resolve<r>\nIf this is a private repository set install.github.api to false in bunfig.toml\n\n", + "<r><red>error<r><d>:<r> <b>{s}<r><d>@<b>{}<r><d> failed to resolve<r>\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 { |