Skip to content

Commit

Permalink
dfshaj
Browse files Browse the repository at this point in the history
  • Loading branch information
paperdave committed Sep 7, 2023
1 parent 9982268 commit 1a82354
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/cli.zig
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ pub const HelpCommand = struct {
"@evan/duckdb",
"@zarfjs/zarf",
"zod",
"tailwindcss",
};

pub const packages_to_x_filler = [_]string{
Expand All @@ -869,13 +870,16 @@ pub const HelpCommand = struct {
"vite",
"prisma",
"nuxi",
"prettier",
"eslint",
};

pub const packages_to_create_filler = [_]string{
"next-app",
"vite",
"astro",
"svelte",
"elysia",
};

pub fn printWithReason(comptime reason: Reason) void {
Expand All @@ -884,6 +888,7 @@ pub const HelpCommand = struct {
\\ <b><magenta>run<r> <d>./my-script.ts<r> Run JavaScript with Bun, a package.json script, or a bin
\\ <b><magenta>test<r> Run unit tests with Bun
\\ <b><magenta>x<r> <d>{s:<16}<r> Install and execute a package bin <d>(bunx)<r>
// \\ <b><magenta>repl<r> Start a REPL session with Bun
\\
\\ <b><cyan>init<r> Start an empty Bun project from a blank template
\\ <b><cyan>create<r> <d>{s:<16}<r> Create a new project from a template <d>(bun c)<r>
Expand Down Expand Up @@ -918,8 +923,8 @@ pub const HelpCommand = struct {
packages_to_x_filler[package_x_i],
packages_to_create_filler[package_create_i],
packages_to_add_filler[package_add_i],
packages_to_add_filler[(package_add_i + 1) % packages_to_add_filler.len],
packages_to_remove_filler[package_remove_i],
packages_to_add_filler[(package_add_i + 1) % packages_to_add_filler.len],
};

switch (reason) {
Expand Down
2 changes: 1 addition & 1 deletion src/cli/package_manager_command.zig
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ pub const PackageManagerCommand = struct {
\\ bun pm <b>cache<r> print the path to the cache folder
\\ bun pm <b>cache rm<r> clear the cache
\\
\\Learn more about these at https://bun.sh/docs/install/utilities
\\Learn more about these at <magenta>https://bun.sh/docs/install/utilities<r>
\\
, .{});

Expand Down
6 changes: 5 additions & 1 deletion test/js/node/fs/fs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,11 @@ it("BigIntStats", () => {
it("test syscall errno, issue#4198", () => {
const path = `${tmpdir()}/non-existent-${Date.now()}.txt`;
expect(() => openSync(path, "r")).toThrow("No such file or directory");
expect(() => readSync(2147483640, Buffer.alloc(0))).toThrow("EBADF");
if (process.platform == "darwin") {
expect(() => readSync(2147483640, Buffer.alloc(0))).toThrow("Bad file descriptor");
} else {
expect(() => readSync(2147483640, Buffer.alloc(0))).toThrow("Bad file number");
}
expect(() => readlinkSync(path)).toThrow("No such file or directory");
expect(() => realpathSync(path)).toThrow("No such file or directory");
expect(() => readFileSync(path)).toThrow("No such file or directory");
Expand Down

0 comments on commit 1a82354

Please sign in to comment.