bunup 0.14.14 → 0.14.17
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
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import { loadConfig } from "coffi";
|
|
27
27
|
import pc4 from "picocolors";
|
|
28
28
|
// packages/bunup/package.json
|
|
29
|
-
var version = "0.14.
|
|
29
|
+
var version = "0.14.17";
|
|
30
30
|
|
|
31
31
|
// packages/bunup/src/printer/print-build-report.ts
|
|
32
32
|
import { promisify } from "util";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Arrayable, BuildContext, BuildMeta, BuildOptions, BuildOutput, BuildOutputFile, BunupPlugin, DefineConfigItem, DefineWorkspaceItem, WithOptional } from "./shared/bunup-
|
|
1
|
+
import { Arrayable, BuildContext, BuildMeta, BuildOptions, BuildOutput, BuildOutputFile, BunupPlugin, DefineConfigItem, DefineWorkspaceItem, WithOptional } from "./shared/bunup-a8zeh83z";
|
|
2
2
|
declare function build(userOptions: Partial<BuildOptions>, rootDir?: string): Promise<BuildOutput>;
|
|
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/plugins.d.ts
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { BuildOptions, BunupPlugin, BunupPluginHooks, exports, injectStyles, unused } from "./shared/bunup-
|
|
1
|
+
import { BuildOptions, BunupPlugin, BunupPluginHooks, exports, injectStyles, unused } from "./shared/bunup-a8zeh83z";
|
|
2
2
|
type CopyOptions = {
|
|
3
3
|
/** Whether to follow symbolic links when copying files. */
|
|
4
|
-
followSymlinks?: boolean
|
|
4
|
+
followSymlinks?: boolean;
|
|
5
5
|
/** Whether to exclude dotfiles (files starting with a dot) from being copied. */
|
|
6
|
-
excludeDotfiles?: boolean
|
|
6
|
+
excludeDotfiles?: boolean;
|
|
7
7
|
/** Whether to override existing files. Default: true */
|
|
8
|
-
override?: boolean
|
|
8
|
+
override?: boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Behavior in watch mode:
|
|
11
11
|
* - 'changed': Only copy files that have changed (default)
|
|
12
12
|
* - 'always': Always copy all files on each build
|
|
13
13
|
* - 'skip': Skip copying in watch mode
|
|
14
14
|
*/
|
|
15
|
-
watchMode?: "changed" | "always" | "skip"
|
|
15
|
+
watchMode?: "changed" | "always" | "skip";
|
|
16
16
|
};
|
|
17
17
|
type TransformContext = {
|
|
18
18
|
/** The file content */
|
|
19
|
-
content: string | ArrayBuffer
|
|
19
|
+
content: string | ArrayBuffer;
|
|
20
20
|
/** The source file path */
|
|
21
|
-
path: string
|
|
21
|
+
path: string;
|
|
22
22
|
/** The destination file path */
|
|
23
|
-
destination: string
|
|
23
|
+
destination: string;
|
|
24
24
|
/** Build options */
|
|
25
|
-
options: BuildOptions
|
|
25
|
+
options: BuildOptions;
|
|
26
26
|
};
|
|
27
27
|
type TransformResult = string | ArrayBuffer | {
|
|
28
|
-
content: string | ArrayBuffer
|
|
29
|
-
filename: string
|
|
28
|
+
content: string | ArrayBuffer;
|
|
29
|
+
filename: string;
|
|
30
30
|
};
|
|
31
31
|
type TransformFunction = (context: TransformContext) => TransformResult | Promise<TransformResult>;
|
|
32
32
|
/**
|
|
@@ -2,18 +2,18 @@ import { GenerateDtsOptions } from "@bunup/dts";
|
|
|
2
2
|
import { BunPlugin as BunPlugin2 } from "bun";
|
|
3
3
|
type PackageJson = {
|
|
4
4
|
/** The parsed content of the package.json file */
|
|
5
|
-
data: Record<string, any> | null
|
|
5
|
+
data: Record<string, any> | null;
|
|
6
6
|
/** The path to the package.json file */
|
|
7
|
-
path: string | null
|
|
7
|
+
path: string | null;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* Represents the meta data of the build
|
|
11
11
|
*/
|
|
12
12
|
type BuildMeta = {
|
|
13
13
|
/** The package.json file */
|
|
14
|
-
packageJson: PackageJson
|
|
14
|
+
packageJson: PackageJson;
|
|
15
15
|
/** The root directory of the build */
|
|
16
|
-
rootDir: string
|
|
16
|
+
rootDir: string;
|
|
17
17
|
};
|
|
18
18
|
type BuildOutputFile = {
|
|
19
19
|
/**
|
|
@@ -21,39 +21,39 @@ type BuildOutputFile = {
|
|
|
21
21
|
*
|
|
22
22
|
* Undefined for non-entry point files (e.g., assets, sourcemaps, chunks)
|
|
23
23
|
*/
|
|
24
|
-
entrypoint: string | undefined
|
|
24
|
+
entrypoint: string | undefined;
|
|
25
25
|
/** The kind of the file */
|
|
26
|
-
kind: "entry-point" | "chunk" | "asset" | "sourcemap" | "bytecode"
|
|
26
|
+
kind: "entry-point" | "chunk" | "asset" | "sourcemap" | "bytecode";
|
|
27
27
|
/** Absolute path to the generated file */
|
|
28
|
-
fullPath: string
|
|
28
|
+
fullPath: string;
|
|
29
29
|
/** Path to the generated file relative to the root directory */
|
|
30
|
-
pathRelativeToRootDir: string
|
|
30
|
+
pathRelativeToRootDir: string;
|
|
31
31
|
/** Path to the generated file relative to the output directory */
|
|
32
|
-
pathRelativeToOutdir: string
|
|
32
|
+
pathRelativeToOutdir: string;
|
|
33
33
|
/** Whether the file is a dts file */
|
|
34
|
-
dts: boolean
|
|
34
|
+
dts: boolean;
|
|
35
35
|
/** The format of the output file */
|
|
36
|
-
format: Format
|
|
36
|
+
format: Format;
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
39
|
* Represents the output of a build operation
|
|
40
40
|
*/
|
|
41
41
|
type BuildOutput = {
|
|
42
42
|
/** Array of generated files with their paths and contents */
|
|
43
|
-
files: BuildOutputFile[]
|
|
43
|
+
files: BuildOutputFile[];
|
|
44
44
|
/** Options used for the build */
|
|
45
|
-
options: BuildOptions
|
|
45
|
+
options: BuildOptions;
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
48
|
* Context provided to build hooks
|
|
49
49
|
*/
|
|
50
50
|
type BuildContext = {
|
|
51
51
|
/** The build options that were used */
|
|
52
|
-
options: BuildOptions
|
|
52
|
+
options: BuildOptions;
|
|
53
53
|
/** The output of the build */
|
|
54
|
-
output: BuildOutput
|
|
54
|
+
output: BuildOutput;
|
|
55
55
|
/** The meta data of the build */
|
|
56
|
-
meta: BuildMeta
|
|
56
|
+
meta: BuildMeta;
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
59
|
* Hooks that can be implemented by Bunup plugins
|
|
@@ -63,21 +63,21 @@ type BunupPluginHooks = {
|
|
|
63
63
|
* Called when a build is successfully completed
|
|
64
64
|
* @param ctx Build context containing options and output
|
|
65
65
|
*/
|
|
66
|
-
onBuildDone?: (ctx: BuildContext) => MaybePromise<void
|
|
66
|
+
onBuildDone?: (ctx: BuildContext) => MaybePromise<void>;
|
|
67
67
|
/**
|
|
68
68
|
* Called before a build starts
|
|
69
69
|
* @param options Build options that will be used
|
|
70
70
|
*/
|
|
71
|
-
onBuildStart?: (options: BuildOptions) => MaybePromise<void
|
|
71
|
+
onBuildStart?: (options: BuildOptions) => MaybePromise<void>;
|
|
72
72
|
};
|
|
73
73
|
/**
|
|
74
74
|
* Represents a Bunup-specific plugin
|
|
75
75
|
*/
|
|
76
76
|
type BunupPlugin = {
|
|
77
77
|
/** Optional name for the plugin */
|
|
78
|
-
name?: string
|
|
78
|
+
name?: string;
|
|
79
79
|
/** The hooks implemented by this plugin */
|
|
80
|
-
hooks: BunupPluginHooks
|
|
80
|
+
hooks: BunupPluginHooks;
|
|
81
81
|
};
|
|
82
82
|
type CustomExports = Record<string, string | Record<string, string | Record<string, string>>>;
|
|
83
83
|
type Exclude2 = ((ctx: BuildContext) => string[] | undefined) | string[];
|
|
@@ -153,13 +153,13 @@ type InjectStylesOptions = {
|
|
|
153
153
|
*
|
|
154
154
|
* The default injection handles cases like when `document` is undefined (e.g., server-side rendering) and compatibility with older browsers. Consider these when implementing custom injection logic.
|
|
155
155
|
*/
|
|
156
|
-
inject?: (css: string, filePath: string) => MaybePromise<string
|
|
156
|
+
inject?: (css: string, filePath: string) => MaybePromise<string>;
|
|
157
157
|
/**
|
|
158
158
|
* Whether to minify the styles being injected.
|
|
159
159
|
*
|
|
160
160
|
* @default true
|
|
161
161
|
*/
|
|
162
|
-
minify?: boolean
|
|
162
|
+
minify?: boolean;
|
|
163
163
|
};
|
|
164
164
|
/**
|
|
165
165
|
* A plugin that injects styles into the document head at runtime instead of bundling them to the build output.
|
|
@@ -198,7 +198,7 @@ type CSSOptions = {
|
|
|
198
198
|
*
|
|
199
199
|
* @see https://bunup.dev/docs/guide/css#css-modules-and-typescript
|
|
200
200
|
*/
|
|
201
|
-
typedModules?: boolean
|
|
201
|
+
typedModules?: boolean;
|
|
202
202
|
/**
|
|
203
203
|
* Inject CSS styles into the document head at runtime instead of bundling them to the build output.
|
|
204
204
|
*
|
|
@@ -207,13 +207,13 @@ type CSSOptions = {
|
|
|
207
207
|
*
|
|
208
208
|
* @see https://bunup.dev/docs/extra-options/inject-styles
|
|
209
209
|
*/
|
|
210
|
-
inject?: boolean | InjectStylesOptions
|
|
210
|
+
inject?: boolean | InjectStylesOptions;
|
|
211
211
|
};
|
|
212
212
|
type OnSuccess = ((options: Partial<BuildOptions>) => MaybePromise<void> | (() => void)) | string | {
|
|
213
213
|
/**
|
|
214
214
|
* The shell command to execute after a successful build
|
|
215
215
|
*/
|
|
216
|
-
cmd: string
|
|
216
|
+
cmd: string;
|
|
217
217
|
/**
|
|
218
218
|
* Additional options for the command execution
|
|
219
219
|
*/
|
|
@@ -221,22 +221,22 @@ type OnSuccess = ((options: Partial<BuildOptions>) => MaybePromise<void> | (() =
|
|
|
221
221
|
/**
|
|
222
222
|
* Working directory for the command
|
|
223
223
|
*/
|
|
224
|
-
cwd?: string
|
|
224
|
+
cwd?: string;
|
|
225
225
|
/**
|
|
226
226
|
* Environment variables to pass to the command
|
|
227
227
|
* @default process.env
|
|
228
228
|
*/
|
|
229
|
-
env?: Record<string, string | undefined
|
|
229
|
+
env?: Record<string, string | undefined>;
|
|
230
230
|
/**
|
|
231
231
|
* Maximum time in milliseconds the command is allowed to run
|
|
232
232
|
*/
|
|
233
|
-
timeout?: number
|
|
233
|
+
timeout?: number;
|
|
234
234
|
/**
|
|
235
235
|
* Signal to use when killing the process
|
|
236
236
|
* @default 'SIGTERM'
|
|
237
237
|
*/
|
|
238
|
-
killSignal?: NodeJS.Signals | number
|
|
239
|
-
}
|
|
238
|
+
killSignal?: NodeJS.Signals | number;
|
|
239
|
+
};
|
|
240
240
|
};
|
|
241
241
|
type ReportOptions = {
|
|
242
242
|
/**
|
|
@@ -246,7 +246,7 @@ type ReportOptions = {
|
|
|
246
246
|
*
|
|
247
247
|
* @default true
|
|
248
248
|
*/
|
|
249
|
-
gzip?: boolean
|
|
249
|
+
gzip?: boolean;
|
|
250
250
|
/**
|
|
251
251
|
* Enable brotli compression size calculation.
|
|
252
252
|
*
|
|
@@ -254,13 +254,13 @@ type ReportOptions = {
|
|
|
254
254
|
*
|
|
255
255
|
* @default false
|
|
256
256
|
*/
|
|
257
|
-
brotli?: boolean
|
|
257
|
+
brotli?: boolean;
|
|
258
258
|
/**
|
|
259
259
|
* Maximum bundle size in bytes. Will warn if exceeded.
|
|
260
260
|
*
|
|
261
261
|
* @default undefined
|
|
262
262
|
*/
|
|
263
|
-
maxBundleSize?: number
|
|
263
|
+
maxBundleSize?: number;
|
|
264
264
|
};
|
|
265
265
|
interface BuildOptions {
|
|
266
266
|
/**
|
|
@@ -332,7 +332,7 @@ interface BuildOptions {
|
|
|
332
332
|
* Can also be configured with GenerateDtsOptions for more control
|
|
333
333
|
*/
|
|
334
334
|
dts?: boolean | (Pick<GenerateDtsOptions, "resolve" | "splitting" | "minify"> & {
|
|
335
|
-
entry?: string | string[]
|
|
335
|
+
entry?: string | string[];
|
|
336
336
|
});
|
|
337
337
|
/**
|
|
338
338
|
* Path to a preferred tsconfig.json file to use for declaration generation
|
|
@@ -596,8 +596,8 @@ type WithOptional<
|
|
|
596
596
|
type Arrayable<T> = T | T[];
|
|
597
597
|
type DefineConfigItem = WithOptional<BuildOptions, "outDir" | "format" | "entry">;
|
|
598
598
|
type DefineWorkspaceItem = {
|
|
599
|
-
name: string
|
|
600
|
-
root: string
|
|
601
|
-
config: DefineConfigItem | DefineConfigItem[]
|
|
599
|
+
name: string;
|
|
600
|
+
root: string;
|
|
601
|
+
config: DefineConfigItem | DefineConfigItem[];
|
|
602
602
|
};
|
|
603
603
|
export { WithOptional, Arrayable, DefineConfigItem, DefineWorkspaceItem, BuildMeta, BuildOutputFile, BuildOutput, BuildContext, BunupPluginHooks, BunupPlugin, exports, injectStyles, unused, BuildOptions };
|
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.17",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
"bunup": "dist/cli/index.js"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@bunup/dts": "0.14.
|
|
50
|
+
"@bunup/dts": "0.14.17",
|
|
51
51
|
"chokidar": "^4.0.3",
|
|
52
|
-
"coffi": "^0.1.
|
|
53
|
-
"lightningcss": "^1.30.
|
|
52
|
+
"coffi": "^0.1.37",
|
|
53
|
+
"lightningcss": "^1.30.2",
|
|
54
54
|
"picocolors": "^1.1.1",
|
|
55
55
|
"tinyexec": "^1.0.1",
|
|
56
56
|
"tree-kill": "^1.2.2",
|
|
57
57
|
"zlye": "^0.4.4",
|
|
58
|
-
"@bunup/shared": "0.14.
|
|
58
|
+
"@bunup/shared": "0.14.17"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"typescript": "
|
|
61
|
+
"typescript": "latest"
|
|
62
62
|
},
|
|
63
63
|
"peerDependenciesMeta": {
|
|
64
64
|
"typescript": {
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@types/bun": "^1.2.
|
|
69
|
+
"@types/bun": "^1.2.23"
|
|
70
70
|
}
|
|
71
71
|
}
|