bun 1.2.16 → 1.2.17-canary.20250621.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/bin/bunx.exe +0 -0
  2. package/install.js +24 -3
  3. package/package.json +13 -13
package/bin/bunx.exe ADDED
File without changes
package/install.js CHANGED
@@ -213,6 +213,17 @@ function chmod(path2, mode) {
213
213
  debug("chmod", path2, mode), import_fs.default.chmodSync(path2, mode);
214
214
  }
215
215
  __name(chmod, "chmod");
216
+ function copy(path2, newPath) {
217
+ debug("copy", path2, newPath);
218
+ try {
219
+ import_fs.default.copyFileSync(path2, newPath);
220
+ return;
221
+ } catch (error2) {
222
+ debug("fs.copyFileSync failed", error2);
223
+ }
224
+ write(newPath, read(path2));
225
+ }
226
+ __name(copy, "copy");
216
227
  function exists(path2) {
217
228
  debug("exists", path2);
218
229
  try {
@@ -223,6 +234,16 @@ function exists(path2) {
223
234
  return !1;
224
235
  }
225
236
  __name(exists, "exists");
237
+ function link(path2, newPath) {
238
+ debug("link", path2, newPath);
239
+ try {
240
+ import_fs.default.unlinkSync(newPath), import_fs.default.linkSync(path2, newPath);
241
+ return;
242
+ } catch (error2) {
243
+ copy(path2, newPath), debug("fs.linkSync failed, reverting to copy", error2);
244
+ }
245
+ }
246
+ __name(link, "link");
226
247
 
227
248
  // src/spawn.ts
228
249
  var import_child_process = __toESM(require("child_process"));
@@ -418,7 +439,7 @@ function installBun(platform, dst) {
418
439
  write(join(cwd, "package.json"), "{}");
419
440
  let { exitCode } = spawn(
420
441
  "npm",
421
- ["install", "--loglevel=error", "--prefer-offline", "--no-audit", "--progress=false", `${module2}@1.2.16`],
442
+ ["install", "--loglevel=error", "--prefer-offline", "--no-audit", "--progress=false", `${module2}@1.2.17-canary.20250621.1+29dd416`],
422
443
  {
423
444
  cwd,
424
445
  stdio: "pipe",
@@ -439,7 +460,7 @@ function installBun(platform, dst) {
439
460
  __name(installBun, "installBun");
440
461
  function downloadBun(platform, dst) {
441
462
  return __async(this, null, function* () {
442
- let tgz = yield (yield fetch(`https://registry.npmjs.org/@oven/${platform.bin}/-/${platform.bin}-1.2.16.tgz`)).arrayBuffer(), buffer;
463
+ let tgz = yield (yield fetch(`https://registry.npmjs.org/@oven/${platform.bin}/-/${platform.bin}-1.2.17-canary.20250621.1+29dd416.tgz`)).arrayBuffer(), buffer;
443
464
  try {
444
465
  buffer = (0, import_zlib.unzipSync)(tgz);
445
466
  } catch (cause) {
@@ -468,7 +489,7 @@ __name(downloadBun, "downloadBun");
468
489
  function optimizeBun(path2) {
469
490
  let installScript = os2 === "win32" ? 'powershell -c "irm bun.sh/install.ps1 | iex"' : "curl -fsSL https://bun.sh/install | bash";
470
491
  try {
471
- rename(path2, join(__dirname, "bin", "bun.exe"));
492
+ rename(path2, join(__dirname, "bin", "bun.exe")), link(join(__dirname, "bin", "bun.exe"), join(__dirname, "bin", "bunx.exe"));
472
493
  return;
473
494
  } catch (error2) {
474
495
  debug("optimizeBun failed", error2);
package/package.json CHANGED
@@ -1,26 +1,26 @@
1
1
  {
2
2
  "name": "bun",
3
3
  "description": "Bun is a fast all-in-one JavaScript runtime.",
4
- "version": "1.2.16",
4
+ "version": "1.2.17-canary.20250621.1+29dd416",
5
5
  "scripts": {
6
6
  "postinstall": "node install.js"
7
7
  },
8
8
  "optionalDependencies": {
9
- "@oven/bun-darwin-aarch64": "1.2.16",
10
- "@oven/bun-darwin-x64": "1.2.16",
11
- "@oven/bun-darwin-x64-baseline": "1.2.16",
12
- "@oven/bun-linux-aarch64": "1.2.16",
13
- "@oven/bun-linux-x64": "1.2.16",
14
- "@oven/bun-linux-x64-baseline": "1.2.16",
15
- "@oven/bun-linux-aarch64-musl": "1.2.16",
16
- "@oven/bun-linux-x64-musl": "1.2.16",
17
- "@oven/bun-linux-x64-musl-baseline": "1.2.16",
18
- "@oven/bun-windows-x64": "1.2.16",
19
- "@oven/bun-windows-x64-baseline": "1.2.16"
9
+ "@oven/bun-darwin-aarch64": "1.2.17-canary.20250621.1+29dd416",
10
+ "@oven/bun-darwin-x64": "1.2.17-canary.20250621.1+29dd416",
11
+ "@oven/bun-darwin-x64-baseline": "1.2.17-canary.20250621.1+29dd416",
12
+ "@oven/bun-linux-aarch64": "1.2.17-canary.20250621.1+29dd416",
13
+ "@oven/bun-linux-x64": "1.2.17-canary.20250621.1+29dd416",
14
+ "@oven/bun-linux-x64-baseline": "1.2.17-canary.20250621.1+29dd416",
15
+ "@oven/bun-linux-aarch64-musl": "1.2.17-canary.20250621.1+29dd416",
16
+ "@oven/bun-linux-x64-musl": "1.2.17-canary.20250621.1+29dd416",
17
+ "@oven/bun-linux-x64-musl-baseline": "1.2.17-canary.20250621.1+29dd416",
18
+ "@oven/bun-windows-x64": "1.2.17-canary.20250621.1+29dd416",
19
+ "@oven/bun-windows-x64-baseline": "1.2.17-canary.20250621.1+29dd416"
20
20
  },
21
21
  "bin": {
22
22
  "bun": "bin/bun.exe",
23
- "bunx": "bin/bun.exe"
23
+ "bunx": "bin/bunx.exe"
24
24
  },
25
25
  "os": [
26
26
  "darwin",