-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jaco/coverage-include-exclude
- Loading branch information
Showing
718 changed files
with
51,340 additions
and
28,557 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
BUN_VERSION: "1.1.38" | ||
OXLINT_VERSION: "0.15.0" | ||
|
||
jobs: | ||
lint-js: | ||
name: "Lint JavaScript" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Bun | ||
uses: ./.github/actions/setup-bun | ||
with: | ||
bun-version: ${{ env.BUN_VERSION }} | ||
- name: Lint | ||
run: bunx oxlint --config oxlint.json --quiet --format github | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
with: | ||
files: docs/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
command script import vendor/zig/tools/lldb_pretty_printers.py | ||
# command script import vendor/zig/tools/lldb_pretty_printers.py | ||
command script import vendor/WebKit/Tools/lldb/lldb_webkit.py | ||
|
||
# type summary add --summary-string "${var} | inner=${var[0-30]}, source=${var[33-64]}, tag=${var[31-32]}" "unsigned long" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# To learn more about git's mailmap: https://ntietz.com/blog/git-mailmap-for-name-changes | ||
chloe caruso <[email protected]> <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[type.md] | ||
extend-ignore-words-re = ["^ba"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.1.41 | ||
1.1.43 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Buffer } from "node:buffer"; | ||
import { bench, run } from "../runner.mjs"; | ||
|
||
const variations = [ | ||
["latin1", "hello world"], | ||
["utf16", "hello emoji 🤔"], | ||
]; | ||
|
||
for (const [label, string] of variations) { | ||
const big = Buffer.alloc(1000000, string).toString(); | ||
const small = Buffer.from(string).toString(); | ||
const substring = big.slice(0, big.length - 2); | ||
|
||
bench(`${substring.length}`, () => { | ||
return Buffer.byteLength(substring, "utf8"); | ||
}); | ||
|
||
bench(`${small.length}`, () => { | ||
return Buffer.byteLength(small); | ||
}); | ||
|
||
bench(`${big.length}`, () => { | ||
return Buffer.byteLength(big); | ||
}); | ||
} | ||
|
||
await run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import { bench, run } from "../runner.mjs"; | ||
|
||
// Can be strings or buffers. | ||
const shortStr = Buffer.from("abcd1234"); // 8 chars | ||
const longStr = Buffer.alloc(128 * 1024, "xABcDpQrStUvWxYz=-1]23]12312312][3123][123]["); | ||
|
||
// Short string benchmarks | ||
|
||
bench("wyhash (short)", () => { | ||
Bun.hash.wyhash(shortStr); | ||
}); | ||
|
||
bench("adler32 (short)", () => { | ||
Bun.hash.adler32(shortStr); | ||
}); | ||
|
||
bench("crc32 (short)", () => { | ||
Bun.hash.crc32(shortStr); | ||
}); | ||
|
||
bench("cityHash32 (short)", () => { | ||
Bun.hash.cityHash32(shortStr); | ||
}); | ||
|
||
bench("cityHash64 (short)", () => { | ||
Bun.hash.cityHash64(shortStr); | ||
}); | ||
|
||
bench("xxHash32 (short)", () => { | ||
Bun.hash.xxHash32(shortStr); | ||
}); | ||
|
||
bench("xxHash64 (short)", () => { | ||
Bun.hash.xxHash64(shortStr); | ||
}); | ||
|
||
bench("xxHash3 (short)", () => { | ||
Bun.hash.xxHash3(shortStr); | ||
}); | ||
|
||
bench("murmur32v3 (short)", () => { | ||
Bun.hash.murmur32v3(shortStr); | ||
}); | ||
|
||
bench("murmur32v2 (short)", () => { | ||
Bun.hash.murmur32v2(shortStr); | ||
}); | ||
|
||
bench("murmur64v2 (short)", () => { | ||
Bun.hash.murmur64v2(shortStr); | ||
}); | ||
|
||
bench("wyhash (128 KB)", () => { | ||
Bun.hash.wyhash(longStr); | ||
}); | ||
|
||
bench("adler32 (128 KB)", () => { | ||
Bun.hash.adler32(longStr); | ||
}); | ||
|
||
bench("crc32 (128 KB)", () => { | ||
Bun.hash.crc32(longStr); | ||
}); | ||
|
||
bench("cityHash32 (128 KB)", () => { | ||
Bun.hash.cityHash32(longStr); | ||
}); | ||
|
||
bench("cityHash64 (128 KB)", () => { | ||
Bun.hash.cityHash64(longStr); | ||
}); | ||
|
||
bench("xxHash32 (128 KB)", () => { | ||
Bun.hash.xxHash32(longStr); | ||
}); | ||
|
||
bench("xxHash64 (128 KB)", () => { | ||
Bun.hash.xxHash64(longStr); | ||
}); | ||
|
||
bench("xxHash3 (128 KB)", () => { | ||
Bun.hash.xxHash3(longStr); | ||
}); | ||
|
||
bench("murmur32v3 (128 KB)", () => { | ||
Bun.hash.murmur32v3(longStr); | ||
}); | ||
|
||
bench("murmur32v2 (128 KB)", () => { | ||
Bun.hash.murmur32v2(longStr); | ||
}); | ||
|
||
bench("murmur64v2 (128 KB)", () => { | ||
Bun.hash.murmur64v2(longStr); | ||
}); | ||
|
||
run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.