bunup 0.9.0 → 0.9.2

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.
package/README.md CHANGED
@@ -6,31 +6,29 @@
6
6
 
7
7
  <!-- markdownlint-disable-next-line no-alt-text -->
8
8
 
9
+
9
10
  ![Logo](https://raw.githubusercontent.com/arshad-yaseen/bunup/refs/heads/main/docs/public/logo.svg)
10
11
 
11
12
  ![Bunup](https://raw.githubusercontent.com/arshad-yaseen/bunup/refs/heads/main/assets/bunup-title.svg)
12
13
 
13
- [![NPM Downloads](https://img.shields.io/npm/dm/bunup?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTMyMCAyODAtNTIwbDU2LTU4IDEwNCAxMDR2LTMyNmg4MHYzMjZsMTA0LTEwNCA1NiA1OC0yMDAgMjAwWk0xNjAtMTYwdi0yMDBoODB2MTIwaDQ4MHYtMTIwaDgwdjIwMEgxNjBaIi8%2BPC9zdmc%2B&labelColor=ffc44e&color=212121)](https://www.npmjs.com/package/bunup) [![NPM Version](https://img.shields.io/npm/v/bunup?logo=npm&logoColor=212121&label=version&labelColor=ffc44e&color=212121)](https://npmjs.com/package/bunup) [![Built with Bun](https://img.shields.io/badge/Built_with-Bun-fbf0df?logo=bun&labelColor=212121)](https://bun.sh) [![sponsor](https://img.shields.io/badge/sponsor-EA4AAA?logo=githubsponsors&labelColor=FAFAFA)](https://github.com/sponsors/arshad-yaseen)
14
+ [![NPM Version](https://img.shields.io/npm/v/bunup?logo=npm&logoColor=212121&label=version&labelColor=ffc44e&color=212121)](https://npmjs.com/package/bunup) [![Built with Bun](https://img.shields.io/badge/Built_with-Bun-fbf0df?logo=bun&labelColor=212121)](https://bun.sh) [![sponsor](https://img.shields.io/badge/sponsor-EA4AAA?logo=githubsponsors&labelColor=FAFAFA)](https://github.com/sponsors/arshad-yaseen)
14
15
 
15
16
  Bunup is the **blazing-fast build tool** for TypeScript libraries, designed for flawless developer experience and speed, **powered by Bun**.
16
17
 
17
- ![Bunup benchmarks](/assets/benchmarks.png)
18
-
19
- *For detailed information on the benchmark, visit [here](https://gugustinette.github.io/bundler-benchmark/)*
20
-
21
18
  </div>
22
19
  <!-- markdownlint-restore -->
23
20
 
24
- ## Key Features
21
+ ## Features
25
22
 
26
- - ⚡ **Blazing Fast**: Lightning-quick builds and instant rebuilds.
27
- - 📝 **Best-in-Class TypeScript Declarations**: Clean, minimal and accurate `.d.ts` files generated automatically.
23
+ - ⚡ **Blazing Fast**: Lightning-fast builds and instant rebuilds.
24
+ - 📝 **Top-Notch TypeScript Declarations**: Clean, minimal, accurate `.d.ts` files generated automatically.
28
25
  - 📦 **ESM by Default**: Modern ESM output by default.
29
- - 🪓 **Declaration Splitting**: Split shared types for smaller and clean declaration bundles.
30
- - 🔋 **Batteries Included**: Auto-generate package exports, detect unused dependencies and exports, and more.
31
- - 🚀 **Zero-Config Simplicity**: Preconfigured for productivity—just write code and build.
32
- - 📦 **[Workspace](https://bunup.dev/docs/guide/workspaces) Ready**: Build multiple packages from a single config and command.
33
- - 🔄 **Tsup-Compatible**: Familiar CLI and config for easy migration from tsup.
26
+ - 🪓 **Declaration Splitting**: Splits shared types for smaller, cleaner declaration bundles.
27
+ - 🔥 **Declaration Minification**: Aggressively minifies and shortens type names while preserving public API—like code bundling for TypeScript declarations.
28
+ - 🔋 **Batteries Included**: Auto-generates package exports, detects unused dependencies and exports, and more.
29
+ - 🚀 **Zero-Config Simplicity**: Preconfigured for productivity—just code and build.
30
+ - 🏗️ **[Workspace](https://bunup.dev/docs/guide/workspaces) Ready**: Builds multiple packages from one config and command.
31
+ - 🔄 **Tsup Familiarity**: Familiar CLI and config for easy migration from tsup.
34
32
 
35
33
  ## 📚 Documentation
36
34
 
@@ -41,3 +39,10 @@ To get started, visit the [documentation](https://bunup.dev).
41
39
  For guidelines on contributing, please read the [contributing guide](../../CONTRIBUTING.md).
42
40
 
43
41
  We welcome contributions from the community to enhance Bunup's capabilities and make it even more powerful.
42
+
43
+ ![Sponsors](https://cdn.jsdelivr.net/gh/arshad-yaseen/static/sponsors.svg)
44
+
45
+ <div align="center">
46
+
47
+ ![______ 🐈‍⬛ _____________](assets/cat-footer.svg)
48
+ </div>
package/dist/cli/index.js CHANGED
@@ -3,8 +3,8 @@
3
3
  import {
4
4
  build,
5
5
  createBuildOptions
6
- } from "../shared/chunk-388r1g46.js";
7
- import"../shared/chunk-ge1jevhp.js";
6
+ } from "../shared/chunk-rvksjvnx.js";
7
+ import"../shared/chunk-ab3kjqce.js";
8
8
  import {
9
9
  processLoadedConfigs
10
10
  } from "../shared/chunk-295440tx.js";
@@ -21,14 +21,13 @@ import {
21
21
  logger,
22
22
  parseErrorMessage,
23
23
  setSilent
24
- } from "../shared/chunk-hb0esw52.js";
24
+ } from "../shared/chunk-xfc23vg1.js";
25
25
 
26
26
  // src/cli/index.ts
27
27
  import { loadConfig } from "coffi";
28
28
  import pc3 from "picocolors";
29
- import { exec } from "tinyexec";
30
29
  // package.json
31
- var version = "0.9.0";
30
+ var version = "0.9.2";
32
31
 
33
32
  // src/watch.ts
34
33
  import path from "path";
@@ -325,13 +324,6 @@ var OPTION_DEFINITIONS = {
325
324
  type: "string",
326
325
  category: "build"
327
326
  },
328
- onSuccess: {
329
- flags: ["onSuccess"],
330
- handler: handlers.string("onSuccess"),
331
- description: "Command to execute after a successful build",
332
- type: "string",
333
- category: "development"
334
- },
335
327
  filter: {
336
328
  flags: ["filter"],
337
329
  handler: handlers.array("filter"),
@@ -367,6 +359,13 @@ var OPTION_DEFINITIONS = {
367
359
  type: "string|boolean",
368
360
  category: "development"
369
361
  },
362
+ onSuccess: {
363
+ flags: ["onSuccess"],
364
+ handler: handlers.string("onSuccess"),
365
+ description: "Command to run after the build process completes",
366
+ type: "string",
367
+ category: "utility"
368
+ },
370
369
  help: {
371
370
  flags: ["h", "help"],
372
371
  handler: handlers.showHelp,
@@ -482,12 +481,12 @@ var parseCliOptions = (argv) => {
482
481
  async function main(args = Bun.argv.slice(2)) {
483
482
  const cliOptions = parseCliOptions(args);
484
483
  if (cliOptions.new) {
485
- const { newProject } = await import("../shared/chunk-cdrh2sea.js");
484
+ const { newProject } = await import("../shared/chunk-mwk1z7nf.js");
486
485
  await newProject();
487
486
  return;
488
487
  }
489
488
  if (cliOptions.init) {
490
- const { init } = await import("../shared/chunk-gc7rjej4.js");
489
+ const { init } = await import("../shared/chunk-v8c39y5z.js");
491
490
  await init();
492
491
  return;
493
492
  }
@@ -534,14 +533,6 @@ async function main(args = Bun.argv.slice(2)) {
534
533
  verticalSpace: true
535
534
  });
536
535
  }
537
- if (cliOptions.onSuccess) {
538
- logger.info(`Running command: ${cliOptions.onSuccess}`, {
539
- muted: true
540
- });
541
- await exec(cliOptions.onSuccess, [], {
542
- nodeOptions: { shell: true, stdio: "inherit" }
543
- });
544
- }
545
536
  if (!cliOptions.watch) {
546
537
  process.exit(process.exitCode ?? 0);
547
538
  }
@@ -549,7 +540,6 @@ async function main(args = Bun.argv.slice(2)) {
549
540
  function removeCliOnlyOptions(options) {
550
541
  return {
551
542
  ...options,
552
- onSuccess: undefined,
553
543
  config: undefined,
554
544
  filter: undefined,
555
545
  new: undefined,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Arrayable, BuildOptions, DefineConfigItem, DefineWorkspaceItem, Plugin, WithOptional } from "./shared/chunk-95p7cdc9";
1
+ import { Arrayable, BuildOptions, DefineConfigItem, DefineWorkspaceItem, Plugin, WithOptional } from "./shared/chunk-wpey1xte";
2
2
  declare function build(partialOptions: Partial<BuildOptions>, rootDir?: string): Promise<void>;
3
3
  declare function defineConfig(options: Arrayable<DefineConfigItem>): Arrayable<DefineConfigItem>;
4
4
  declare function defineWorkspace(options: WithOptional<DefineWorkspaceItem, "config">[], sharedOptions?: DefineConfigItem): DefineWorkspaceItem[];
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  build
4
- } from "./shared/chunk-388r1g46.js";
5
- import"./shared/chunk-ge1jevhp.js";
4
+ } from "./shared/chunk-rvksjvnx.js";
5
+ import"./shared/chunk-ab3kjqce.js";
6
6
  import"./shared/chunk-295440tx.js";
7
- import"./shared/chunk-hb0esw52.js";
7
+ import"./shared/chunk-xfc23vg1.js";
8
8
  // src/define.ts
9
9
  function defineConfig(options) {
10
10
  return options;
package/dist/plugins.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BuildContext, BunupPlugin, MaybePromise, Plugin } from "./shared/chunk-95p7cdc9";
1
+ import { BuildContext, BunupPlugin, MaybePromise, Plugin } from "./shared/chunk-wpey1xte";
2
2
  /**
3
3
  * A plugin that copies files and directories to the output directory.
4
4
  *
package/dist/plugins.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  getPackageForPlugin
4
- } from "./shared/chunk-ge1jevhp.js";
4
+ } from "./shared/chunk-ab3kjqce.js";
5
5
  import {
6
6
  CSS_RE,
7
7
  JS_DTS_RE,
@@ -10,7 +10,7 @@ import {
10
10
  formatListWithAnd,
11
11
  isDirectoryPath,
12
12
  logger
13
- } from "./shared/chunk-hb0esw52.js";
13
+ } from "./shared/chunk-xfc23vg1.js";
14
14
 
15
15
  // src/plugins/built-in/copy.ts
16
16
  import { basename, join } from "path";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BunupPluginError
3
- } from "./chunk-hb0esw52.js";
3
+ } from "./chunk-xfc23vg1.js";
4
4
 
5
5
  // src/plugins/utils.ts
6
6
  import pc from "picocolors";
@@ -1,11 +1,11 @@
1
1
  // @bun
2
2
  import {
3
3
  displayBunupGradientArt
4
- } from "./chunk-29mdzdnt.js";
4
+ } from "./chunk-tcevarkq.js";
5
5
  import {
6
6
  link,
7
7
  pathExistsSync
8
- } from "./chunk-hb0esw52.js";
8
+ } from "./chunk-xfc23vg1.js";
9
9
 
10
10
  // src/cli/new.ts
11
11
  import { renameSync } from "fs";
@@ -32,7 +32,7 @@ var TEMPLATES = [
32
32
  {
33
33
  type: "typescript",
34
34
  defaultName: "my-ts-lib",
35
- name: "Typescript Library",
35
+ name: "TypeScript Library",
36
36
  dir: "ts-lib",
37
37
  monorepoDir: "ts-lib-monorepo"
38
38
  },
@@ -143,7 +143,7 @@ async function newProject() {
143
143
  ${pc.cyan("bun run dev")}${pc.dim(" (watch mode for development)")}${template.type === "react" ? `
144
144
  ${pc.cyan("bun run dev:test")} ${pc.dim("(preview components in a test Next.js app)")} ` : ""}
145
145
 
146
- ${pc.dim("Learn more:")} ${link("https://bunup.dev/docs")}
146
+ ${pc.dim("Learn more:")} ${link("https://bunup.dev/")}
147
147
 
148
148
  ${pc.yellow("Happy coding!")} \uD83D\uDE80
149
149
  `);
@@ -3,7 +3,7 @@ import {
3
3
  filterBunupPlugins,
4
4
  runPluginBuildDoneHooks,
5
5
  runPluginBuildStartHooks
6
- } from "./chunk-ge1jevhp.js";
6
+ } from "./chunk-ab3kjqce.js";
7
7
  import {
8
8
  loadPackageJson
9
9
  } from "./chunk-295440tx.js";
@@ -25,13 +25,52 @@ import {
25
25
  parseErrorMessage,
26
26
  setSilent,
27
27
  silent
28
- } from "./chunk-hb0esw52.js";
28
+ } from "./chunk-xfc23vg1.js";
29
29
 
30
30
  // src/build.ts
31
31
  import path from "path";
32
32
  import pc2 from "picocolors";
33
33
  import { generateDts, logIsolatedDeclarationErrors } from "typeroll";
34
34
 
35
+ // src/helpers/on-success.ts
36
+ import { exec } from "tinyexec";
37
+ import treeKill from "tree-kill";
38
+ async function executeOnSuccess(onSuccess, options, signal) {
39
+ if (typeof onSuccess === "function") {
40
+ const result = await onSuccess(options);
41
+ if (typeof result === "function") {
42
+ signal.addEventListener("abort", () => {
43
+ result();
44
+ });
45
+ }
46
+ } else {
47
+ const command = typeof onSuccess === "string" ? onSuccess : onSuccess.cmd;
48
+ const spawnOptions = typeof onSuccess === "object" && "options" in onSuccess ? onSuccess.options : {};
49
+ logger.info(`Running command: ${command}`, {
50
+ muted: true
51
+ });
52
+ const proc = exec(command, [], {
53
+ timeout: spawnOptions?.timeout,
54
+ nodeOptions: {
55
+ shell: true,
56
+ stdio: "inherit",
57
+ env: spawnOptions?.env,
58
+ cwd: spawnOptions?.cwd
59
+ }
60
+ });
61
+ proc.then(({ exitCode }) => {
62
+ if (exitCode) {
63
+ process.exitCode = exitCode;
64
+ }
65
+ });
66
+ signal.addEventListener("abort", () => {
67
+ if (typeof proc.pid === "number") {
68
+ treeKill(proc.pid, spawnOptions?.killSignal ?? "SIGTERM");
69
+ }
70
+ });
71
+ }
72
+ }
73
+
35
74
  // src/plugins/internal/report.ts
36
75
  import pc from "picocolors";
37
76
  function report() {
@@ -165,8 +204,8 @@ function getResolvedDefine(define, env) {
165
204
  function getResolvedSplitting(splitting, format) {
166
205
  return splitting === undefined ? format === "esm" : splitting;
167
206
  }
168
- function getResolvedDtsSplitting(buildSplitting, dtsSplitting) {
169
- return dtsSplitting ?? buildSplitting ?? false;
207
+ function getResolvedDtsSplitting(_buildSplitting, dtsSplitting) {
208
+ return !!dtsSplitting;
170
209
  }
171
210
  var DEFAULT_ENTRY_NAMING = "[dir]/[name].[ext]";
172
211
  function getDefaultChunkNaming(name) {
@@ -217,7 +256,12 @@ function externalOptionPlugin(options, packageJson) {
217
256
  }
218
257
 
219
258
  // src/build.ts
259
+ var ac = null;
220
260
  async function build(partialOptions, rootDir = process.cwd()) {
261
+ if (ac) {
262
+ ac.abort();
263
+ }
264
+ ac = new AbortController;
221
265
  const buildOutput = {
222
266
  files: []
223
267
  };
@@ -351,7 +395,7 @@ async function build(partialOptions, rootDir = process.cwd()) {
351
395
  rootDir
352
396
  });
353
397
  if (options.onSuccess) {
354
- await options.onSuccess(options);
398
+ await executeOnSuccess(options.onSuccess, options, ac.signal);
355
399
  }
356
400
  }
357
401
  function getRelativePathToRootDir(filePath, rootDir) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  logger
3
- } from "./chunk-hb0esw52.js";
3
+ } from "./chunk-xfc23vg1.js";
4
4
 
5
5
  // src/cli/utils.ts
6
6
  import pc from "picocolors";
@@ -4,11 +4,11 @@ import {
4
4
  } from "./chunk-295440tx.js";
5
5
  import {
6
6
  displayBunupGradientArt
7
- } from "./chunk-29mdzdnt.js";
7
+ } from "./chunk-tcevarkq.js";
8
8
  import {
9
9
  formatListWithAnd,
10
10
  link
11
- } from "./chunk-hb0esw52.js";
11
+ } from "./chunk-xfc23vg1.js";
12
12
 
13
13
  // src/cli/init.ts
14
14
  import fs from "fs";
@@ -326,7 +326,7 @@ function showSuccessOutro(isWorkspace) {
326
326
  ${devCommand}${isWorkspace ? `
327
327
  ${filterCommand}` : ""}
328
328
 
329
- ${pc.dim("Learn more:")} ${link("https://bunup.dev/docs")}
329
+ ${pc.dim("Learn more:")} ${link("https://bunup.dev/")}
330
330
 
331
331
  ${pc.yellow("Happy building!")} \uD83D\uDE80
332
332
  `);
@@ -101,6 +101,35 @@ type Format = "esm" | "cjs" | "iife";
101
101
  type Target = "bun" | "node" | "browser";
102
102
  type External = (string | RegExp)[];
103
103
  type Env = "inline" | "disable" | `${string}*` | Record<string, string>;
104
+ type OnSuccess = ((options: Partial<BuildOptions>) => MaybePromise<void> | (() => void)) | string | {
105
+ /**
106
+ * The shell command to execute after a successful build
107
+ */
108
+ cmd: string
109
+ /**
110
+ * Additional options for the command execution
111
+ */
112
+ options?: {
113
+ /**
114
+ * Working directory for the command
115
+ */
116
+ cwd?: string
117
+ /**
118
+ * Environment variables to pass to the command
119
+ * @default process.env
120
+ */
121
+ env?: Record<string, string | undefined>
122
+ /**
123
+ * Maximum time in milliseconds the command is allowed to run
124
+ */
125
+ timeout?: number
126
+ /**
127
+ * Signal to use when killing the process
128
+ * @default 'SIGTERM'
129
+ */
130
+ killSignal?: NodeJS.Signals | number
131
+ }
132
+ };
104
133
  interface BuildOptions {
105
134
  /**
106
135
  * Name of the build configuration
@@ -224,15 +253,27 @@ interface BuildOptions {
224
253
  /**\\n\\t* Define global constants for the build\\n\\t* These values will be replaced at build time\\n\\t*\\n\\t* @see https://bun.sh/docs/bundler#define\\n\\t*\\n\\t* @example\\n\\t* define: {\\n\\t* 'process.env.NODE_ENV': '"production"',\\n\\t* 'PACKAGE_VERSION': '"1.0.0"'\\n\\t* }\\n\\t*/
225
254
  define?: Define;
226
255
  /**
227
- * A callback function that runs after the build process completes
228
- * This can be used for custom post-build operations like copying files,
229
- * running additional tools, or logging build information
256
+ * A callback or command to run after a successful build.
257
+ *
258
+ * If a function is provided, it can optionally return a cleanup function
259
+ * that will be called when the operation is cancelled.
230
260
  *
231
- * If watch mode is enabled, this callback runs after each rebuild
261
+ * @example
262
+ * onSuccess: (options) => {
263
+ * const server = startServer();
264
+ * return () => server.close();
265
+ * }
266
+ *
267
+ * @example
268
+ * onSuccess: "echo Build completed!"
232
269
  *
233
- * @param options The build options that were used
270
+ * @example
271
+ * onSuccess: {
272
+ * cmd: "bun run dist/server.js",
273
+ * options: { env: { ...process.env, FOO: "bar" } }
274
+ * }
234
275
  */
235
- onSuccess?: (options: Partial<BuildOptions>) => MaybePromise<void>;
276
+ onSuccess?: OnSuccess;
236
277
  /**\\n\\t* A banner to be added to the final bundle, this can be a directive like "use client" for react or a comment block such as a license for the code.\\n\\t*\\n\\t* @see https://bun.sh/docs/bundler#banner\\n\\t*\\n\\t* @example\\n\\t* banner: '"use client";'\\n\\t*/
237
278
  banner?: string;
238
279
  /**
@@ -163,7 +163,12 @@ function logTable(columns, data, footer) {
163
163
  console.log(footerRow);
164
164
  }
165
165
  }
166
- var link = (url) => pc.underline(pc.cyan(url));
166
+ var link = (url, label) => {
167
+ if (!label) {
168
+ label = url;
169
+ }
170
+ return `\x1B]8;;${url}\x07${pc.underline(pc.cyan(label))}\x1B]8;;\x07`;
171
+ };
167
172
  var logger = Logger.getInstance();
168
173
 
169
174
  // src/errors.ts
@@ -220,8 +225,15 @@ var KNOWN_ERRORS = [
220
225
  pattern: /Could not resolve: "bun"/i,
221
226
  errorType: "BUILD ERROR",
222
227
  logSolution: () => {
223
- logger.info(pc2.white("You're trying to build a project that uses Bun. ") + pc2.white("Please set the target option to ") + pc2.cyan("`bun`") + pc2.white(`.
224
- `) + pc2.white("Example: ") + pc2.green("`bunup --target bun`") + pc2.white(" or in config: ") + pc2.green("{ target: 'bun' }"));
228
+ logger.log("You're trying to build a project that uses Bun. " + "Please set the target option to " + pc2.cyan("`bun`") + `.
229
+ ` + "Example: " + pc2.green("`bunup --target bun`") + " or in config: " + pc2.green("{ target: 'bun' }"));
230
+ }
231
+ },
232
+ {
233
+ pattern: /has already been exported. Exported identifiers must be unique./i,
234
+ errorType: "DTS ERROR",
235
+ logSolution: () => {
236
+ logger.log("An error occurred while bundling dts files. This issue occurs when dts splitting is enabled due to a bug in the Bun bundler. Please ping the GitHub issue to help get it fixed faster: " + link("https://github.com/oven-sh/bun/issues/5344") + ". To fix this issue for now, you can disable dts splitting by removing " + pc2.gray("dts: { splitting: true }") + " from your config." + " You can re-enable it once the issue is fixed.");
225
237
  }
226
238
  }
227
239
  ];
@@ -244,7 +256,8 @@ var handleError = (error, context) => {
244
256
  }
245
257
  const knownError = KNOWN_ERRORS.find((error2) => error2.pattern.test(errorMessage) && (error2.errorType === errorType || !error2.errorType));
246
258
  if (!knownError && errorType) {
247
- console.error(`${pc2.red(errorType)} ${contextPrefix}${errorMessage}`);
259
+ console.error(`
260
+ ${pc2.red(errorType)} ${contextPrefix}${errorMessage}`);
248
261
  }
249
262
  if (knownError) {
250
263
  console.log(`
@@ -253,7 +266,19 @@ var handleError = (error, context) => {
253
266
  console.log(`
254
267
  `);
255
268
  } else {
256
- console.error(pc2.dim(pc2.white("If you think this is a bug, please open an issue at: ") + link("https://github.com/arshad-yaseen/bunup/issues/new")));
269
+ const issueUrl = new URL("https://github.com/arshad-yaseen/bunup/issues/new");
270
+ issueUrl.searchParams.set("title", `[${errorType}] Error encountered`);
271
+ issueUrl.searchParams.set("body", `## Error Details
272
+
273
+ **Error Type:** ${errorType}
274
+ **Error Message:** ${errorMessage}
275
+
276
+ ## Additional Context
277
+
278
+ <!-- Please provide any additional context about what you were trying to do when the error occurred -->`);
279
+ console.error(pc2.white(`
280
+ If you think this is a bug, please `) + link(issueUrl.toString(), "open an issue") + ` with details about this error
281
+ `);
257
282
  }
258
283
  };
259
284
  var handleErrorAndExit = (error, context) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bunup",
3
3
  "description": "⚡ A blazing-fast build tool for your libraries built with Bun.",
4
- "version": "0.9.0",
4
+ "version": "0.9.2",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -54,17 +54,18 @@
54
54
  "picocolors": "^1.1.1",
55
55
  "replace-in-file": "^8.3.0",
56
56
  "tinyexec": "^1.0.1",
57
- "typeroll": "^0.6.21"
57
+ "tree-kill": "^1.2.2",
58
+ "typeroll": "^0.6.22"
58
59
  },
59
60
  "devDependencies": {
60
- "@babel/types": "^7.28.1",
61
+ "@babel/types": "^7.28.2",
61
62
  "@biomejs/biome": "2.0.0",
62
63
  "@types/bun": "^1.2.19",
63
- "bumpp": "^10.2.0",
64
+ "bumpp": "^10.2.2",
64
65
  "husky": "^9.1.7",
65
66
  "lightningcss": "^1.30.1",
66
67
  "lint-staged": "^15.5.2",
67
- "typescript": "^5.8.3"
68
+ "typescript": "^5.9.2"
68
69
  },
69
70
  "peerDependencies": {
70
71
  "typescript": ">=4.5.0",