bunup 0.16.28 → 0.16.30
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/dist/cli/index.js +9 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +1 -1
- package/dist/shared/{bunup-0g3ae56f.js → bunup-yf5cw3mx.js} +10 -9
- package/package.json +3 -3
- /package/dist/shared/{bunup-4epc480j.js → bunup-j2mrc3y2.js} +0 -0
package/dist/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
build,
|
|
5
5
|
processLoadedConfigs,
|
|
6
6
|
resolveBuildOptions
|
|
7
|
-
} from "../shared/bunup-
|
|
7
|
+
} from "../shared/bunup-yf5cw3mx.js";
|
|
8
8
|
import {
|
|
9
9
|
BunupBuildError,
|
|
10
10
|
BunupCLIError,
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
logTime,
|
|
21
21
|
logger,
|
|
22
22
|
parseErrorMessage
|
|
23
|
-
} from "../shared/bunup-
|
|
23
|
+
} from "../shared/bunup-j2mrc3y2.js";
|
|
24
24
|
|
|
25
25
|
// packages/bunup/src/cli/index.ts
|
|
26
26
|
import { loadConfig } from "coffi";
|
|
27
27
|
import pc4 from "picocolors";
|
|
28
28
|
// packages/bunup/package.json
|
|
29
|
-
var version = "0.16.
|
|
29
|
+
var version = "0.16.30";
|
|
30
30
|
|
|
31
31
|
// packages/bunup/src/printer/print-build-report.ts
|
|
32
32
|
import { promisify } from "util";
|
|
@@ -167,6 +167,7 @@ async function watch(userOptions, rootDir, configFilePath) {
|
|
|
167
167
|
let isRebuilding = false;
|
|
168
168
|
let buildCount = 0;
|
|
169
169
|
let lastChangedFile;
|
|
170
|
+
let ac = null;
|
|
170
171
|
const triggerRebuild = async (initial, changed) => {
|
|
171
172
|
if (isRebuilding) {
|
|
172
173
|
return;
|
|
@@ -187,8 +188,12 @@ async function watch(userOptions, rootDir, configFilePath) {
|
|
|
187
188
|
console.log(`
|
|
188
189
|
${buildCount > 1 ? pc2.magentaBright(`[x${buildCount}] `) : ""}${pc2.green(`Changed:`)} ${changed}${options.name ? ` ${pc2.bgBlueBright(` ${options.name} `)}` : ""}`);
|
|
189
190
|
}
|
|
191
|
+
if (ac) {
|
|
192
|
+
ac.abort();
|
|
193
|
+
}
|
|
194
|
+
ac = new AbortController;
|
|
190
195
|
const start = performance.now();
|
|
191
|
-
const buildResult = await build(userOptions, rootDir);
|
|
196
|
+
const buildResult = await build(userOptions, rootDir, ac);
|
|
192
197
|
await printBuildReport(buildResult);
|
|
193
198
|
if (!initial) {
|
|
194
199
|
console.log(`
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BuildContext, BuildMeta, BuildOptions, BuildOutputFile, BuildResult, BunupPlugin, DefineConfigItem, DefineWorkspaceItem, WithOptional, WithRequired } from "./shared/bunup-fsp3sxr6";
|
|
2
|
-
declare function build(userOptions: Partial<BuildOptions>, rootDir?: string): Promise<BuildResult>;
|
|
1
|
+
import { BuildContext, BuildMeta, BuildOptions, BuildOutputFile, BuildResult, BunupPlugin, DefineConfigItem, DefineWorkspaceItem, WithOptional, WithRequired } from "./shared/bunup-fsp3sxr6.js";
|
|
2
|
+
declare function build(userOptions: Partial<BuildOptions>, rootDir?: string, ac?: AbortController): Promise<BuildResult>;
|
|
3
3
|
declare function defineConfig(options: DefineConfigItem | WithRequired<DefineConfigItem, "name">[]): DefineConfigItem | WithRequired<DefineConfigItem, "name">[];
|
|
4
4
|
declare function defineWorkspace(options: WithOptional<DefineWorkspaceItem, "config">[], sharedOptions?: Partial<DefineConfigItem>): DefineWorkspaceItem[];
|
|
5
5
|
export { defineWorkspace, defineConfig, build, DefineWorkspaceItem, DefineConfigItem, BunupPlugin, BuildResult, BuildOutputFile, BuildOptions, BuildMeta, BuildContext };
|
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-yf5cw3mx.js";
|
|
5
|
+
import"./shared/bunup-j2mrc3y2.js";
|
|
6
6
|
// packages/bunup/src/define.ts
|
|
7
7
|
function defineConfig(options) {
|
|
8
8
|
return options;
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Arrayable, BuildOptions, BunupPlugin, BunupPluginHooks, exports, injectStyles, unused } from "./shared/bunup-fsp3sxr6";
|
|
1
|
+
import { Arrayable, BuildOptions, BunupPlugin, BunupPluginHooks, exports, injectStyles, unused } from "./shared/bunup-fsp3sxr6.js";
|
|
2
2
|
type CopyOptions = {
|
|
3
3
|
/** Whether to follow symbolic links when copying files. */
|
|
4
4
|
followSymlinks?: boolean;
|
package/dist/plugins.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
parseErrorMessage,
|
|
20
20
|
shims,
|
|
21
21
|
unused
|
|
22
|
-
} from "./bunup-
|
|
22
|
+
} from "./bunup-j2mrc3y2.js";
|
|
23
23
|
|
|
24
24
|
// packages/bunup/src/loaders.ts
|
|
25
25
|
import path from "path";
|
|
@@ -469,13 +469,9 @@ function replaceExtension(filePath, newExtension) {
|
|
|
469
469
|
}
|
|
470
470
|
|
|
471
471
|
// packages/bunup/src/build.ts
|
|
472
|
-
|
|
473
|
-
async function build(userOptions, rootDir = process.cwd()) {
|
|
472
|
+
async function build(userOptions, rootDir = process.cwd(), ac) {
|
|
474
473
|
ensureMinimumBunVersion();
|
|
475
|
-
|
|
476
|
-
ac.abort();
|
|
477
|
-
}
|
|
478
|
-
ac = new AbortController;
|
|
474
|
+
const localAc = ac ?? new AbortController;
|
|
479
475
|
const options = resolveBuildOptions(userOptions);
|
|
480
476
|
if (options.silent) {
|
|
481
477
|
logger.setSilent(options.silent);
|
|
@@ -589,7 +585,12 @@ async function build(userOptions, rootDir = process.cwd()) {
|
|
|
589
585
|
}
|
|
590
586
|
if ((options.dts || options.dtsOnly) && !options.compile) {
|
|
591
587
|
try {
|
|
592
|
-
const {
|
|
588
|
+
const {
|
|
589
|
+
entry,
|
|
590
|
+
splitting,
|
|
591
|
+
resolve: userDtsResolve,
|
|
592
|
+
...dtsOptions
|
|
593
|
+
} = typeof options.dts === "object" ? options.dts : {};
|
|
593
594
|
const bundledDeps = getBundledDepsForDtsResolve(options, packageJson.data);
|
|
594
595
|
const dtsResolve = userDtsResolve === false ? false : !bundledDeps?.length ? userDtsResolve : userDtsResolve === true ? true : [...bundledDeps, ...Array.isArray(userDtsResolve) ? userDtsResolve : []];
|
|
595
596
|
const dtsResult = await generateDts(ensureArray(entry ?? entrypoints), {
|
|
@@ -648,7 +649,7 @@ async function build(userOptions, rootDir = process.cwd()) {
|
|
|
648
649
|
}
|
|
649
650
|
});
|
|
650
651
|
if (options.onSuccess) {
|
|
651
|
-
await executeOnSuccess(options.onSuccess, options,
|
|
652
|
+
await executeOnSuccess(options.onSuccess, options, localAc.signal);
|
|
652
653
|
}
|
|
653
654
|
logger.log("");
|
|
654
655
|
logger.log(`${options.name ? ` ${pc2.bgBlueBright(` ${options.name} `)} ` : " "}${logger.formatMessage({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunup",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.30",
|
|
4
4
|
"description": "⚡ A blazing-fast build tool for your libraries built with Bun.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"type-check": "tsc --noEmit"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@bunup/dts": "^0.14.
|
|
54
|
-
"@bunup/shared": "0.16.
|
|
53
|
+
"@bunup/dts": "^0.14.53",
|
|
54
|
+
"@bunup/shared": "0.16.28",
|
|
55
55
|
"chokidar": "^5.0.0",
|
|
56
56
|
"coffi": "^0.1.37",
|
|
57
57
|
"lightningcss": "^1.30.2",
|
|
File without changes
|