ci: check for typos in documentation (#16235)

This commit is contained in:
Don Isaac
2025-01-08 01:23:54 -06:00
committed by GitHub
parent 81ecf7556c
commit 76800b049a
9 changed files with 29 additions and 8 deletions

19
.github/workflows/typos.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Typos
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Spellcheck
uses: crate-ci/typos@v1.29.4
with:
files: docs/**/*

2
.typos.toml Normal file
View File

@@ -0,0 +1,2 @@
[type.md]
extend-ignore-words-re = ["^ba"]

View File

@@ -161,7 +161,7 @@ The binary will be located at `./build/release/bun` and `./build/release/bun-pro
### Download release build from pull requests
To save you time spent building a release build locally, we provide a way to run release builds from pull requests. This is useful for manully testing changes in a release build before they are merged.
To save you time spent building a release build locally, we provide a way to run release builds from pull requests. This is useful for manually testing changes in a release build before they are merged.
To run a release build from a pull request, you can use the `bun-pr` npm package:

View File

@@ -367,7 +367,7 @@ If the `S3_*` environment variable is not set, Bun will also check for the `AWS_
These environment variables are read from [`.env` files](/docs/runtime/env) or from the process environment at initialization time (`process.env` is not used for this).
These defaults are overriden by the options you pass to `s3(credentials)`, `new Bun.S3Client(credentials)`, or any of the methods that accept credentials. So if, for example, you use the same credentials for different buckets, you can set the credentials once in your `.env` file and then pass `bucket: "my-bucket"` to the `s3()` helper function without having to specify all the credentials again.
These defaults are overridden by the options you pass to `s3(credentials)`, `new Bun.S3Client(credentials)`, or any of the methods that accept credentials. So if, for example, you use the same credentials for different buckets, you can set the credentials once in your `.env` file and then pass `bucket: "my-bucket"` to the `s3()` helper function without having to specify all the credentials again.
### `S3Client` objects

View File

@@ -82,7 +82,7 @@ const strict = new Database(
// throws error because of the typo:
const query = strict
.query("SELECT $message;")
.all({ messag: "Hello world" });
.all({ message: "Hello world" });
const notStrict = new Database(
":memory:"
@@ -90,7 +90,7 @@ const notStrict = new Database(
// does not throw error:
notStrict
.query("SELECT $message;")
.all({ messag: "Hello world" });
.all({ message: "Hello world" });
```
### Load via ES module import

View File

@@ -121,7 +121,7 @@ const id = randomUUIDv7();
A UUID v7 is a 128-bit value that encodes the current timestamp, a random value, and a counter. The timestamp is encoded using the lowest 48 bits, and the random value and counter are encoded using the remaining bits.
The `timestamp` parameter defaults to the current time in milliseconds. When the timestamp changes, the counter is reset to a psuedo-random integer wrapped to 4096. This counter is atomic and threadsafe, meaning that using `Bun.randomUUIDv7()` in many Workers within the same process running at the same timestamp will not have colliding counter values.
The `timestamp` parameter defaults to the current time in milliseconds. When the timestamp changes, the counter is reset to a pseudo-random integer wrapped to 4096. This counter is atomic and threadsafe, meaning that using `Bun.randomUUIDv7()` in many Workers within the same process running at the same timestamp will not have colliding counter values.
The final 8 bytes of the UUID are a cryptographically secure random value. It uses the same random number generator used by `crypto.randomUUID()` (which comes from BoringSSL, which in turn comes from the platform-specific system random number generator usually provided by the underlying hardware).

View File

@@ -41,7 +41,7 @@ $ bun outdated --filter 'pkg-*'
$ bun outdated --filter './'
```
For more infomation on both these commands, see [`bun install`](https://bun.sh/docs/cli/install) and [`bun outdated`](https://bun.sh/docs/cli/outdated).
For more information on both these commands, see [`bun install`](https://bun.sh/docs/cli/install) and [`bun outdated`](https://bun.sh/docs/cli/outdated).
## Running scripts with `--filter`

View File

@@ -100,7 +100,7 @@ $ head -n3 bun.lock
"workspaces": {
```
Once `bun.lock` is generated, Bun will use it for all subsequent installs and updates through commands that read and modify the lockfile. If both lockfiles exist, `bun.lock` will be choosen over `bun.lockb`.
Once `bun.lock` is generated, Bun will use it for all subsequent installs and updates through commands that read and modify the lockfile. If both lockfiles exist, `bun.lock` will be chosen over `bun.lockb`.
Bun v1.2.0 will switch the default lockfile format to `bun.lock`.

View File

@@ -102,7 +102,7 @@ The default handling of non-zero exit codes can be configured by calling `.nothr
import { $ } from "bun";
// shell promises will not throw, meaning you will have to
// check for `exitCode` manually on every shell command.
$.nothrow(); // equivilent to $.throws(false)
$.nothrow(); // equivalent to $.throws(false)
// default behavior, non-zero exit codes will throw an error
$.throws(true);