bunup 0.11.14 → 0.11.20
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 +10 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +7 -7
- package/dist/shared/{chunk-ca1dh9de.js → bunup-6vfygtwp.js} +11 -11
- package/dist/shared/{chunk-gzzvjwk2.d.ts → bunup-7rvhqvrm.d.ts} +1 -1
- package/dist/shared/{chunk-6rymy2z1.js → bunup-jber4h9a.js} +6 -6
- package/package.json +5 -33
- package/LICENSE +0 -21
package/dist/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
build,
|
|
5
5
|
createBuildOptions,
|
|
6
6
|
processLoadedConfigs
|
|
7
|
-
} from "../shared/
|
|
7
|
+
} from "../shared/bunup-6vfygtwp.js";
|
|
8
8
|
import {
|
|
9
9
|
BunupCLIError,
|
|
10
10
|
BunupWatchError,
|
|
@@ -18,15 +18,15 @@ import {
|
|
|
18
18
|
logger,
|
|
19
19
|
parseErrorMessage,
|
|
20
20
|
setSilent
|
|
21
|
-
} from "../shared/
|
|
21
|
+
} from "../shared/bunup-jber4h9a.js";
|
|
22
22
|
|
|
23
|
-
// src/cli/index.ts
|
|
23
|
+
// packages/bunup/src/cli/index.ts
|
|
24
24
|
import { loadConfig } from "coffi";
|
|
25
25
|
import pc3 from "picocolors";
|
|
26
|
-
// package.json
|
|
27
|
-
var version = "0.11.
|
|
26
|
+
// packages/bunup/package.json
|
|
27
|
+
var version = "0.11.18";
|
|
28
28
|
|
|
29
|
-
// src/watch.ts
|
|
29
|
+
// packages/bunup/src/watch.ts
|
|
30
30
|
import path from "path";
|
|
31
31
|
import pc from "picocolors";
|
|
32
32
|
async function watch(partialOptions, rootDir) {
|
|
@@ -79,13 +79,13 @@ async function watch(partialOptions, rootDir) {
|
|
|
79
79
|
await triggerRebuild(true);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
// src/cli/options.ts
|
|
82
|
+
// packages/bunup/src/cli/options.ts
|
|
83
83
|
import pc2 from "picocolors";
|
|
84
84
|
|
|
85
|
-
// src/constants/index.ts
|
|
85
|
+
// packages/bunup/src/constants/index.ts
|
|
86
86
|
var BUNUP_DOCS_URL = "https://bunup.dev/docs";
|
|
87
87
|
|
|
88
|
-
// src/cli/options.ts
|
|
88
|
+
// packages/bunup/src/cli/options.ts
|
|
89
89
|
var createHandlers = () => ({
|
|
90
90
|
boolean: (key) => (value, options) => {
|
|
91
91
|
options[key] = value === true || value === "true";
|
|
@@ -467,7 +467,7 @@ var parseCliOptions = (argv) => {
|
|
|
467
467
|
return options;
|
|
468
468
|
};
|
|
469
469
|
|
|
470
|
-
// src/cli/index.ts
|
|
470
|
+
// packages/bunup/src/cli/index.ts
|
|
471
471
|
async function main(args = Bun.argv.slice(2)) {
|
|
472
472
|
const cliOptions = parseCliOptions(args);
|
|
473
473
|
setSilent(cliOptions.silent);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Arrayable, BuildContext, BuildMeta, BuildOptions, BuildOutput, BuildOutputFile, BunupPlugin, DefineConfigItem, DefineWorkspaceItem, WithOptional } from "./shared/
|
|
1
|
+
import { Arrayable, BuildContext, BuildMeta, BuildOptions, BuildOutput, BuildOutputFile, BunupPlugin, DefineConfigItem, DefineWorkspaceItem, WithOptional } from "./shared/bunup-7rvhqvrm";
|
|
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?: Partial<DefineConfigItem>): DefineWorkspaceItem[];
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
build
|
|
4
|
-
} from "./shared/
|
|
5
|
-
import"./shared/
|
|
6
|
-
// src/define.ts
|
|
4
|
+
} from "./shared/bunup-6vfygtwp.js";
|
|
5
|
+
import"./shared/bunup-jber4h9a.js";
|
|
6
|
+
// packages/bunup/src/define.ts
|
|
7
7
|
function defineConfig(options) {
|
|
8
8
|
return options;
|
|
9
9
|
}
|
package/dist/plugins.d.ts
CHANGED
package/dist/plugins.js
CHANGED
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
getPackageForPlugin,
|
|
10
10
|
isDirectoryPath,
|
|
11
11
|
logger
|
|
12
|
-
} from "./shared/
|
|
12
|
+
} from "./shared/bunup-jber4h9a.js";
|
|
13
13
|
|
|
14
|
-
// src/plugins/built-in/copy.ts
|
|
14
|
+
// packages/bunup/src/plugins/built-in/copy.ts
|
|
15
15
|
import { basename, join } from "path";
|
|
16
16
|
function copy(pattern, outPath) {
|
|
17
17
|
return {
|
|
@@ -34,7 +34,7 @@ function copy(pattern, outPath) {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
// src/plugins/built-in/exports.ts
|
|
37
|
+
// packages/bunup/src/plugins/built-in/exports.ts
|
|
38
38
|
import path from "path";
|
|
39
39
|
function exports(options = {}) {
|
|
40
40
|
return {
|
|
@@ -295,7 +295,7 @@ function exportFieldToEntryPoint(exportField) {
|
|
|
295
295
|
return "module";
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
// src/plugins/built-in/inject-styles.ts
|
|
298
|
+
// packages/bunup/src/plugins/built-in/inject-styles.ts
|
|
299
299
|
import path2 from "path";
|
|
300
300
|
function injectStyles(options) {
|
|
301
301
|
const { inject, ...transformOptions } = options ?? {};
|
|
@@ -350,7 +350,7 @@ function injectStyles(options) {
|
|
|
350
350
|
}
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
// src/plugins/built-in/shims.ts
|
|
353
|
+
// packages/bunup/src/plugins/built-in/shims.ts
|
|
354
354
|
function shims() {
|
|
355
355
|
return {
|
|
356
356
|
name: "bunup:shims",
|
|
@@ -400,7 +400,7 @@ const importMetaUrl = pathToFileURL(__filename).href;
|
|
|
400
400
|
}
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
|
-
// src/plugins/built-in/unused.ts
|
|
403
|
+
// packages/bunup/src/plugins/built-in/unused.ts
|
|
404
404
|
import pc from "picocolors";
|
|
405
405
|
function unused(options = {}) {
|
|
406
406
|
const { level = "warn", ignore = [] } = options;
|
|
@@ -448,7 +448,7 @@ function unused(options = {}) {
|
|
|
448
448
|
const removeCommand = pc.cyan(`bun remove ${unusedDependencies.join(" ")}`);
|
|
449
449
|
const message = [
|
|
450
450
|
`
|
|
451
|
-
Your project has ${count} unused ${depText}: ${coloredDeps}.`,
|
|
451
|
+
Your project${buildOptions.name ? ` ${buildOptions.name}` : ""} has ${count} unused ${depText}: ${coloredDeps}.`,
|
|
452
452
|
`You can remove ${count === 1 ? "it" : "them"} with ${removeCommand}`
|
|
453
453
|
].join(" ");
|
|
454
454
|
if (level === "error") {
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
runPluginBuildStartHooks,
|
|
23
23
|
setSilent,
|
|
24
24
|
silent
|
|
25
|
-
} from "./
|
|
25
|
+
} from "./bunup-jber4h9a.js";
|
|
26
26
|
|
|
27
|
-
// src/loaders.ts
|
|
27
|
+
// packages/bunup/src/loaders.ts
|
|
28
28
|
import path from "path";
|
|
29
29
|
import { loadConfig } from "coffi";
|
|
30
30
|
async function processLoadedConfigs(config, cwd, filter) {
|
|
@@ -53,12 +53,12 @@ async function loadPackageJson(cwd = process.cwd()) {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
// src/build.ts
|
|
56
|
+
// packages/bunup/src/build.ts
|
|
57
57
|
import path2 from "path";
|
|
58
|
+
import { generateDts, logIsolatedDeclarationErrors } from "@bunup/dts";
|
|
58
59
|
import pc2 from "picocolors";
|
|
59
|
-
import { generateDts, logIsolatedDeclarationErrors } from "typeroll";
|
|
60
60
|
|
|
61
|
-
// src/helpers/on-success.ts
|
|
61
|
+
// packages/bunup/src/helpers/on-success.ts
|
|
62
62
|
import { exec } from "tinyexec";
|
|
63
63
|
import treeKill from "tree-kill";
|
|
64
64
|
async function executeOnSuccess(onSuccess, options, signal) {
|
|
@@ -97,7 +97,7 @@ async function executeOnSuccess(onSuccess, options, signal) {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
// src/plugins/internal/report.ts
|
|
100
|
+
// packages/bunup/src/plugins/internal/report.ts
|
|
101
101
|
import pc from "picocolors";
|
|
102
102
|
function report() {
|
|
103
103
|
return {
|
|
@@ -157,7 +157,7 @@ function report() {
|
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
// src/plugins/internal/use-client.ts
|
|
160
|
+
// packages/bunup/src/plugins/internal/use-client.ts
|
|
161
161
|
function useClient() {
|
|
162
162
|
return {
|
|
163
163
|
type: "bunup",
|
|
@@ -180,7 +180,7 @@ ${text}`;
|
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
// src/options.ts
|
|
183
|
+
// packages/bunup/src/options.ts
|
|
184
184
|
var DEFAULT_OPTIONS = {
|
|
185
185
|
entry: "src/index.ts",
|
|
186
186
|
format: "esm",
|
|
@@ -237,7 +237,7 @@ function getResolvedEnv(env) {
|
|
|
237
237
|
return typeof env === "string" ? env : undefined;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
// src/helpers/external.ts
|
|
240
|
+
// packages/bunup/src/helpers/external.ts
|
|
241
241
|
function getPackageDepsPatterns(packageJson) {
|
|
242
242
|
return getPackageDeps(packageJson).map((dep) => new RegExp(`^${dep}($|\\/|\\\\)`));
|
|
243
243
|
}
|
|
@@ -251,7 +251,7 @@ function isExternal(path2, options, packageJson) {
|
|
|
251
251
|
return matchesExternalPattern && !isExcludedFromExternal;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
// src/plugins/internal/external-option.ts
|
|
254
|
+
// packages/bunup/src/plugins/internal/external-option.ts
|
|
255
255
|
function externalOptionPlugin(options, packageJson) {
|
|
256
256
|
return {
|
|
257
257
|
name: "bunup:external-option-plugin",
|
|
@@ -270,7 +270,7 @@ function externalOptionPlugin(options, packageJson) {
|
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
// src/build.ts
|
|
273
|
+
// packages/bunup/src/build.ts
|
|
274
274
|
var ac = null;
|
|
275
275
|
async function build(partialOptions, rootDir = process.cwd()) {
|
|
276
276
|
if (ac) {
|
|
@@ -16,7 +16,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __require = import.meta.require;
|
|
18
18
|
|
|
19
|
-
// src/logger.ts
|
|
19
|
+
// packages/bunup/src/logger.ts
|
|
20
20
|
import pc from "picocolors";
|
|
21
21
|
var silent = false;
|
|
22
22
|
function setSilent(value) {
|
|
@@ -174,7 +174,7 @@ var link = (url, label) => {
|
|
|
174
174
|
};
|
|
175
175
|
var logger = Logger.getInstance();
|
|
176
176
|
|
|
177
|
-
// src/errors.ts
|
|
177
|
+
// packages/bunup/src/errors.ts
|
|
178
178
|
import pc2 from "picocolors";
|
|
179
179
|
class BunupError extends Error {
|
|
180
180
|
constructor(message) {
|
|
@@ -302,11 +302,11 @@ var handleErrorAndExit = (error, context) => {
|
|
|
302
302
|
process.exit(1);
|
|
303
303
|
};
|
|
304
304
|
|
|
305
|
-
// src/utils.ts
|
|
305
|
+
// packages/bunup/src/utils.ts
|
|
306
306
|
import fs from "fs/promises";
|
|
307
307
|
import path, { normalize } from "path";
|
|
308
308
|
|
|
309
|
-
// src/constants/re.ts
|
|
309
|
+
// packages/bunup/src/constants/re.ts
|
|
310
310
|
var JS_RE = /\.(js|jsx|cjs|mjs)$/;
|
|
311
311
|
var TS_RE = /\.(ts|tsx|mts|cts)$/;
|
|
312
312
|
var DTS_RE = /\.(d\.(ts|mts|cts))$/;
|
|
@@ -314,7 +314,7 @@ var JS_TS_RE = new RegExp(`${JS_RE.source}|${TS_RE.source}`);
|
|
|
314
314
|
var JS_DTS_RE = new RegExp(`${JS_RE.source}|${DTS_RE.source}`);
|
|
315
315
|
var CSS_RE = /\.(css)$/;
|
|
316
316
|
|
|
317
|
-
// src/utils.ts
|
|
317
|
+
// packages/bunup/src/utils.ts
|
|
318
318
|
function ensureArray(value) {
|
|
319
319
|
return Array.isArray(value) ? value : [value];
|
|
320
320
|
}
|
|
@@ -436,7 +436,7 @@ function replaceExtension(filePath, newExtension) {
|
|
|
436
436
|
return directory + nameWithoutExtension + normalizedExtension;
|
|
437
437
|
}
|
|
438
438
|
|
|
439
|
-
// src/plugins/utils.ts
|
|
439
|
+
// packages/bunup/src/plugins/utils.ts
|
|
440
440
|
import pc3 from "picocolors";
|
|
441
441
|
function filterBunPlugins(plugins) {
|
|
442
442
|
if (!plugins)
|
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.11.
|
|
4
|
+
"version": "0.11.20",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -51,15 +51,7 @@
|
|
|
51
51
|
"picocolors": "^1.1.1",
|
|
52
52
|
"tinyexec": "^1.0.1",
|
|
53
53
|
"tree-kill": "^1.2.2",
|
|
54
|
-
"
|
|
55
|
-
},
|
|
56
|
-
"devDependencies": {
|
|
57
|
-
"@biomejs/biome": "2.2.0",
|
|
58
|
-
"@types/bun": "^1.2.20",
|
|
59
|
-
"bumpp": "^10.2.3",
|
|
60
|
-
"lightningcss": "^1.30.1",
|
|
61
|
-
"simple-git-hooks": "^2.13.1",
|
|
62
|
-
"typescript": "^5.9.2"
|
|
54
|
+
"@bunup/dts": "0.11.18"
|
|
63
55
|
},
|
|
64
56
|
"peerDependencies": {
|
|
65
57
|
"typescript": ">=4.5.0",
|
|
@@ -73,27 +65,7 @@
|
|
|
73
65
|
"optional": true
|
|
74
66
|
}
|
|
75
67
|
},
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
"dev": "bun run src/cli/index.ts --watch",
|
|
80
|
-
"dev:docs": "bun run --cwd docs dev",
|
|
81
|
-
"format": "biome format .",
|
|
82
|
-
"format:fix": "biome format --write .",
|
|
83
|
-
"lint": "biome check .",
|
|
84
|
-
"lint:fix": "biome check --write .",
|
|
85
|
-
"test": "bun test",
|
|
86
|
-
"tsc": "tsc --noEmit",
|
|
87
|
-
"publish:ci": "npm i -g npm@latest && npm publish",
|
|
88
|
-
"release": "bumpp -r --commit --push --tag",
|
|
89
|
-
"prepare": "simple-git-hooks"
|
|
90
|
-
},
|
|
91
|
-
"simple-git-hooks": {
|
|
92
|
-
"pre-commit": "bun run lint:fix && git add ."
|
|
93
|
-
},
|
|
94
|
-
"workspaces": [
|
|
95
|
-
"docs",
|
|
96
|
-
"tests",
|
|
97
|
-
"examples/**"
|
|
98
|
-
]
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@types/bun": "^1.2.21"
|
|
70
|
+
}
|
|
99
71
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024-present Arshad Yaseen
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|