bunup 0.8.36 → 0.8.38
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/{chunk-g3b9h2ys.js → chunk-5s4mpe5d.js} +2 -2
- package/dist/{chunk-ct0a7gyb.js → chunk-a7j07gk7.js} +1 -1
- package/dist/{chunk-ka4kbkdd.js → chunk-c1eyecm3.js} +1 -1
- package/dist/{chunk-589998ak.d.ts → chunk-dqhcq3he.d.ts} +1 -1
- package/dist/{chunk-vh9fpy39.js → chunk-m1145s0v.js} +7 -3
- package/dist/{chunk-4y0hvzcd.js → chunk-q3kvndyh.js} +2 -2
- package/dist/{chunk-w13gdbvp.js → chunk-vpe2amgs.js} +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/plugins.d.ts +2 -2
- package/dist/plugins.js +2 -2
- package/package.json +9 -10
- package/bin/bunup.mjs +0 -3
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-gh7z7s46.js";
|
|
5
5
|
import {
|
|
6
6
|
displayBunupGradientArt
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-a7j07gk7.js";
|
|
8
8
|
import {
|
|
9
9
|
formatListWithAnd
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-c1eyecm3.js";
|
|
11
11
|
|
|
12
12
|
// src/cli/init.ts
|
|
13
13
|
import fs from "fs";
|
|
@@ -69,7 +69,7 @@ class Logger {
|
|
|
69
69
|
type = "info"
|
|
70
70
|
} = options;
|
|
71
71
|
const icon = this.getIcon(type, tick);
|
|
72
|
-
const styledMessage = muted ? pc.dim(message) : message;
|
|
72
|
+
const styledMessage = muted ? pc.dim(message) : type === "error" ? pc.red(message) : type === "warn" ? pc.yellow(message) : message;
|
|
73
73
|
const identifierPart = this.formatIdentifier(identifier);
|
|
74
74
|
return `${icon} ${styledMessage}${identifierPart}`;
|
|
75
75
|
}
|
|
@@ -228,7 +228,7 @@ type WithOptional<
|
|
|
228
228
|
K extends keyof T
|
|
229
229
|
> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
230
230
|
type Arrayable<T> = T | T[];
|
|
231
|
-
type DefineConfigItem = Omit<WithOptional<BuildOptions,
|
|
231
|
+
type DefineConfigItem = Omit<WithOptional<BuildOptions, outDir | "format">, "watch">;
|
|
232
232
|
type DefineWorkspaceItem = {
|
|
233
233
|
name: string
|
|
234
234
|
root: string
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
report,
|
|
5
5
|
runPluginBuildDoneHooks,
|
|
6
6
|
runPluginBuildStartHooks
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-vpe2amgs.js";
|
|
8
8
|
import {
|
|
9
9
|
loadPackageJson
|
|
10
10
|
} from "./chunk-gh7z7s46.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getShortFilePath,
|
|
21
21
|
logger,
|
|
22
22
|
setSilent
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-c1eyecm3.js";
|
|
24
24
|
|
|
25
25
|
// src/build.ts
|
|
26
26
|
import path from "path";
|
|
@@ -104,6 +104,9 @@ function getResolvedDefine(define, env) {
|
|
|
104
104
|
function getResolvedSplitting(splitting, format) {
|
|
105
105
|
return splitting === undefined ? format === "esm" : splitting;
|
|
106
106
|
}
|
|
107
|
+
function getResolvedDtsSplitting(splitting) {
|
|
108
|
+
return splitting ?? true;
|
|
109
|
+
}
|
|
107
110
|
var DEFAULT_ENTRY_NAMING = "[dir]/[name].[ext]";
|
|
108
111
|
function getResolvedNaming(fmt, packageType) {
|
|
109
112
|
const replaceExt = (pattern) => pattern.replace(".[ext]", getDefaultOutputExtension(fmt, packageType));
|
|
@@ -228,10 +231,11 @@ async function build(partialOptions, rootDir = process.cwd()) {
|
|
|
228
231
|
});
|
|
229
232
|
await Promise.all(buildPromises);
|
|
230
233
|
if (options.dts) {
|
|
231
|
-
const { entry, ...dtsOptions } = typeof options.dts === "object" ? options.dts : {};
|
|
234
|
+
const { entry, splitting, ...dtsOptions } = typeof options.dts === "object" ? options.dts : {};
|
|
232
235
|
const dtsResult = await generateDts(ensureArray(entry ?? entrypoints), {
|
|
233
236
|
cwd: rootDir,
|
|
234
237
|
preferredTsConfigPath: options.preferredTsconfigPath,
|
|
238
|
+
splitting: getResolvedDtsSplitting(splitting),
|
|
235
239
|
...dtsOptions
|
|
236
240
|
});
|
|
237
241
|
if (dtsResult.errors.length) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
displayBunupGradientArt
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-a7j07gk7.js";
|
|
5
5
|
import {
|
|
6
6
|
pathExistsSync
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-c1eyecm3.js";
|
|
8
8
|
|
|
9
9
|
// src/cli/new.ts
|
|
10
10
|
import { renameSync } from "fs";
|
package/dist/cli/index.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import {
|
|
4
4
|
build,
|
|
5
5
|
createBuildOptions
|
|
6
|
-
} from "../chunk-
|
|
7
|
-
import"../chunk-
|
|
6
|
+
} from "../chunk-m1145s0v.js";
|
|
7
|
+
import"../chunk-vpe2amgs.js";
|
|
8
8
|
import {
|
|
9
9
|
processLoadedConfigs
|
|
10
10
|
} from "../chunk-gh7z7s46.js";
|
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
logger,
|
|
22
22
|
parseErrorMessage,
|
|
23
23
|
setSilent
|
|
24
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-c1eyecm3.js";
|
|
25
25
|
|
|
26
26
|
// src/cli/index.ts
|
|
27
27
|
import { exec } from "tinyexec";
|
|
28
28
|
// package.json
|
|
29
|
-
var version = "0.8.
|
|
29
|
+
var version = "0.8.38";
|
|
30
30
|
|
|
31
31
|
// src/cli/options.ts
|
|
32
32
|
import pc from "picocolors";
|
|
@@ -487,12 +487,12 @@ async function watch(partialOptions, rootDir) {
|
|
|
487
487
|
async function main(args = Bun.argv.slice(2)) {
|
|
488
488
|
const cliOptions = parseCliOptions(args);
|
|
489
489
|
if (cliOptions.new) {
|
|
490
|
-
const { newProject } = await import("../chunk-
|
|
490
|
+
const { newProject } = await import("../chunk-q3kvndyh.js");
|
|
491
491
|
await newProject();
|
|
492
492
|
return;
|
|
493
493
|
}
|
|
494
494
|
if (cliOptions.init) {
|
|
495
|
-
const { init } = await import("../chunk-
|
|
495
|
+
const { init } = await import("../chunk-5s4mpe5d.js");
|
|
496
496
|
await init();
|
|
497
497
|
return;
|
|
498
498
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Arrayable, BuildOptions, DefineConfigItem, DefineWorkspaceItem, Plugin } from "./chunk-
|
|
1
|
+
import { Arrayable, BuildOptions, DefineConfigItem, DefineWorkspaceItem, Plugin } from "./chunk-dqhcq3he";
|
|
2
2
|
declare function defineConfig(options: Arrayable<DefineConfigItem>): Arrayable<DefineConfigItem>;
|
|
3
3
|
declare function defineWorkspace(options: DefineWorkspaceItem[]): DefineWorkspaceItem[];
|
|
4
4
|
declare function build(partialOptions: Partial<BuildOptions>, rootDir?: string): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
build
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import"./chunk-
|
|
4
|
+
} from "./chunk-m1145s0v.js";
|
|
5
|
+
import"./chunk-vpe2amgs.js";
|
|
6
6
|
import"./chunk-gh7z7s46.js";
|
|
7
|
-
import"./chunk-
|
|
7
|
+
import"./chunk-c1eyecm3.js";
|
|
8
8
|
|
|
9
9
|
// src/define.ts
|
|
10
10
|
function defineConfig(options) {
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BunupPlugin, MaybePromise, Plugin } from "./chunk-
|
|
1
|
+
import { BunupPlugin, MaybePromise, Plugin } from "./chunk-dqhcq3he";
|
|
2
2
|
/**
|
|
3
3
|
* A plugin that provides shims for Node.js globals and ESM/CJS interoperability.
|
|
4
4
|
*/
|
|
@@ -13,7 +13,7 @@ interface ExportsPluginOptions {
|
|
|
13
13
|
* A plugin that generates the exports field in the package.json file automatically.
|
|
14
14
|
*/
|
|
15
15
|
declare function exports(options?: ExportsPluginOptions): BunupPlugin;
|
|
16
|
-
type InjectStylesPluginOptions = Pick<import("lightningcss").TransformOptions<import("lightningcss").CustomAtRules>,
|
|
16
|
+
type InjectStylesPluginOptions = Pick<import("lightningcss").TransformOptions<import("lightningcss").CustomAtRules>, sourceMap | inputSourceMap | "targets" | nonStandard | "minify" | pseudoClasses | unusedSymbols | errorRecovery | "visitor" | customAtRules | "include" | "exclude" | "drafts"> & {
|
|
17
17
|
inject?: (css: string, filePath: string) => MaybePromise<string>
|
|
18
18
|
};
|
|
19
19
|
/**
|
package/dist/plugins.js
CHANGED
package/package.json
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunup",
|
|
3
3
|
"description": "⚡ A blazing-fast build tool for your libraries built with Bun.",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.38",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
"bin"
|
|
7
|
+
"dist"
|
|
9
8
|
],
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
9
|
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
12
11
|
"exports": {
|
|
13
12
|
".": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
16
15
|
},
|
|
17
16
|
"./plugins": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
17
|
+
"import": "./dist/plugins.js",
|
|
18
|
+
"types": "./dist/plugins.d.ts"
|
|
20
19
|
},
|
|
21
20
|
"./cli": {
|
|
22
21
|
"import": "./dist/cli/index.js"
|
|
@@ -43,11 +42,11 @@
|
|
|
43
42
|
"bun-bundler"
|
|
44
43
|
],
|
|
45
44
|
"bin": {
|
|
46
|
-
"bunup": "
|
|
45
|
+
"bunup": "dist/cli/index.js"
|
|
47
46
|
},
|
|
48
47
|
"dependencies": {
|
|
49
48
|
"@clack/prompts": "^0.10.1",
|
|
50
|
-
"bun-dts": "^0.1.
|
|
49
|
+
"bun-dts": "^0.1.69",
|
|
51
50
|
"chokidar": "^4.0.3",
|
|
52
51
|
"coffi": "^0.1.31",
|
|
53
52
|
"giget": "^2.0.0",
|
package/bin/bunup.mjs
DELETED