Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into nektro-patch-18634
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Jan 1, 2025
2 parents b2e5ac7 + be959e1 commit 4a93608
Show file tree
Hide file tree
Showing 146 changed files with 11,942 additions and 5,242 deletions.
2 changes: 1 addition & 1 deletion .lldbinit
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"
27 changes: 27 additions & 0 deletions bench/snippets/byteLength.mjs
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();
1 change: 0 additions & 1 deletion cmake/targets/BuildBun.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ file(GLOB BUN_C_SOURCES ${CONFIGURE_DEPENDS}
)

if(WIN32)
list(APPEND BUN_C_SOURCES ${CWD}/src/bun.js/bindings/windows/musl-memmem.c)
list(APPEND BUN_CXX_SOURCES ${CWD}/src/bun.js/bindings/windows/rescle.cpp)
list(APPEND BUN_CXX_SOURCES ${CWD}/src/bun.js/bindings/windows/rescle-binding.cpp)
endif()
Expand Down
2 changes: 1 addition & 1 deletion cmake/tools/SetupWebKit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ option(WEBKIT_VERSION "The version of WebKit to use")
option(WEBKIT_LOCAL "If a local version of WebKit should be used instead of downloading")

if(NOT WEBKIT_VERSION)
set(WEBKIT_VERSION 3845bf370ff4e9a5c0b96036255142c7904be963)
set(WEBKIT_VERSION 30046aef5ec6590c74c6a696e4f01683f962a6a2)
endif()

if(WEBKIT_LOCAL)
Expand Down
8 changes: 8 additions & 0 deletions docs/guides/ecosystem/nextjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ $ bun create next-app
Creating a new Next.js app in /path/to/my-app.
```

You can specify a starter template using the `--example` flag.

```sh
$ bun create next-app --example with-supabase
✔ What is your project named? … my-app
...
```

---

To start the dev server with Bun, run `bun --bun run dev` from the project root.
Expand Down
4 changes: 2 additions & 2 deletions docs/install/lockfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ $ bun install --yarn
print = "yarn"
```

{% /codetabs %}

### Text-based lockfile

Bun v1.1.39 introduced `bun.lock`, a JSONC formatted lockfile. `bun.lock` is human-readable and git-diffable without configuration, at [no cost to performance](https://bun.sh/blog/bun-lock-text-lockfile#cached-bun-install-gets-30-faster).
Expand All @@ -90,8 +92,6 @@ Once `bun.lock` is generated, Bun will use it for all subsequent installs and up
Bun v1.2.0 will switch the default lockfile format to `bun.lock`.
{% /codetabs %}
{% details summary="Configuring lockfile" %}
```toml
Expand Down
234 changes: 0 additions & 234 deletions misctools/fetch.zig

This file was deleted.

Loading

0 comments on commit 4a93608

Please sign in to comment.