bunup 0.9.0 → 0.9.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.
package/README.md CHANGED
@@ -10,27 +10,24 @@
10
10
 
11
11
  ![Bunup](https://raw.githubusercontent.com/arshad-yaseen/bunup/refs/heads/main/assets/bunup-title.svg)
12
12
 
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)
13
+ [![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
14
 
15
15
  Bunup is the **blazing-fast build tool** for TypeScript libraries, designed for flawless developer experience and speed, **powered by Bun**.
16
16
 
17
- ![Bunup benchmarks](/assets/benchmarks.png)
18
-
19
- *For detailed information on the benchmark, visit [here](https://gugustinette.github.io/bundler-benchmark/)*
20
-
21
17
  </div>
22
18
  <!-- markdownlint-restore -->
23
19
 
24
- ## Key Features
20
+ ## Features
25
21
 
26
- - ⚡ **Blazing Fast**: Lightning-quick builds and instant rebuilds.
27
- - 📝 **Best-in-Class TypeScript Declarations**: Clean, minimal and accurate `.d.ts` files generated automatically.
22
+ - ⚡ **Blazing Fast**: Lightning-fast builds and instant rebuilds.
23
+ - 📝 **Top-Notch TypeScript Declarations**: Clean, minimal, accurate `.d.ts` files generated automatically.
28
24
  - 📦 **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.
25
+ - 🪓 **Declaration Splitting**: Splits shared types for smaller, cleaner declaration bundles.
26
+ - 🔥 **Declaration Minification**: Aggressively minifies and shortens type names while preserving public API—like code bundling for TypeScript declarations.
27
+ - 🔋 **Batteries Included**: Auto-generates package exports, detects unused dependencies and exports, and more.
28
+ - 🚀 **Zero-Config Simplicity**: Preconfigured for productivity—just code and build.
29
+ - 🏗️ **[Workspace](https://bunup.dev/docs/guide/workspaces) Ready**: Builds multiple packages from one config and command.
30
+ - 🔄 **Tsup Familiarity**: Familiar CLI and config for easy migration from tsup.
34
31
 
35
32
  ## 📚 Documentation
36
33
 
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-f8vey9gb.js";
7
+ import"../shared/chunk-g6c05fxa.js";
8
8
  import {
9
9
  processLoadedConfigs
10
10
  } from "../shared/chunk-295440tx.js";
@@ -21,14 +21,14 @@ import {
21
21
  logger,
22
22
  parseErrorMessage,
23
23
  setSilent
24
- } from "../shared/chunk-hb0esw52.js";
24
+ } from "../shared/chunk-sfjfqxjy.js";
25
25
 
26
26
  // src/cli/index.ts
27
27
  import { loadConfig } from "coffi";
28
28
  import pc3 from "picocolors";
29
29
  import { exec } from "tinyexec";
30
30
  // package.json
31
- var version = "0.9.0";
31
+ var version = "0.9.1";
32
32
 
33
33
  // src/watch.ts
34
34
  import path from "path";
@@ -482,12 +482,12 @@ var parseCliOptions = (argv) => {
482
482
  async function main(args = Bun.argv.slice(2)) {
483
483
  const cliOptions = parseCliOptions(args);
484
484
  if (cliOptions.new) {
485
- const { newProject } = await import("../shared/chunk-cdrh2sea.js");
485
+ const { newProject } = await import("../shared/chunk-j0x1xdhb.js");
486
486
  await newProject();
487
487
  return;
488
488
  }
489
489
  if (cliOptions.init) {
490
- const { init } = await import("../shared/chunk-gc7rjej4.js");
490
+ const { init } = await import("../shared/chunk-s6wnc2s1.js");
491
491
  await init();
492
492
  return;
493
493
  }
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-25dcyfg9";
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-f8vey9gb.js";
5
+ import"./shared/chunk-g6c05fxa.js";
6
6
  import"./shared/chunk-295440tx.js";
7
- import"./shared/chunk-hb0esw52.js";
7
+ import"./shared/chunk-sfjfqxjy.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-25dcyfg9";
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-g6c05fxa.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-sfjfqxjy.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
  logger
3
- } from "./chunk-hb0esw52.js";
3
+ } from "./chunk-sfjfqxjy.js";
4
4
 
5
5
  // src/cli/utils.ts
6
6
  import pc from "picocolors";
@@ -3,7 +3,7 @@ import {
3
3
  filterBunupPlugins,
4
4
  runPluginBuildDoneHooks,
5
5
  runPluginBuildStartHooks
6
- } from "./chunk-ge1jevhp.js";
6
+ } from "./chunk-g6c05fxa.js";
7
7
  import {
8
8
  loadPackageJson
9
9
  } from "./chunk-295440tx.js";
@@ -25,7 +25,7 @@ import {
25
25
  parseErrorMessage,
26
26
  setSilent,
27
27
  silent
28
- } from "./chunk-hb0esw52.js";
28
+ } from "./chunk-sfjfqxjy.js";
29
29
 
30
30
  // src/build.ts
31
31
  import path from "path";
@@ -165,8 +165,8 @@ function getResolvedDefine(define, env) {
165
165
  function getResolvedSplitting(splitting, format) {
166
166
  return splitting === undefined ? format === "esm" : splitting;
167
167
  }
168
- function getResolvedDtsSplitting(buildSplitting, dtsSplitting) {
169
- return dtsSplitting ?? buildSplitting ?? false;
168
+ function getResolvedDtsSplitting(_buildSplitting, dtsSplitting) {
169
+ return !!dtsSplitting;
170
170
  }
171
171
  var DEFAULT_ENTRY_NAMING = "[dir]/[name].[ext]";
172
172
  function getDefaultChunkNaming(name) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BunupPluginError
3
- } from "./chunk-hb0esw52.js";
3
+ } from "./chunk-sfjfqxjy.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-b17s55p9.js";
5
5
  import {
6
6
  link,
7
7
  pathExistsSync
8
- } from "./chunk-hb0esw52.js";
8
+ } from "./chunk-sfjfqxjy.js";
9
9
 
