quickbundle 2.8.0 → 2.9.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 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
- - 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.
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 pkg = createRequire(import.meta.url)("../package.json");
6
+ const package_ = createRequire(import.meta.url)("../package.json");
7
7
 
8
- import(join("..", pkg.exports["."].default));
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, rm, writeFile as writeFile$1, rename, mkdir, readFile as readFile$1 } from 'node:fs/promises';
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.8.0";
22
+ var version = "2.9.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(`Build in progress...`, {
124
+ clearLog("Build in progress…", {
125
125
  type: "information"
126
126
  });
127
127
  return;
128
128
  }
129
129
  case "BUNDLE_END":
130
- await event.result.close();
131
- break;
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 createConfiguration = (options = {
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)=>{
@@ -377,8 +380,8 @@ const build = async (input)=>{
377
380
  elapsedTime: Date.now() - initialTime,
378
381
  filePath: outputFilePath
379
382
  });
380
- }).catch((reason)=>{
381
- reject(reason);
383
+ }).catch((error)=>{
384
+ reject(error);
382
385
  });
383
386
  }));
384
387
  }
@@ -468,15 +471,23 @@ const getOsType = (input)=>{
468
471
  switch(input){
469
472
  case "Windows_NT":
470
473
  case "win":
471
- return "windows";
474
+ {
475
+ return "windows";
476
+ }
472
477
  case "Darwin":
473
478
  case "darwin":
474
- return "macos";
479
+ {
480
+ return "macos";
481
+ }
475
482
  case "Linux":
476
483
  case "linux":
477
- return "linux";
484
+ {
485
+ return "linux";
486
+ }
478
487
  default:
479
- throw new Error(`Unsupported operating system \`${input}\``);
488
+ {
489
+ throw new Error(`Unsupported operating system \`${input}\``);
490
+ }
480
491
  }
481
492
  };
482
493
  const matchRuntimeParts = createRegExpMatcher(/^node-(?<version>v\d+\.\d+\.\d+)-(?<os>darwin|linux|win)-(?<architecture>arm64|x64|x86)$/);
@@ -547,6 +558,10 @@ const createBuildCommand = (program)=>{
547
558
  return index === 0 ? message : ` ${message}`;
548
559
  }).join("\n"), {
549
560
  label: `${item.filePath} (took ${item.elapsedTime}ms)`,
561
+ lineBreak: {
562
+ end: false,
563
+ start: true
564
+ },
550
565
  type: "information"
551
566
  });
552
567
  });
package/package.json CHANGED
@@ -1,18 +1,7 @@
1
1
  {
2
2
  "name": "quickbundle",
3
- "version": "2.8.0",
3
+ "version": "2.9.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
- "bin": {
29
- "quickbundle": "bin/index.mjs"
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
- "peerDependencies": {
43
- "typescript": "^4.7.0 || ^5.0.0"
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.1",
43
+ "@rollup/plugin-commonjs": "^28.0.2",
52
44
  "@rollup/plugin-json": "^6.1.0",
53
- "@rollup/plugin-node-resolve": "^15.3.0",
45
+ "@rollup/plugin-node-resolve": "^16.0.0",
54
46
  "@rollup/plugin-url": "^8.0.2",
55
- "@swc/core": "^1.9.1",
47
+ "@swc/core": "^1.10.18",
56
48
  "decompress": "^4.2.1",
57
49
  "gzip-size": "^7.0.0",
58
- "rollup": "^4.24.4",
50
+ "rollup": "^4.34.8",
59
51
  "rollup-plugin-dts": "^6.1.1",
60
- "rollup-plugin-node-externals": "^7.1.3",
52
+ "rollup-plugin-node-externals": "^8.0.0",
61
53
  "rollup-plugin-swc3": "^0.12.1",
62
- "termost": "^1.2.0"
54
+ "termost": "^1.4.0"
63
55
  },
64
56
  "devDependencies": {
65
57
  "@types/decompress": "4.2.7",
66
- "@types/node": "22.9.0"
58
+ "@types/node": "22.13.5"
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
  }