diff --git a/docs/api/sqlite.md b/docs/api/sqlite.md index e04b8ded72..3749fb8b4c 100644 --- a/docs/api/sqlite.md +++ b/docs/api/sqlite.md @@ -99,6 +99,20 @@ const query = db.prepare("SELECT * FROM foo WHERE bar = ?"); {% /callout %} +## WAL mode + +SQLite supports [write-ahead log mode](https://www.sqlite.org/wal.html) (WAL) which dramatically improves performance, especially in situations with many concurrent writes. It's broadly recommended to enable WAL mode for most typical applications. + +To enable WAL mode, run this pragma query at the beginning of your application: + +```ts +db.exec("PRAGMA journal_mode = WAL;"); +``` + +{% details summary="What is WAL mode" %} +In WAL mode, writes to the database are written directly to a separate file called the "WAL file" (write-ahead log). This file will be later integrated into the main database file. Think of it as a buffer for pending writes. Refer to the [SQLite docs](https://www.sqlite.org/wal.html) for a more detailed overview. +{% /details %} + ## Statements A `Statement` is a _prepared query_, which means it's been parsed and compiled into an efficient binary form. It can be executed multiple times in a performant way. diff --git a/docs/quickstart.md b/docs/quickstart.md index c71c3c50ff..ae7fc60873 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -42,9 +42,6 @@ const server = Bun.serve({ console.log(`Listening on http://localhost:${server.port} ...`); ``` - +``` Run the file from your shell. diff --git a/docs/runtime/nodejs-apis.md b/docs/runtime/nodejs-apis.md index ca4027084e..5c6b858da2 100644 --- a/docs/runtime/nodejs-apis.md +++ b/docs/runtime/nodejs-apis.md @@ -168,261 +168,6 @@ This page is updated regularly to reflect compatibility status of the latest ver 🟡 Missing `zlib.brotli*`. Has not been optimized. - - ## Globals The table below lists all globals implemented by Node.js and Bun's current compatibility status. @@ -702,421 +447,3 @@ The table below lists all globals implemented by Node.js and Bun's current compa ### [`WritableStreamDefaultWriter`](https://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultWriter) 🟢 Fully implemented. - - diff --git a/docs/test/writing.md b/docs/test/writing.md index 3514ae4e99..b8b0118f7f 100644 --- a/docs/test/writing.md +++ b/docs/test/writing.md @@ -168,252 +168,252 @@ Bun implements the following matchers. Full Jest compatibility is on the roadmap --- -- ✔️ +- ✅ - [`.not`](https://jestjs.io/docs/expect#not) --- -- ✔️ +- ✅ - [`.toBe()`](https://jestjs.io/docs/expect#tobevalue) --- -- ✔️ +- ✅ - [`.toEqual()`](https://jestjs.io/docs/expect#toequalvalue) --- -- ✔️ +- ✅ - [`.toBeNull()`](https://jestjs.io/docs/expect#tobenull) --- -- ✔️ +- ✅ - [`.toBeUndefined()`](https://jestjs.io/docs/expect#tobeundefined) --- -- ✔️ +- ✅ - [`.toBeNaN()`](https://jestjs.io/docs/expect#tobenan) --- -- ✔️ +- ✅ - [`.toBeDefined()`](https://jestjs.io/docs/expect#tobedefined) --- -- ✔️ +- ✅ - [`.toBeFalsy()`](https://jestjs.io/docs/expect#tobefalsy) --- -- ✔️ +- ✅ - [`.toBeTruthy()`](https://jestjs.io/docs/expect#tobetruthy) --- -- ✔️ +- ✅ - [`.toContain()`](https://jestjs.io/docs/expect#tocontainitem) --- -- ✔️ +- ✅ - [`.toStrictEqual()`](https://jestjs.io/docs/expect#tostrictequalvalue) --- -- ✔️ +- ✅ - [`.toThrow()`](https://jestjs.io/docs/expect#tothrowerror) --- -- ✔️ +- ✅ - [`.toHaveLength()`](https://jestjs.io/docs/expect#tohavelengthnumber) --- -- ✔️ +- ✅ - [`.toHaveProperty()`](https://jestjs.io/docs/expect#tohavepropertykeypath-value) --- -- ✖️ +- ❌ - [`.extend`](https://jestjs.io/docs/expect#expectextendmatchers) --- -- ✔️ +- ✅ - [`.anything()`](https://jestjs.io/docs/expect#expectanything) --- -- ✔️ +- ✅ - [`.any()`](https://jestjs.io/docs/expect#expectanyconstructor) --- -- ✖️ +- ❌ - [`.arrayContaining()`](https://jestjs.io/docs/expect#expectarraycontainingarray) --- -- ✖️ +- ❌ - [`.assertions()`](https://jestjs.io/docs/expect#expectassertionsnumber) --- -- ✖️ +- ❌ - [`.closeTo()`](https://jestjs.io/docs/expect#expectclosetonumber-numdigits) --- -- ✖️ +- ❌ - [`.hasAssertions()`](https://jestjs.io/docs/expect#expecthasassertions) --- -- ✖️ +- ❌ - [`.objectContaining()`](https://jestjs.io/docs/expect#expectobjectcontainingobject) --- -- ✔️ +- ✅ - [`.stringContaining()`](https://jestjs.io/docs/expect#expectstringcontainingstring) --- -- ✔️ +- ✅ - [`.stringMatching()`](https://jestjs.io/docs/expect#expectstringmatchingstring--regexp) --- -- ✖️ +- ❌ - [`.addSnapshotSerializer()`](https://jestjs.io/docs/expect#expectaddsnapshotserializerserializer) --- -- ✔️ +- ✅ - [`.resolves()`](https://jestjs.io/docs/expect#resolves) --- -- ✔️ +- ✅ - [`.rejects()`](https://jestjs.io/docs/expect#rejects) --- -- ✔️ +- ✅ - [`.toHaveBeenCalled()`](https://jestjs.io/docs/expect#tohavebeencalled) --- -- ✔️ +- ✅ - [`.toHaveBeenCalledTimes()`](https://jestjs.io/docs/expect#tohavebeencalledtimesnumber) --- -- ✖️ +- ❌ - [`.toHaveBeenCalledWith()`](https://jestjs.io/docs/expect#tohavebeencalledwitharg1-arg2-) --- -- ✖️ +- ❌ - [`.toHaveBeenLastCalledWith()`](https://jestjs.io/docs/expect#tohavebeenlastcalledwitharg1-arg2-) --- -- ✖️ +- ❌ - [`.toHaveBeenNthCalledWith()`](https://jestjs.io/docs/expect#tohavebeennthcalledwithnthcall-arg1-arg2-) --- -- ✖️ +- ❌ - [`.toHaveReturned()`](https://jestjs.io/docs/expect#tohavereturned) --- -- ✖️ +- ❌ - [`.toHaveReturnedTimes()`](https://jestjs.io/docs/expect#tohavereturnedtimesnumber) --- -- ✖️ +- ❌ - [`.toHaveReturnedWith()`](https://jestjs.io/docs/expect#tohavereturnedwithvalue) --- -- ✖️ +- ❌ - [`.toHaveLastReturnedWith()`](https://jestjs.io/docs/expect#tohavelastreturnedwithvalue) --- -- ✖️ +- ❌ - [`.toHaveNthReturnedWith()`](https://jestjs.io/docs/expect#tohaventhreturnedwithnthcall-value) --- -- ✔️ +- ✅ - [`.toBeCloseTo()`](https://jestjs.io/docs/expect#tobeclosetonumber-numdigits) --- -- ✔️ +- ✅ - [`.toBeGreaterThan()`](https://jestjs.io/docs/expect#tobegreaterthannumber--bigint) --- -- ✔️ +- ✅ - [`.toBeGreaterThanOrEqual()`](https://jestjs.io/docs/expect#tobegreaterthanorequalnumber--bigint) --- -- ✔️ +- ✅ - [`.toBeLessThan()`](https://jestjs.io/docs/expect#tobelessthannumber--bigint) --- -- ✔️ +- ✅ - [`.toBeLessThanOrEqual()`](https://jestjs.io/docs/expect#tobelessthanorequalnumber--bigint) --- -- ✔️ +- ✅ - [`.toBeInstanceOf()`](https://jestjs.io/docs/expect#tobeinstanceofclass) --- -- ✖️ +- ❌ - [`.toContainEqual()`](https://jestjs.io/docs/expect#tocontainequalitem) --- -- ✔️ +- ✅ - [`.toMatch()`](https://jestjs.io/docs/expect#tomatchregexp--string) --- -- ✔️ +- ✅ - [`.toMatchObject()`](https://jestjs.io/docs/expect#tomatchobjectobject) --- -- ✔️ +- ✅ - [`.toMatchSnapshot()`](https://jestjs.io/docs/expect#tomatchsnapshotpropertymatchers-hint) --- -- ✖️ +- ❌ - [`.toMatchInlineSnapshot()`](https://jestjs.io/docs/expect#tomatchinlinesnapshotpropertymatchers-inlinesnapshot) --- -- ✖️ +- ❌ - [`.toThrowErrorMatchingSnapshot()`](https://jestjs.io/docs/expect#tothrowerrormatchingsnapshothint) --- -- ✖️ +- ❌ - [`.toThrowErrorMatchingInlineSnapshot()`](https://jestjs.io/docs/expect#tothrowerrormatchinginlinesnapshotinlinesnapshot) {% /table %}