10
10
  // src/cli/new.ts
11
11
  import { renameSync } from "fs";
@@ -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-b17s55p9.js";
8
8
  import {
9
9
  formatListWithAnd,
10
10
  link
11
- } from "./chunk-hb0esw52.js";
11
+ } from "./chunk-sfjfqxjy.js";
12
12
 
13
13
  // src/cli/init.ts
14
14
  import fs from "fs";
@@ -220,8 +220,15 @@ var KNOWN_ERRORS = [
220
220
  pattern: /Could not resolve: "bun"/i,
221
221
  errorType: "BUILD ERROR",
222
222
  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' }"));
223
+ logger.log("You're trying to build a project that uses Bun. " + "Please set the target option to " + pc2.cyan("`bun`") + `.
224
+ ` + "Example: " + pc2.green("`bunup --target bun`") + " or in config: " + pc2.green("{ target: 'bun' }"));
225
+ }
226
+ },
227
+ {
228
+ pattern: /has already been exported. Exported identifiers must be unique./i,
229
+ errorType: "DTS ERROR",
230
+ logSolution: () => {
231
+ 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
232
  }
226
233
  }
227
234
  ];
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.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -57,10 +57,10 @@
57
57
  "typeroll": "^0.6.21"
58
58
  },
59
59
  "devDependencies": {
60
- "@babel/types": "^7.28.1",
60
+ "@babel/types": "^7.28.2",
61
61
  "@biomejs/biome": "2.0.0",
62
62
  "@types/bun": "^1.2.19",
63
- "bumpp": "^10.2.0",
63
+ "bumpp": "^10.2.1",
64
64
  "husky": "^9.1.7",
65
65
  "lightningcss": "^1.30.1",
66
66
  "lint-staged": "^15.5.2",