bunup 0.14.9 → 0.14.10
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 +63 -21
- package/dist/cli/index.js +16 -12
- package/dist/index.js +2 -2
- package/dist/plugins.d.ts +36 -1
- package/dist/plugins.js +50 -7
- package/dist/shared/{bunup-rh8gn8xh.js → bunup-er5nnjqp.js} +1 -1
- package/dist/shared/{bunup-g3r7h8pa.js → bunup-nsnkrmw3.js} +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,42 +5,84 @@
|
|
|
5
5
|
<div align="center">
|
|
6
6
|
|
|
7
7
|
<!-- markdownlint-disable-next-line no-alt-text -->
|
|
8
|
+

|
|
8
9
|
|
|
10
|
+

|
|
9
11
|
|
|
10
|
-
](https://npmjs.com/package/bunup)
|
|
13
|
+
[](https://bun.sh)
|
|
14
|
+
[](https://github.com/sponsors/arshad-yaseen)
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
Bunup helps you ship TypeScript/React libraries faster with great DX — built on Bun.
|
|
17
|
+
</div>
|
|
18
|
+
<!-- markdownlint-restore -->
|
|
13
19
|
|
|
14
|
-
|
|
20
|
+
## Performance
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
Instant builds by design. With Bun’s native speed, builds and rebuilds are extremely quick, even in monorepos. Faster feedback loops, higher productivity, calmer flow.
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
<!-- markdownlint-restore -->
|
|
24
|
+
## 🚀 Quick Start
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
Create a TypeScript file:
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- 🏗️ **[Workspace](https://bunup.dev/docs/guide/workspaces) Ready**: Builds multiple packages from one config and command.
|
|
28
|
+
```ts
|
|
29
|
+
// src/index.ts
|
|
30
|
+
export function greet(name: string): string {
|
|
31
|
+
return `Hello, ${name}!`;
|
|
32
|
+
}
|
|
33
|
+
```
|
|
30
34
|
|
|
31
|
-
|
|
35
|
+
Build it instantly:
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
```bash
|
|
38
|
+
bunx bunup
|
|
39
|
+
```
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
Outputs to `dist/` with ESM and `.d.ts` types.
|
|
42
|
+
|
|
43
|
+
Need CommonJS too?
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bunx bunup --format esm,cjs
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Want to generate and sync package exports automatically?
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
bunx bunup --exports
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Scaffold
|
|
36
56
|
|
|
37
|
-
|
|
57
|
+
Spin up a modern, ready-to-publish TypeScript or React component library (or a basic starter) in ~10 seconds:
|
|
38
58
|
|
|
39
|
-
|
|
59
|
+
```bash
|
|
60
|
+
bunx @bunup/cli@latest create
|
|
61
|
+
```
|
|
40
62
|
|
|
41
|
-
|
|
63
|
+
See more in [Scaffold with Bunup](./docs/scaffold-with-bunup.md).
|
|
64
|
+
|
|
65
|
+
## Features
|
|
66
|
+
|
|
67
|
+
- ⚡ **Instant builds** — lightning-fast by default
|
|
68
|
+
- 🎨 **CSS support out of the box** — import CSS directly, with built-in CSS Modules support.
|
|
69
|
+
- 📝 **TypeScript declarations** — clean, accurate `.d.ts` files
|
|
70
|
+
- 🪓 **[Declaration splitting](https://bunup.dev/docs/guide/typescript-declarations#declaration-splitting)** — smaller, cleaner type bundles
|
|
71
|
+
- 🔋 **Batteries included** — auto-exports, unused dependency detection, and more
|
|
72
|
+
- 🏗️ **[Workspace-ready](https://bunup.dev/docs/guide/workspaces)** — build multiple packages from one config and one command
|
|
73
|
+
|
|
74
|
+
For more, see the full documentation: https://bunup.dev
|
|
75
|
+
|
|
76
|
+
## ❤️ Contributing
|
|
77
|
+
|
|
78
|
+
We welcome contributions! Please read the [contributing guide](CONTRIBUTING.md).
|
|
42
79
|
|
|
43
80
|
<div align="center">
|
|
44
81
|
|
|
45
|
-
|
|
82
|
+
<img src="https://cdn.jsdelivr.net/gh/arshad-yaseen/static/sponsors.svg" alt="Sponsors" />
|
|
83
|
+
|
|
84
|
+
<br /><br />
|
|
85
|
+
|
|
86
|
+
<img src="assets/cat-footer.svg" alt="______ 🐈⬛ _____________" />
|
|
87
|
+
|
|
46
88
|
</div>
|
package/dist/cli/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
printBuildReport,
|
|
6
6
|
processLoadedConfigs,
|
|
7
7
|
resolveBuildOptions
|
|
8
|
-
} from "../shared/bunup-
|
|
8
|
+
} from "../shared/bunup-nsnkrmw3.js";
|
|
9
9
|
import {
|
|
10
10
|
BunupCLIError,
|
|
11
11
|
BunupWatchError,
|
|
@@ -18,13 +18,13 @@ import {
|
|
|
18
18
|
logTime,
|
|
19
19
|
logger,
|
|
20
20
|
parseErrorMessage
|
|
21
|
-
} from "../shared/bunup-
|
|
21
|
+
} from "../shared/bunup-er5nnjqp.js";
|
|
22
22
|
|
|
23
23
|
// packages/bunup/src/cli/index.ts
|
|
24
24
|
import { loadConfig } from "coffi";
|
|
25
25
|
import pc3 from "picocolors";
|
|
26
26
|
// packages/bunup/package.json
|
|
27
|
-
var version = "0.14.
|
|
27
|
+
var version = "0.14.10";
|
|
28
28
|
|
|
29
29
|
// packages/bunup/src/watch.ts
|
|
30
30
|
import path from "path";
|
|
@@ -94,7 +94,7 @@ async function watch(userOptions, rootDir) {
|
|
|
94
94
|
// packages/bunup/src/cli/options.ts
|
|
95
95
|
import pc2 from "picocolors";
|
|
96
96
|
import { cli, z } from "zlye";
|
|
97
|
-
var program = cli().name("bunup").version(version).description("A blazing-fast build tool for your TypeScript/React libraries
|
|
97
|
+
var program = cli().name("bunup").version(version).description("A blazing-fast build tool for your TypeScript/React libraries - built on Bun").with({
|
|
98
98
|
ignoreOptionDefaultValue: true
|
|
99
99
|
}).example([
|
|
100
100
|
pc2.gray(`${pc2.blue("bunup")} # Basic build`),
|
|
@@ -106,7 +106,7 @@ var program = cli().name("bunup").version(version).description("A blazing-fast b
|
|
|
106
106
|
pc2.gray(`${pc2.blue("bunup src/cli.ts")} # Multiple entries`),
|
|
107
107
|
pc2.gray(`${pc2.blue("bunup --dts.splitting")} # Declaration splitting`),
|
|
108
108
|
pc2.gray(`${pc2.blue("bunup --no-clean")} # Disable cleaning output directory before build`)
|
|
109
|
-
]).option("entry", z.union(z.string().describe("Entry file or glob pattern"), z.array(z.string()).describe("Multiple entry files or globs")).alias("e").optional()).option("config", z.string().describe("Path to configuration file").alias("c").example("./configs/custom.bunup.config.js").optional()).option("filter", z.array(z.string()).describe("Filter workspace packages by name").optional()).option("name", z.string().describe("Name of the build configuration (for logging and identification)").example("my-library").optional()).option("out-dir", z.string().describe("Output directory for bundled files").alias("o").default("dist")).option("format", z.union(z.string().choices(["esm", "cjs", "iife"]).describe("Single output format"), z.array(z.string().choices(["esm", "cjs", "iife"])).describe("Multiple output formats")).alias("f").default("esm")).option("minify", z.boolean().describe("Enable all minification options (whitespace, identifiers, syntax)").optional()).option("minify-whitespace", z.boolean().describe("Minify whitespace in the output to reduce file size").optional()).option("minify-identifiers", z.boolean().describe("Minify identifiers by renaming variables to shorter names").optional()).option("minify-syntax", z.boolean().describe("Minify syntax by optimizing code structure").optional()).option("watch", z.boolean().describe("Watch for file changes and rebuild automatically").optional()).option("clean", z.boolean().describe("Clean the output directory before building").default(true)).option("silent", z.boolean().describe("Disable logging during the build process").alias("q").optional()).option("splitting", z.boolean().describe("Enable code splitting").default(true, "enabled by default for ESM format")).option("conditions", z.array(z.string()).describe("Package.json export conditions for import resolution").optional()).option("target", z.string().choices(["bun", "node", "browser"]).describe("Target environment for the bundle").alias("t").default("node")).option("external", z.array(z.string()).describe("External packages that should not be bundled").optional()).option("no-external", z.array(z.string()).describe("Packages that should be bundled even if listed in external").optional()).option("shims", z.boolean().describe("Enable shims for Node.js globals and ESM/CJS interoperability").optional()).option("report", z.object({
|
|
109
|
+
]).option("entry", z.union(z.string().describe("Entry file or glob pattern"), z.array(z.string()).describe("Multiple entry files or globs")).alias("e").optional()).option("config", z.union(z.string().describe("Path to a custom configuration file").alias("c").example("./configs/custom.bunup.config.js"), z.boolean().describe("Whether to use a configuration file").default(true)).optional()).option("filter", z.array(z.string()).describe("Filter workspace packages by name").optional()).option("name", z.string().describe("Name of the build configuration (for logging and identification)").example("my-library").optional()).option("out-dir", z.string().describe("Output directory for bundled files").alias("o").default("dist")).option("format", z.union(z.string().choices(["esm", "cjs", "iife"]).describe("Single output format"), z.array(z.string().choices(["esm", "cjs", "iife"])).describe("Multiple output formats")).alias("f").default("esm")).option("minify", z.boolean().describe("Enable all minification options (whitespace, identifiers, syntax)").optional()).option("minify-whitespace", z.boolean().describe("Minify whitespace in the output to reduce file size").optional()).option("minify-identifiers", z.boolean().describe("Minify identifiers by renaming variables to shorter names").optional()).option("minify-syntax", z.boolean().describe("Minify syntax by optimizing code structure").optional()).option("watch", z.boolean().describe("Watch for file changes and rebuild automatically").optional()).option("clean", z.boolean().describe("Clean the output directory before building").default(true)).option("silent", z.boolean().describe("Disable logging during the build process").alias("q").optional()).option("splitting", z.boolean().describe("Enable code splitting").default(true, "enabled by default for ESM format")).option("conditions", z.array(z.string()).describe("Package.json export conditions for import resolution").optional()).option("target", z.string().choices(["bun", "node", "browser"]).describe("Target environment for the bundle").alias("t").default("node")).option("external", z.array(z.string()).describe("External packages that should not be bundled").optional()).option("no-external", z.array(z.string()).describe("Packages that should be bundled even if listed in external").optional()).option("shims", z.boolean().describe("Enable shims for Node.js globals and ESM/CJS interoperability").optional()).option("report", z.object({
|
|
110
110
|
gzip: z.boolean().describe("Enable gzip compression size calculation").default(true),
|
|
111
111
|
brotli: z.boolean().describe("Enable brotli compression size calculation").optional(),
|
|
112
112
|
"max-bundle-size": z.number().describe("Maximum bundle size in bytes. Will warn if exceeded").optional()
|
|
@@ -159,13 +159,17 @@ var parseCliOptions = (argv) => {
|
|
|
159
159
|
async function main(args = Bun.argv.slice(2)) {
|
|
160
160
|
const cliOptions = parseCliOptions(args);
|
|
161
161
|
const cwd = process.cwd();
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
162
|
+
let loadedConfig;
|
|
163
|
+
if (cliOptions.config !== false) {
|
|
164
|
+
loadedConfig = await loadConfig({
|
|
165
|
+
name: "bunup.config",
|
|
166
|
+
extensions: [".ts", ".js", ".mjs", ".cjs"],
|
|
167
|
+
maxDepth: 1,
|
|
168
|
+
preferredPath: typeof cliOptions.config === "string" ? cliOptions.config : undefined,
|
|
169
|
+
packageJsonProperty: "bunup"
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
const { config, filepath } = loadedConfig ?? {};
|
|
169
173
|
const configsToProcess = !config ? [{ rootDir: cwd, options: cliOptions }] : await processLoadedConfigs(config, cwd, cliOptions.filter);
|
|
170
174
|
const shouldSilent = cliOptions.watch || cliOptions.silent || configsToProcess.some((c) => ensureArray(c.options).some((o) => o.silent));
|
|
171
175
|
if (shouldSilent) {
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
build
|
|
4
|
-
} from "./shared/bunup-
|
|
5
|
-
import"./shared/bunup-
|
|
4
|
+
} from "./shared/bunup-nsnkrmw3.js";
|
|
5
|
+
import"./shared/bunup-er5nnjqp.js";
|
|
6
6
|
// packages/bunup/src/define.ts
|
|
7
7
|
function defineConfig(options) {
|
|
8
8
|
return options;
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,13 +1,40 @@
|
|
|
1
|
-
import { BunupPlugin, BunupPluginHooks, exports, injectStyles, unused } from "./shared/bunup-zenttvjh";
|
|
1
|
+
import { BuildOptions, BunupPlugin, BunupPluginHooks, exports, injectStyles, unused } from "./shared/bunup-zenttvjh";
|
|
2
2
|
type CopyOptions = {
|
|
3
3
|
/** Whether to follow symbolic links when copying files. */
|
|
4
4
|
followSymlinks?: boolean
|
|
5
5
|
/** Whether to exclude dotfiles (files starting with a dot) from being copied. */
|
|
6
6
|
excludeDotfiles?: boolean
|
|
7
|
+
/** Whether to override existing files. Default: true */
|
|
8
|
+
override?: boolean
|
|
9
|
+
/**
|
|
10
|
+
* Behavior in watch mode:
|
|
11
|
+
* - 'changed': Only copy files that have changed (default)
|
|
12
|
+
* - 'always': Always copy all files on each build
|
|
13
|
+
* - 'skip': Skip copying in watch mode
|
|
14
|
+
*/
|
|
15
|
+
watchMode?: "changed" | "always" | "skip"
|
|
16
|
+
};
|
|
17
|
+
type TransformContext = {
|
|
18
|
+
/** The file content */
|
|
19
|
+
content: string | ArrayBuffer
|
|
20
|
+
/** The source file path */
|
|
21
|
+
path: string
|
|
22
|
+
/** The destination file path */
|
|
23
|
+
destination: string
|
|
24
|
+
/** Build options */
|
|
25
|
+
options: BuildOptions
|
|
26
|
+
};
|
|
27
|
+
type TransformResult = string | ArrayBuffer | {
|
|
28
|
+
content: string | ArrayBuffer
|
|
29
|
+
filename: string
|
|
7
30
|
};
|
|
31
|
+
type TransformFunction = (context: TransformContext) => TransformResult | Promise<TransformResult>;
|
|
8
32
|
/**
|
|
9
33
|
* A plugin that copies files and directories to the output directory.
|
|
10
34
|
*
|
|
35
|
+
* @warning When copying large files or directories, this may impact build performance.
|
|
36
|
+
* Consider using symlinks for very large files when appropriate.
|
|
37
|
+
*
|
|
11
38
|
* @see https://bunup.dev/docs/builtin-plugins/copy
|
|
12
39
|
*/
|
|
13
40
|
declare function copy(pattern: string | string[]): BunupPlugin & CopyBuilder;
|
|
@@ -15,6 +42,8 @@ declare class CopyBuilder {
|
|
|
15
42
|
private _patterns;
|
|
16
43
|
private _destination?;
|
|
17
44
|
private _options?;
|
|
45
|
+
private _transform?;
|
|
46
|
+
private _fileCache;
|
|
18
47
|
constructor(pattern: string | string[]);
|
|
19
48
|
/**
|
|
20
49
|
* Sets the destination directory or file path where files will be copied.
|
|
@@ -25,8 +54,14 @@ declare class CopyBuilder {
|
|
|
25
54
|
* Sets additional options for the copy operation.
|
|
26
55
|
*/
|
|
27
56
|
with(options: CopyOptions): this;
|
|
57
|
+
/**
|
|
58
|
+
* Transforms file contents during copy operation.
|
|
59
|
+
* Useful for modifying files on the fly (e.g., replacing tokens, minifying, etc.)
|
|
60
|
+
*/
|
|
61
|
+
transform(fn: TransformFunction): this;
|
|
28
62
|
get name(): string;
|
|
29
63
|
get hooks(): BunupPluginHooks;
|
|
64
|
+
private copyFileWithTransform;
|
|
30
65
|
}
|
|
31
66
|
import { BunPlugin } from "bun";
|
|
32
67
|
/**
|
package/dist/plugins.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
logger,
|
|
8
8
|
shims,
|
|
9
9
|
unused
|
|
10
|
-
} from "./shared/bunup-
|
|
10
|
+
} from "./shared/bunup-er5nnjqp.js";
|
|
11
11
|
|
|
12
12
|
// packages/bunup/src/plugins/copy.ts
|
|
13
13
|
import { basename, extname, join } from "path";
|
|
@@ -19,6 +19,8 @@ class CopyBuilder {
|
|
|
19
19
|
_patterns;
|
|
20
20
|
_destination;
|
|
21
21
|
_options;
|
|
22
|
+
_transform;
|
|
23
|
+
_fileCache = new Map;
|
|
22
24
|
constructor(pattern) {
|
|
23
25
|
this._patterns = ensureArray(pattern);
|
|
24
26
|
}
|
|
@@ -30,16 +32,25 @@ class CopyBuilder {
|
|
|
30
32
|
this._options = options;
|
|
31
33
|
return this;
|
|
32
34
|
}
|
|
35
|
+
transform(fn) {
|
|
36
|
+
this._transform = fn;
|
|
37
|
+
return this;
|
|
38
|
+
}
|
|
33
39
|
get name() {
|
|
34
40
|
return "copy";
|
|
35
41
|
}
|
|
36
42
|
get hooks() {
|
|
37
43
|
return {
|
|
38
44
|
onBuildDone: async ({ options: buildOptions, meta }) => {
|
|
45
|
+
const isWatchMode = buildOptions.watch;
|
|
46
|
+
const watchBehavior = this._options?.watchMode ?? "changed";
|
|
47
|
+
if (isWatchMode && watchBehavior === "skip") {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
39
50
|
let destinationPath = "";
|
|
40
51
|
if (this._destination) {
|
|
41
52
|
if (this._destination.startsWith(buildOptions.outDir)) {
|
|
42
|
-
logger.warn("You don't need to include the output directory in the destination path for the copy plugin. Files are copied to the output directory by default.", {
|
|
53
|
+
logger.warn(" You don't need to include the output directory in the destination path for the copy plugin. Files are copied to the output directory by default.", {
|
|
43
54
|
verticalSpace: true
|
|
44
55
|
});
|
|
45
56
|
destinationPath = this._destination;
|
|
@@ -58,17 +69,53 @@ class CopyBuilder {
|
|
|
58
69
|
followSymlinks: this._options?.followSymlinks
|
|
59
70
|
})) {
|
|
60
71
|
const sourcePath = join(meta.rootDir, scannedPath);
|
|
72
|
+
if (isWatchMode && watchBehavior === "changed") {
|
|
73
|
+
const stat = await Bun.file(sourcePath).stat();
|
|
74
|
+
const lastModified = stat?.mtime?.getTime() ?? 0;
|
|
75
|
+
const cachedTime = this._fileCache.get(sourcePath);
|
|
76
|
+
if (cachedTime === lastModified) {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
this._fileCache.set(sourcePath, lastModified);
|
|
80
|
+
}
|
|
61
81
|
const finalDestinationPath = resolveDestinationPath(destinationPath, scannedPath, meta.rootDir);
|
|
82
|
+
const shouldOverride = this._options?.override ?? true;
|
|
83
|
+
if (!shouldOverride) {
|
|
84
|
+
const destinationExists = await Bun.file(finalDestinationPath).exists();
|
|
85
|
+
if (destinationExists) {
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
62
89
|
if (isDirectoryPath(sourcePath)) {
|
|
63
90
|
await copyDirectory(sourcePath, finalDestinationPath);
|
|
64
91
|
} else {
|
|
65
|
-
await
|
|
92
|
+
await this.copyFileWithTransform(sourcePath, finalDestinationPath, buildOptions);
|
|
66
93
|
}
|
|
67
94
|
}
|
|
68
95
|
}
|
|
69
96
|
}
|
|
70
97
|
};
|
|
71
98
|
}
|
|
99
|
+
async copyFileWithTransform(sourcePath, destinationPath, buildOptions) {
|
|
100
|
+
const sourceFile = Bun.file(sourcePath);
|
|
101
|
+
if (this._transform) {
|
|
102
|
+
const content = await sourceFile.arrayBuffer();
|
|
103
|
+
const result = await this._transform({
|
|
104
|
+
content,
|
|
105
|
+
path: sourcePath,
|
|
106
|
+
destination: destinationPath,
|
|
107
|
+
options: buildOptions
|
|
108
|
+
});
|
|
109
|
+
if (typeof result === "object" && "content" in result && "filename" in result) {
|
|
110
|
+
const newDestination = join(destinationPath.substring(0, destinationPath.lastIndexOf("/")), result.filename);
|
|
111
|
+
await Bun.write(newDestination, result.content);
|
|
112
|
+
} else {
|
|
113
|
+
await Bun.write(destinationPath, result);
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
await Bun.write(destinationPath, sourceFile);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
72
119
|
}
|
|
73
120
|
function resolveDestinationPath(destinationPath, scannedPath, rootDir) {
|
|
74
121
|
const fullDestinationPath = join(rootDir, destinationPath);
|
|
@@ -85,10 +132,6 @@ function isDirectoryPath(filePath) {
|
|
|
85
132
|
async function copyDirectory(sourcePath, finalDestinationPath) {
|
|
86
133
|
await Bun.$`cp -r ${sourcePath} ${finalDestinationPath}`;
|
|
87
134
|
}
|
|
88
|
-
async function copyFile(sourcePath, finalDestinationPath) {
|
|
89
|
-
const sourceFile = Bun.file(sourcePath);
|
|
90
|
-
await Bun.write(finalDestinationPath, sourceFile);
|
|
91
|
-
}
|
|
92
135
|
export {
|
|
93
136
|
unused,
|
|
94
137
|
shims,
|
|
@@ -851,7 +851,7 @@ function unused(options = {}) {
|
|
|
851
851
|
const removeCommand = pc3.cyan(`bun remove ${unusedDependencies.join(" ")}`);
|
|
852
852
|
const message = [
|
|
853
853
|
`
|
|
854
|
-
Your project${buildOptions.name ? ` ${buildOptions.name}` : ""} has ${count} unused ${depText}: ${coloredDeps}.`,
|
|
854
|
+
Your project${buildOptions.name ? ` ${buildOptions.name}` : ""} has ${count} unused ${depText}: ${coloredDeps}.`,
|
|
855
855
|
`You can remove ${count === 1 ? "it" : "them"} with ${removeCommand}`
|
|
856
856
|
].join(" ");
|
|
857
857
|
if (level === "error") {
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
replaceExtension,
|
|
22
22
|
shims,
|
|
23
23
|
unused
|
|
24
|
-
} from "./bunup-
|
|
24
|
+
} from "./bunup-er5nnjqp.js";
|
|
25
25
|
|
|
26
26
|
// packages/bunup/src/loaders.ts
|
|
27
27
|
import path from "path";
|
|
@@ -395,11 +395,11 @@ async function printBuildReport(buildOutput, options) {
|
|
|
395
395
|
pad(formatFileSize(file.size), sizeWidth, "right")
|
|
396
396
|
];
|
|
397
397
|
if (gzip) {
|
|
398
|
-
const gzipStr = file.gzipSize ? formatFileSize(file.gzipSize) : pc.dim("
|
|
398
|
+
const gzipStr = file.gzipSize ? formatFileSize(file.gzipSize) : pc.dim("-");
|
|
399
399
|
fileRow.push(pad(gzipStr, gzipWidth, "right"));
|
|
400
400
|
}
|
|
401
401
|
if (brotli) {
|
|
402
|
-
const brotliStr = file.brotliSize ? formatFileSize(file.brotliSize) : pc.dim("
|
|
402
|
+
const brotliStr = file.brotliSize ? formatFileSize(file.brotliSize) : pc.dim("-");
|
|
403
403
|
fileRow.push(pad(brotliStr, brotliWidth, "right"));
|
|
404
404
|
}
|
|
405
405
|
console.log(fileRow.join(" "));
|
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.14.
|
|
4
|
+
"version": "0.14.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"bunup": "dist/cli/index.js"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@bunup/dts": "0.
|
|
50
|
+
"@bunup/dts": "0.14.10",
|
|
51
51
|
"chokidar": "^4.0.3",
|
|
52
52
|
"coffi": "^0.1.35",
|
|
53
53
|
"lightningcss": "^1.30.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"tinyexec": "^1.0.1",
|
|
56
56
|
"tree-kill": "^1.2.2",
|
|
57
57
|
"zlye": "^0.4.4",
|
|
58
|
-
"@bunup/shared": "0.
|
|
58
|
+
"@bunup/shared": "0.14.10"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"typescript": ">=4.5.0"
|