From 431da834fc10b84975180f9bb3a545886a5d86f6 Mon Sep 17 00:00:00 2001 From: RiskyMH <56214343+RiskyMH@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:53:02 +1100 Subject: [PATCH 1/3] adapter-auto and bun --- packages/adapter-auto/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/adapter-auto/index.js b/packages/adapter-auto/index.js index 1519169f7d5e..cc1c676ffb80 100644 --- a/packages/adapter-auto/index.js +++ b/packages/adapter-auto/index.js @@ -10,7 +10,8 @@ import process from 'node:process'; const commands = { npm: (name, version) => `npm install -D ${name}@${version}`, pnpm: (name, version) => `pnpm add -D ${name}@${version}`, - yarn: (name, version) => `yarn add -D ${name}@${version}` + yarn: (name, version) => `yarn add -D ${name}@${version}`, + bun: (name, version) => `bun add -D ${name}@${version}` }; function detect_lockfile() { @@ -20,6 +21,7 @@ function detect_lockfile() { if (existsSync(join(dir, 'pnpm-lock.yaml'))) return 'pnpm'; if (existsSync(join(dir, 'yarn.lock'))) return 'yarn'; if (existsSync(join(dir, 'package-lock.json'))) return 'npm'; + if (existsSync(join(dir, 'bun.lockb')) || existsSync(join(dir, 'bun.lock'))) return 'bun'; } while (dir !== (dir = dirname(dir))); return 'npm'; From cbdf3d4609d2d3419d043f875e944ec6c1d8f322 Mon Sep 17 00:00:00 2001 From: RiskyMH <56214343+RiskyMH@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:05:55 +1100 Subject: [PATCH 2/3] changeset --- .changeset/serious-geckos-itch.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/serious-geckos-itch.md diff --git a/.changeset/serious-geckos-itch.md b/.changeset/serious-geckos-itch.md new file mode 100644 index 000000000000..a7c0348e92b0 --- /dev/null +++ b/.changeset/serious-geckos-itch.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/adapter-auto': minor +--- + +feat: adds support for Bun package manager From 937c7e9e8541823672b640f71fb07c52fe0cd33f Mon Sep 17 00:00:00 2001 From: Michael H Date: Tue, 22 Oct 2024 14:25:56 +1100 Subject: [PATCH 3/3] Update .changeset/serious-geckos-itch.md Co-authored-by: Tee Ming --- .changeset/serious-geckos-itch.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/serious-geckos-itch.md b/.changeset/serious-geckos-itch.md index a7c0348e92b0..0b040737c534 100644 --- a/.changeset/serious-geckos-itch.md +++ b/.changeset/serious-geckos-itch.md @@ -2,4 +2,4 @@ '@sveltejs/adapter-auto': minor --- -feat: adds support for Bun package manager +feat: add support for Bun package manager