quickbundle 2.8.0 → 2.10.0
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 +2 -2
- package/bin/index.mjs +2 -2
- package/dist/index.mjs +32 -14
- package/package.json +33 -32
package/README.md
CHANGED
|
@@ -17,8 +17,8 @@ Quickbundle allows you to bundle a library in a **quick**, **fast** and **easy**
|
|
|
17
17
|
- Support of several loaders including JavaScript, TypeScript, JSX, JSON, and Images.
|
|
18
18
|
- TypeScript's declaration file (`.d.ts`) bundling.
|
|
19
19
|
- Automatic dependency inclusion:
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
- For the build and watch mode, `peerDependencies` and `dependencies` are not bundled in the final output, `devDependencies` are unless they're not imported.
|
|
21
|
+
- For the compile mode, all dependencies are included to make the code standalone.
|
|
22
22
|
|
|
23
23
|
[^1]: A [module bundler](https://rollupjs.org/) optimized for better tree-shaking processing and seamless interoperability of CommonJS and ESM formats with minimal code footprint.
|
|
24
24
|
|
package/bin/index.mjs
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
|
|
6
|
-
const
|
|
6
|
+
const package_ = createRequire(import.meta.url)("../package.json");
|
|
7
7
|
|
|
8
|
-
import(join("..",
|
|
8
|
+
import(join("..", package_.exports["."].default));
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { finished } from 'node:stream/promises';
|
|
|
3
3
|
import { Readable } from 'node:stream';
|
|
4
4
|
import process from 'node:process';
|
|
5
5
|
import { resolve, dirname, join, basename } from 'node:path';
|
|
6
|
-
import { copyFile as copyFile$1,
|
|
6
|
+
import { copyFile as copyFile$1, rename, mkdir, writeFile as writeFile$1, rm, readFile as readFile$1 } from 'node:fs/promises';
|
|
7
7
|
import { createWriteStream } from 'node:fs';
|
|
8
8
|
import decompress from 'decompress';
|
|
9
9
|
import { watch as watch$1, rollup } from 'rollup';
|
|
@@ -19,7 +19,7 @@ import os from 'node:os';
|
|
|
19
19
|
import { gzipSize } from 'gzip-size';
|
|
20
20
|
|
|
21
21
|
var name = "quickbundle";
|
|
22
|
-
var version = "2.
|
|
22
|
+
var version = "2.10.0";
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Resolve a relative path from the Quickbundle node modules directory.
|
|
@@ -121,14 +121,16 @@ const watch = (input)=>{
|
|
|
121
121
|
case "START":
|
|
122
122
|
{
|
|
123
123
|
startDuration = Date.now();
|
|
124
|
-
clearLog(
|
|
124
|
+
clearLog("Build in progress…", {
|
|
125
125
|
type: "information"
|
|
126
126
|
});
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
case "BUNDLE_END":
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
{
|
|
131
|
+
await event.result.close();
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
132
134
|
case "END":
|
|
133
135
|
{
|
|
134
136
|
const duration = Date.now() - startDuration;
|
|
@@ -156,11 +158,12 @@ const clearLog = (...input)=>{
|
|
|
156
158
|
|
|
157
159
|
const require = createRequire(import.meta.url);
|
|
158
160
|
const PKG = require(resolveFromExternalDirectory("package.json"));
|
|
159
|
-
const
|
|
161
|
+
const DEFAULT_OPTIONS = {
|
|
160
162
|
minification: false,
|
|
161
163
|
sourceMaps: false,
|
|
162
164
|
standalone: false
|
|
163
|
-
}
|
|
165
|
+
};
|
|
166
|
+
const createConfiguration = (options = DEFAULT_OPTIONS)=>{
|
|
164
167
|
const buildableExports = getBuildableExports(options);
|
|
165
168
|
return {
|
|
166
169
|
data: buildableExports.flatMap((buildableExport)=>{
|
|
@@ -328,7 +331,10 @@ const createTypesConfig = (entryPoints, options)=>{
|
|
|
328
331
|
}),
|
|
329
332
|
dts({
|
|
330
333
|
compilerOptions: {
|
|
331
|
-
|
|
334
|
+
declaration: true,
|
|
335
|
+
emitDeclarationOnly: true,
|
|
336
|
+
incremental: false,
|
|
337
|
+
preserveSymlinks: false
|
|
332
338
|
},
|
|
333
339
|
respectExternal: true
|
|
334
340
|
})
|
|
@@ -377,8 +383,8 @@ const build = async (input)=>{
|
|
|
377
383
|
elapsedTime: Date.now() - initialTime,
|
|
378
384
|
filePath: outputFilePath
|
|
379
385
|
});
|
|
380
|
-
}).catch((
|
|
381
|
-
reject(
|
|
386
|
+
}).catch((error)=>{
|
|
387
|
+
reject(error);
|
|
382
388
|
});
|
|
383
389
|
}));
|
|
384
390
|
}
|
|
@@ -468,15 +474,23 @@ const getOsType = (input)=>{
|
|
|
468
474
|
switch(input){
|
|
469
475
|
case "Windows_NT":
|
|
470
476
|
case "win":
|
|
471
|
-
|
|
477
|
+
{
|
|
478
|
+
return "windows";
|
|
479
|
+
}
|
|
472
480
|
case "Darwin":
|
|
473
481
|
case "darwin":
|
|
474
|
-
|
|
482
|
+
{
|
|
483
|
+
return "macos";
|
|
484
|
+
}
|
|
475
485
|
case "Linux":
|
|
476
486
|
case "linux":
|
|
477
|
-
|
|
487
|
+
{
|
|
488
|
+
return "linux";
|
|
489
|
+
}
|
|
478
490
|
default:
|
|
479
|
-
|
|
491
|
+
{
|
|
492
|
+
throw new Error(`Unsupported operating system \`${input}\``);
|
|
493
|
+
}
|
|
480
494
|
}
|
|
481
495
|
};
|
|
482
496
|
const matchRuntimeParts = createRegExpMatcher(/^node-(?<version>v\d+\.\d+\.\d+)-(?<os>darwin|linux|win)-(?<architecture>arm64|x64|x86)$/);
|
|
@@ -547,6 +561,10 @@ const createBuildCommand = (program)=>{
|
|
|
547
561
|
return index === 0 ? message : ` ${message}`;
|
|
548
562
|
}).join("\n"), {
|
|
549
563
|
label: `${item.filePath} (took ${item.elapsedTime}ms)`,
|
|
564
|
+
lineBreak: {
|
|
565
|
+
end: false,
|
|
566
|
+
start: true
|
|
567
|
+
},
|
|
550
568
|
type: "information"
|
|
551
569
|
});
|
|
552
570
|
});
|
package/package.json
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "quickbundle",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "The zero-configuration transpiler and bundler for the web",
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "Ayoub Adib",
|
|
7
|
-
"email": "adbayb@gmail.com",
|
|
8
|
-
"url": "https://twitter.com/adbayb"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git@github.com:adbayb/quickbundle.git",
|
|
13
|
-
"directory": "quickbundle"
|
|
14
|
-
},
|
|
15
|
-
"license": "MIT",
|
|
16
5
|
"keywords": [
|
|
17
6
|
"library",
|
|
18
7
|
"bundle",
|
|
@@ -25,13 +14,17 @@
|
|
|
25
14
|
"swc",
|
|
26
15
|
"microbundle"
|
|
27
16
|
],
|
|
28
|
-
"
|
|
29
|
-
"
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git@github.com:adbayb/quickbundle.git",
|
|
20
|
+
"directory": "quickbundle"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": {
|
|
24
|
+
"name": "Ayoub Adib",
|
|
25
|
+
"email": "adbayb@gmail.com",
|
|
26
|
+
"url": "https://twitter.com/adbayb"
|
|
30
27
|
},
|
|
31
|
-
"files": [
|
|
32
|
-
"bin",
|
|
33
|
-
"dist"
|
|
34
|
-
],
|
|
35
28
|
"type": "module",
|
|
36
29
|
"exports": {
|
|
37
30
|
".": {
|
|
@@ -39,34 +32,42 @@
|
|
|
39
32
|
"default": "./dist/index.mjs"
|
|
40
33
|
}
|
|
41
34
|
},
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
},
|
|
45
|
-
"peerDependenciesMeta": {
|
|
46
|
-
"typescript": {
|
|
47
|
-
"optional": true
|
|
48
|
-
}
|
|
35
|
+
"bin": {
|
|
36
|
+
"quickbundle": "bin/index.mjs"
|
|
49
37
|
},
|
|
38
|
+
"files": [
|
|
39
|
+
"bin",
|
|
40
|
+
"dist"
|
|
41
|
+
],
|
|
50
42
|
"dependencies": {
|
|
51
|
-
"@rollup/plugin-commonjs": "^28.0.
|
|
43
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
52
44
|
"@rollup/plugin-json": "^6.1.0",
|
|
53
|
-
"@rollup/plugin-node-resolve": "^
|
|
45
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
54
46
|
"@rollup/plugin-url": "^8.0.2",
|
|
55
|
-
"@swc/core": "^1.
|
|
47
|
+
"@swc/core": "^1.11.7",
|
|
56
48
|
"decompress": "^4.2.1",
|
|
57
49
|
"gzip-size": "^7.0.0",
|
|
58
|
-
"rollup": "^4.
|
|
50
|
+
"rollup": "^4.34.9",
|
|
59
51
|
"rollup-plugin-dts": "^6.1.1",
|
|
60
|
-
"rollup-plugin-node-externals": "^
|
|
52
|
+
"rollup-plugin-node-externals": "^8.0.0",
|
|
61
53
|
"rollup-plugin-swc3": "^0.12.1",
|
|
62
|
-
"termost": "^1.
|
|
54
|
+
"termost": "^1.4.0"
|
|
63
55
|
},
|
|
64
56
|
"devDependencies": {
|
|
65
57
|
"@types/decompress": "4.2.7",
|
|
66
|
-
"@types/node": "22.9
|
|
58
|
+
"@types/node": "22.13.9"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"typescript": "^4.7.0 || ^5.0.0"
|
|
62
|
+
},
|
|
63
|
+
"peerDependenciesMeta": {
|
|
64
|
+
"typescript": {
|
|
65
|
+
"optional": true
|
|
66
|
+
}
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "rollup --config ./bundler.config.ts --configPlugin rollup-plugin-swc3",
|
|
70
|
+
"test": "exit 0",
|
|
70
71
|
"watch": "rollup --watch --config ./bundler.config.ts --configPlugin rollup-plugin-swc3"
|
|
71
72
|
}
|
|
72
73
|
}
|