bunup 0.8.45 → 0.8.46
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 +3 -3
- package/dist/{chunk-pn1qh94w.js → chunk-ycxcdce7.js} +3 -24
- package/dist/cli/index.js +3 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
|
|
15
15
|
Bunup is the **blazing-fast build tool** for TypeScript and JavaScript libraries, designed for flawless developer experience and speed, **powered by Bun**.
|
|
16
16
|
|
|
17
|
-

|
|
18
18
|
|
|
19
19
|
</div>
|
|
20
20
|
<!-- markdownlint-restore -->
|
|
21
21
|
|
|
22
22
|
## Key Features
|
|
23
23
|
|
|
24
|
+
- ⚡ **Extremely Fast**: Lightning-fast builds and rebuilds.
|
|
24
25
|
- 🚀 **Easy to Use**: Bunup preconfigures everything you need out-of-the-box. Just focus on your code.
|
|
25
|
-
- 🔥 **Bytecode Generation**: Faster startups by compiling to Bun bytecode—perfect for CLIs.
|
|
26
26
|
- 📦 **[Workspace](https://bunup.dev/docs/guide/workspaces) Support**: Build multiple packages within one config file and command.
|
|
27
27
|
- 🔄 **Tsup Familiarity**: Familiar tsup-like CLI and config.
|
|
28
|
-
- 🎯 **Bun Target**: First-class bundling support for libraries that are intended to run
|
|
28
|
+
- 🎯 **Bun Target**: First-class bundling support for libraries that are intended to run on Bun.
|
|
29
29
|
|
|
30
30
|
## 📚 Documentation
|
|
31
31
|
|
|
@@ -31,34 +31,13 @@ import pc2 from "picocolors";
|
|
|
31
31
|
|
|
32
32
|
// src/plugins/internal/linter.ts
|
|
33
33
|
var rules = [
|
|
34
|
-
{
|
|
35
|
-
check: (ctx) => ctx.meta.packageJson.data?.type !== "module" && ctx.options.format.length === 1 && ctx.options.format[0] === "esm",
|
|
36
|
-
message: 'You are using only ESM format. It is recommended to add "type": "module" to your package.json to help with module resolution.',
|
|
37
|
-
logLevel: "recommended"
|
|
38
|
-
},
|
|
39
34
|
{
|
|
40
35
|
check: (ctx) => {
|
|
41
|
-
const
|
|
42
|
-
return deps && (("typescript" in deps) || ("@types/node" in deps) || ("@types/bun" in deps));
|
|
43
|
-
},
|
|
44
|
-
message: "TypeScript or @types/* packages are listed as production dependencies. Consider moving them to devDependencies since they're only needed during development.",
|
|
45
|
-
logLevel: "recommended"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
check: (ctx) => {
|
|
49
|
-
const hasMinification = ctx.options.minify || ctx.options.minifyWhitespace || ctx.options.minifyIdentifiers || ctx.options.minifySyntax;
|
|
36
|
+
const hasMinification = !!(ctx.options.minify || ctx.options.minifyWhitespace || ctx.options.minifyIdentifiers || ctx.options.minifySyntax);
|
|
50
37
|
return hasMinification && !ctx.options.sourcemap;
|
|
51
38
|
},
|
|
52
39
|
message: `You are using minification without source maps. Consider enabling source maps to help with debugging minified code. Learn more: ${link("https://bunup.dev/docs/guide/options#source-maps")}`,
|
|
53
40
|
logLevel: "recommended"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
check: (ctx) => {
|
|
57
|
-
const pkg = ctx.meta.packageJson.data;
|
|
58
|
-
return !pkg?.files && !pkg?.private;
|
|
59
|
-
},
|
|
60
|
-
message: 'Your package.json is missing a "files" field. This means all files will be published to npm. Consider adding a "files" field to control what gets published.',
|
|
61
|
-
logLevel: "info"
|
|
62
41
|
}
|
|
63
42
|
];
|
|
64
43
|
function linter() {
|
|
@@ -324,7 +303,7 @@ async function build(partialOptions, rootDir = process.cwd()) {
|
|
|
324
303
|
const relativePathToRootDir = getRelativePathToRootDir(file.path, rootDir);
|
|
325
304
|
const relativePathToOutputDir = getRelativePathToOutputDir(relativePathToRootDir, options.outDir);
|
|
326
305
|
if (file.kind === "entry-point") {
|
|
327
|
-
logger.success(`${pc2.dim(options.outDir)}
|
|
306
|
+
logger.success(`${pc2.dim(`${options.outDir}/`)}${relativePathToOutputDir}`, {
|
|
328
307
|
identifier: options.name
|
|
329
308
|
});
|
|
330
309
|
}
|
|
@@ -358,7 +337,7 @@ async function build(partialOptions, rootDir = process.cwd()) {
|
|
|
358
337
|
const relativePathToOutputDir = cleanPath(`${file.pathInfo.outputPathWithoutExtension}${dtsExtension}`);
|
|
359
338
|
const relativePathToRootDir = cleanPath(`${options.outDir}/${relativePathToOutputDir}`);
|
|
360
339
|
if (file.kind === "entry-point") {
|
|
361
|
-
logger.success(`${pc2.dim(options.outDir)}
|
|
340
|
+
logger.success(`${pc2.dim(`${options.outDir}/`)}${relativePathToOutputDir}`, {
|
|
362
341
|
identifier: options.name
|
|
363
342
|
});
|
|
364
343
|
}
|
package/dist/cli/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
build,
|
|
5
5
|
createBuildOptions
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-ycxcdce7.js";
|
|
7
7
|
import"../chunk-snvybwa2.js";
|
|
8
8
|
import {
|
|
9
9
|
processLoadedConfigs
|
|
@@ -28,7 +28,7 @@ import { loadConfig } from "coffi";
|
|
|
28
28
|
import pc3 from "picocolors";
|
|
29
29
|
import { exec } from "tinyexec";
|
|
30
30
|
// package.json
|
|
31
|
-
var version = "0.8.
|
|
31
|
+
var version = "0.8.46";
|
|
32
32
|
|
|
33
33
|
// src/watch.ts
|
|
34
34
|
import path from "path";
|
|
@@ -532,7 +532,7 @@ async function main(args = Bun.argv.slice(2)) {
|
|
|
532
532
|
const timeDisplay = formatTime(buildTimeMs);
|
|
533
533
|
logger.success(`Build completed in ${pc3.green(timeDisplay)}`);
|
|
534
534
|
if (cliOptions.watch) {
|
|
535
|
-
logger.info("
|
|
535
|
+
logger.info("Watching for file changes...");
|
|
536
536
|
}
|
|
537
537
|
if (cliOptions.onSuccess) {
|
|
538
538
|
logger.info(`Running command: ${cliOptions.onSuccess}`, {
|
package/dist/index.js
CHANGED