diff --git a/.buildkite/ci.mjs b/.buildkite/ci.mjs index 71eb3b5003..a51b691511 100755 --- a/.buildkite/ci.mjs +++ b/.buildkite/ci.mjs @@ -450,7 +450,7 @@ function getBuildCppStep(platform, options) { BUN_CPP_ONLY: "ON", ...getBuildEnv(platform, options), }, - // We used to build the C++ dependencies and bun in seperate steps. + // We used to build the C++ dependencies and bun in separate steps. // However, as long as the zig build takes longer than both sequentially, // it's cheaper to run them in the same step. Can be revisited in the future. command: [`${command} --target bun`, `${command} --target dependencies`], @@ -922,7 +922,7 @@ function getOptionsStep() { { key: "unified-builds", select: "Do you want to build each platform in a single step?", - hint: "If true, builds will not be split into seperate steps (this will likely slow down the build)", + hint: "If true, builds will not be split into separate steps (this will likely slow down the build)", required: false, default: "false", options: booleanOptions, @@ -930,7 +930,7 @@ function getOptionsStep() { { key: "unified-tests", select: "Do you want to run tests in a single step?", - hint: "If true, tests will not be split into seperate steps (this will be very slow)", + hint: "If true, tests will not be split into separate steps (this will be very slow)", required: false, default: "false", options: booleanOptions, diff --git a/.cursor/rules/dev-server-tests.mdc b/.cursor/rules/dev-server-tests.mdc index dfdaf41cd5..23b1ec153b 100644 --- a/.cursor/rules/dev-server-tests.mdc +++ b/.cursor/rules/dev-server-tests.mdc @@ -91,7 +91,7 @@ devTest("html file is watched", { `files` holds the initial state, and the callback runs with the server running. `dev.fetch()` runs HTTP requests, while `dev.client()` opens a browser instance to the code. -Functions `dev.write` and `dev.patch` and `dev.delete` mutate the filesystem. Do not use `node:fs` APIs, as the dev server ones are hooked to wait for hot-reload, and all connected clients to recieve changes. +Functions `dev.write` and `dev.patch` and `dev.delete` mutate the filesystem. Do not use `node:fs` APIs, as the dev server ones are hooked to wait for hot-reload, and all connected clients to receive changes. When a change performs a hard-reload, that must be explicitly annotated with `expectReload`. This tells `client-fixture.mjs` that the test is meant to reload the page once; All other hard reloads automatically fail the test. diff --git a/.cursor/rules/writing-tests.mdc b/.cursor/rules/writing-tests.mdc index 4905019005..c5ce928766 100644 --- a/.cursor/rules/writing-tests.mdc +++ b/.cursor/rules/writing-tests.mdc @@ -11,10 +11,10 @@ You'll find all of Bun's tests in the `test/` directory. * `test/` * `cli/` - CLI command tests, like `bun install` or `bun init` * `js/` - JavaScript & TypeScript tests - * `bun/` - `Bun` APIs tests, seperated by category, for example: `glob/` for `Bun.Glob` tests - * `node/` - Node.js module tests, seperated by module, for example: `assert/` for `node:assert` tests + * `bun/` - `Bun` APIs tests, separated by category, for example: `glob/` for `Bun.Glob` tests + * `node/` - Node.js module tests, separated by module, for example: `assert/` for `node:assert` tests * `test/` - Vendored Node.js tests, taken from the Node.js repository (does not conform to Bun's test style) - * `web/` - Web API tests, seperated by category, for example: `fetch/` for `Request` and `Response` tests + * `web/` - Web API tests, separated by category, for example: `fetch/` for `Request` and `Response` tests * `third_party/` - npm package tests, to validate that basic usage works in Bun * `napi/` - N-API tests * `v8/` - V8 C++ API tests diff --git a/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts b/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts index 87bdedea0c..a823de2873 100644 --- a/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts +++ b/packages/bun-debug-adapter-protocol/src/debugger/adapter.ts @@ -743,7 +743,7 @@ export abstract class BaseDebugAdapter source, request, // It is theoretically possible for a breakpoint to resolve to multiple locations. - // In that case, send a seperate `breakpoint` event for each one, excluding the first. + // In that case, send a separate `breakpoint` event for each one, excluding the first. notify: i > 0, }), ); diff --git a/packages/bun-types/bun.d.ts b/packages/bun-types/bun.d.ts index f30f4a39d8..7f9cb51183 100644 --- a/packages/bun-types/bun.d.ts +++ b/packages/bun-types/bun.d.ts @@ -6849,7 +6849,7 @@ declare module "bun" { * incoming messages, and `subprocess.send` can send messages to the subprocess. Messages are serialized * using the JSC serialize API, which allows for the same types that `postMessage`/`structuredClone` supports. * - * The subprocess can send and recieve messages by using `process.send` and `process.on("message")`, + * The subprocess can send and receive messages by using `process.send` and `process.on("message")`, * respectively. This is the same API as what Node.js exposes when `child_process.fork()` is used. * * Currently, this is only compatible with processes that are other `bun` instances. diff --git a/src/Watcher.zig b/src/Watcher.zig index a0d9b36d87..7d0d88669c 100644 --- a/src/Watcher.zig +++ b/src/Watcher.zig @@ -46,7 +46,7 @@ pub const HashType = u32; const no_watch_item: WatchItemIndex = std.math.maxInt(WatchItemIndex); /// Initializes a watcher. Each watcher is tied to some context type, which -/// recieves watch callbacks on the watcher thread. This function does not +/// receives watch callbacks on the watcher thread. This function does not /// actually start the watcher thread. /// /// const watcher = try Watcher.init(T, instance_of_t, fs, bun.default_allocator) diff --git a/src/bake/DevServer.zig b/src/bake/DevServer.zig index 449bea124d..60606afde6 100644 --- a/src/bake/DevServer.zig +++ b/src/bake/DevServer.zig @@ -112,7 +112,7 @@ watcher_atomics: WatcherAtomics, /// and bundling times, where the test harness (bake-harness.ts) would not wait /// long enough for processing to complete. Checking client logs, for example, /// not only must wait on DevServer, but also wait on all connected WebSocket -/// clients to recieve their update, but also wait for those modules +/// clients to receive their update, but also wait for those modules /// (potentially async) to finish loading. /// /// To solve the first part of this, DevServer exposes a special WebSocket @@ -133,7 +133,7 @@ testing_batch_events: union(enum) { enable_after_bundle, /// DevServer will not start new bundles, but instead write all files into /// this `TestingBatch` object. Additionally, writes into this will signal - /// a message saying that new files have been seen. Once DevServer recieves + /// a message saying that new files have been seen. Once DevServer receives /// that signal, or times out, it will "release" this batch. enabled: TestingBatch, }, diff --git a/src/bun.js/bindings/sqlite/sqlite3.c b/src/bun.js/bindings/sqlite/sqlite3.c index 3b33c91d0a..f8fb4f2d8a 100644 --- a/src/bun.js/bindings/sqlite/sqlite3.c +++ b/src/bun.js/bindings/sqlite/sqlite3.c @@ -231455,7 +231455,7 @@ static int sessionBindRow( ** iterator pIter points to to the SELECT and attempts to seek to the table ** entry. If a row is found, the SELECT statement left pointing at the row ** and SQLITE_ROW is returned. Otherwise, if no row is found and no error -** has occured, the statement is reset and SQLITE_OK is returned. If an +** has occurred, the statement is reset and SQLITE_OK is returned. If an ** error occurs, the statement is reset and an SQLite error code is returned. ** ** If this function returns SQLITE_ROW, the caller must eventually reset() diff --git a/src/bun.js/node/node_cluster_binding.zig b/src/bun.js/node/node_cluster_binding.zig index 6340e34299..9d86e05cf1 100644 --- a/src/bun.js/node/node_cluster_binding.zig +++ b/src/bun.js/node/node_cluster_binding.zig @@ -96,7 +96,7 @@ pub fn handleInternalMessageChild(globalThis: *JSC.JSGlobalObject, message: JSC. // TODO: rewrite this code. /// Queue for messages sent between parent and child processes in an IPC environment. node:cluster sends json serialized messages /// to describe different events it performs. It will send a message with an incrementing sequence number and then call a callback -/// when a message is recieved with an 'ack' property of the same sequence number. +/// when a message is received with an 'ack' property of the same sequence number. pub const InternalMsgHolder = struct { seq: i32 = 0, diff --git a/src/bundler/bundle_v2.zig b/src/bundler/bundle_v2.zig index d243ff6904..8a61f62cb5 100644 --- a/src/bundler/bundle_v2.zig +++ b/src/bundler/bundle_v2.zig @@ -14199,7 +14199,7 @@ pub const LinkerContext = struct { // ie `const { main } = class { static main() {} }` => `var {main} = class { static main() {} }` hoist.decls.append(hoist.allocator, decl.*) catch bun.outOfMemory(); } else { - // if the value cannot be moved, add every destructuring key seperately + // if the value cannot be moved, add every destructuring key separately // ie `var { append } = { append() {} }` => `var append; __esm(() => ({ append } = { append() {} }))` const binding = decl.binding.toExpr(&hoist); value = value.joinWithComma( diff --git a/src/css/css_parser.zig b/src/css/css_parser.zig index 78c1387377..b42ffc140b 100644 --- a/src/css/css_parser.zig +++ b/src/css/css_parser.zig @@ -2691,7 +2691,7 @@ pub fn NestedRuleParser(comptime T: type) type { } }; - /// If css modules is enabled, we want to record each occurence of the `composes` property + /// If css modules is enabled, we want to record each occurrence of the `composes` property /// for the bundler so we can generate the lazy JS import object later. pub fn recordComposes(this: *This, allocator: Allocator, composes: *Composes) void { for (this.composes_refs.slice()) |ref| { diff --git a/src/install/install.zig b/src/install/install.zig index 90f235f9db..ab74b8f2f2 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -5968,7 +5968,7 @@ pub const PackageManager = struct { false, ) catch |err| { const note = .{ - .fmt = "error occured while resolving {}", + .fmt = "error occurred while resolving {}", .args = .{bun.fmt.fmtPath(u8, lockfile.str(&dependency.realname()), .{ .path_sep = switch (dependency.version.tag) { .folder => .auto, diff --git a/src/install/lockfile.zig b/src/install/lockfile.zig index 44ea4af47b..c328b05263 100644 --- a/src/install/lockfile.zig +++ b/src/install/lockfile.zig @@ -137,7 +137,7 @@ pub const LoadResult = union(enum) { return if (save_text_lockfile) .text else .binary; }, .err => |err| { - // an error occured, but we still loaded from an existing lockfile + // an error occurred, but we still loaded from an existing lockfile if (options.save_text_lockfile) |save_text_lockfile| { if (save_text_lockfile) { return .text; diff --git a/src/install/patch_install.zig b/src/install/patch_install.zig index 1560290b45..da56d35d22 100644 --- a/src/install/patch_install.zig +++ b/src/install/patch_install.zig @@ -168,7 +168,7 @@ pub const PatchTask = struct { // need to switch on version.tag and handle each case appropriately const calc_hash = &this.callback.calc_hash; const hash = calc_hash.result orelse { - const fmt = "\n\nErrors occured while calculating hash for {s}:\n\n"; + const fmt = "\n\nErrors occurred while calculating hash for {s}:\n\n"; const args = .{this.callback.calc_hash.patchfile_path}; if (log_level.showProgress()) { Output.prettyWithPrinterFn(fmt, args, Progress.log, &manager.progress); diff --git a/src/patch.zig b/src/patch.zig index 7a65293ffb..7087d354ad 100644 --- a/src/patch.zig +++ b/src/patch.zig @@ -1508,7 +1508,7 @@ fn gitDiffPostprocess(stdout: *std.ArrayList(u8), old_folder: []const u8, new_fo } } -/// We need to remove occurences of "a/" and "b/" and "$old_folder/" and +/// We need to remove occurrences of "a/" and "b/" and "$old_folder/" and /// "$new_folder/" but we don't want to remove them from the actual patch /// content (maybe someone had a/$old_folder/foo.txt in the changed files). /// diff --git a/test/bundler/native_plugin.cc b/test/bundler/native_plugin.cc index 3eda64af5a..5040bd33d5 100644 --- a/test/bundler/native_plugin.cc +++ b/test/bundler/native_plugin.cc @@ -1,8 +1,8 @@ /* - Dummy plugin which counts the occurences of the word "foo" in the source code, + Dummy plugin which counts the occurrences of the word "foo" in the source code, replacing it with "boo". - It stores the number of occurences in the External struct. + It stores the number of occurrences in the External struct. */ #include #include diff --git a/test/cli/install/bun-add.test.ts b/test/cli/install/bun-add.test.ts index 7745c98e3e..6587d1e0f1 100644 --- a/test/cli/install/bun-add.test.ts +++ b/test/cli/install/bun-add.test.ts @@ -112,7 +112,7 @@ it("should reject missing package", async () => { }); const err = await new Response(stderr).text(); expect(err).toContain("error: MissingPackageJSON"); - expect(err).toContain(`note: error occured while resolving file:${add_path}`); + expect(err).toContain(`note: error occurred while resolving file:${add_path}`); const out = await new Response(stdout).text(); expect(out).toEqual(expect.stringContaining("bun add v1.")); diff --git a/test/js/third_party/grpc-js/test-server.test.ts b/test/js/third_party/grpc-js/test-server.test.ts index 573a8a084e..e1dd4c2933 100644 --- a/test/js/third_party/grpc-js/test-server.test.ts +++ b/test/js/third_party/grpc-js/test-server.test.ts @@ -659,7 +659,7 @@ describe("Echo service", () => { server.forceShutdown(); }); - it("should echo the recieved message directly", done => { + it("should echo the received message directly", done => { client.echo({ value: "test value", value2: 3 }, (error: ServiceError, response: any) => { assert.ifError(error); assert.deepStrictEqual(response, { value: "test value", value2: 3 });