@unpackjs/core 3.7.7 → 3.7.8

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.
@@ -1,22 +1,22 @@
1
1
  (() => {
2
2
  var __webpack_modules__ = {
3
- 3093: (module, __unused_webpack_exports, __nccwpck_require__) => {
3
+ 818: (module, __unused_webpack_exports, __nccwpck_require__) => {
4
4
  "use strict";
5
- const loader = __nccwpck_require__(2367);
5
+ const loader = __nccwpck_require__(2080);
6
6
  module.exports = loader.default;
7
7
  module.exports.defaultGetLocalIdent =
8
- __nccwpck_require__(5466).defaultGetLocalIdent;
8
+ __nccwpck_require__(537).defaultGetLocalIdent;
9
9
  },
10
- 2367: (__unused_webpack_module, exports, __nccwpck_require__) => {
10
+ 2080: (__unused_webpack_module, exports, __nccwpck_require__) => {
11
11
  "use strict";
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports["default"] = loader;
14
14
  var _postcss = _interopRequireDefault(__nccwpck_require__(1940));
15
15
  var _package = _interopRequireDefault(__nccwpck_require__(444));
16
16
  var _semver = __nccwpck_require__(5200);
17
- var _options = _interopRequireDefault(__nccwpck_require__(8531));
18
- var _plugins = __nccwpck_require__(6676);
19
- var _utils = __nccwpck_require__(5466);
17
+ var _options = _interopRequireDefault(__nccwpck_require__(1952));
18
+ var _plugins = __nccwpck_require__(2591);
19
+ var _utils = __nccwpck_require__(537);
20
20
  function _interopRequireDefault(obj) {
21
21
  return obj && obj.__esModule ? obj : { default: obj };
22
22
  }
@@ -243,7 +243,7 @@
243
243
  callback(null, `${importCode}${moduleCode}${exportCode}`);
244
244
  }
245
245
  },
246
- 6676: (__unused_webpack_module, exports, __nccwpck_require__) => {
246
+ 2591: (__unused_webpack_module, exports, __nccwpck_require__) => {
247
247
  "use strict";
248
248
  Object.defineProperty(exports, "__esModule", { value: true });
249
249
  Object.defineProperty(exports, "icssParser", {
@@ -265,20 +265,22 @@
265
265
  },
266
266
  });
267
267
  var _postcssImportParser = _interopRequireDefault(
268
- __nccwpck_require__(3551),
268
+ __nccwpck_require__(3132),
269
269
  );
270
- var _postcssIcssParser = _interopRequireDefault(__nccwpck_require__(610));
271
- var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(1381));
270
+ var _postcssIcssParser = _interopRequireDefault(
271
+ __nccwpck_require__(7017),
272
+ );
273
+ var _postcssUrlParser = _interopRequireDefault(__nccwpck_require__(6528));
272
274
  function _interopRequireDefault(obj) {
273
275
  return obj && obj.__esModule ? obj : { default: obj };
274
276
  }
275
277
  },
276
- 610: (__unused_webpack_module, exports, __nccwpck_require__) => {
278
+ 7017: (__unused_webpack_module, exports, __nccwpck_require__) => {
277
279
  "use strict";
278
280
  Object.defineProperty(exports, "__esModule", { value: true });
279
281
  exports["default"] = void 0;
280
282
  var _icssUtils = __nccwpck_require__(229);
281
- var _utils = __nccwpck_require__(5466);
283
+ var _utils = __nccwpck_require__(537);
282
284
  const plugin = (options = {}) => ({
283
285
  postcssPlugin: "postcss-icss-parser",
284
286
  async OnceExit(root) {
@@ -377,14 +379,14 @@
377
379
  plugin.postcss = true;
378
380
  var _default = (exports["default"] = plugin);
379
381
  },
380
- 3551: (__unused_webpack_module, exports, __nccwpck_require__) => {
382
+ 3132: (__unused_webpack_module, exports, __nccwpck_require__) => {
381
383
  "use strict";
382
384
  Object.defineProperty(exports, "__esModule", { value: true });
383
385
  exports["default"] = void 0;
384
386
  var _postcssValueParser = _interopRequireDefault(
385
387
  __nccwpck_require__(5245),
386
388
  );
387
- var _utils = __nccwpck_require__(5466);
389
+ var _utils = __nccwpck_require__(537);
388
390
  function _interopRequireDefault(obj) {
389
391
  return obj && obj.__esModule ? obj : { default: obj };
390
392
  }
@@ -689,14 +691,14 @@
689
691
  plugin.postcss = true;
690
692
  var _default = (exports["default"] = plugin);
691
693
  },
692
- 1381: (__unused_webpack_module, exports, __nccwpck_require__) => {
694
+ 6528: (__unused_webpack_module, exports, __nccwpck_require__) => {
693
695
  "use strict";
694
696
  Object.defineProperty(exports, "__esModule", { value: true });
695
697
  exports["default"] = void 0;
696
698
  var _postcssValueParser = _interopRequireDefault(
697
699
  __nccwpck_require__(5245),
698
700
  );
699
- var _utils = __nccwpck_require__(5466);
701
+ var _utils = __nccwpck_require__(537);
700
702
  function _interopRequireDefault(obj) {
701
703
  return obj && obj.__esModule ? obj : { default: obj };
702
704
  }
@@ -1039,7 +1041,7 @@
1039
1041
  plugin.postcss = true;
1040
1042
  var _default = (exports["default"] = plugin);
1041
1043
  },
1042
- 5466: (__unused_webpack_module, exports, __nccwpck_require__) => {
1044
+ 537: (__unused_webpack_module, exports, __nccwpck_require__) => {
1043
1045
  "use strict";
1044
1046
  Object.defineProperty(exports, "__esModule", { value: true });
1045
1047
  exports.WEBPACK_IGNORE_COMMENT_REGEXP = void 0;
@@ -8084,7 +8086,7 @@
8084
8086
  "use strict";
8085
8087
  module.exports = require("util");
8086
8088
  },
8087
- 8531: (module) => {
8089
+ 1952: (module) => {
8088
8090
  "use strict";
8089
8091
  module.exports = JSON.parse(
8090
8092
  '{"title":"CSS Loader options","additionalProperties":false,"properties":{"url":{"description":"Allows to enables/disables `url()`/`image-set()` functions handling.","link":"https://github.com/webpack-contrib/css-loader#url","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"import":{"description":"Allows to enables/disables `@import` at-rules handling.","link":"https://github.com/webpack-contrib/css-loader#import","anyOf":[{"type":"boolean"},{"type":"object","properties":{"filter":{"instanceof":"Function"}},"additionalProperties":false}]},"modules":{"description":"Allows to enable/disable CSS Modules or ICSS and setup configuration.","link":"https://github.com/webpack-contrib/css-loader#modules","anyOf":[{"type":"boolean"},{"enum":["local","global","pure","icss"]},{"type":"object","additionalProperties":false,"properties":{"auto":{"description":"Allows auto enable CSS modules based on filename.","link":"https://github.com/webpack-contrib/css-loader#auto","anyOf":[{"instanceof":"RegExp"},{"instanceof":"Function"},{"type":"boolean"}]},"mode":{"description":"Setup `mode` option.","link":"https://github.com/webpack-contrib/css-loader#mode","anyOf":[{"enum":["local","global","pure","icss"]},{"instanceof":"Function"}]},"localIdentName":{"description":"Allows to configure the generated local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentname","type":"string","minLength":1},"localIdentContext":{"description":"Allows to redefine basic loader context for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentcontext","type":"string","minLength":1},"localIdentHashSalt":{"description":"Allows to add custom hash to generate more unique classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashsalt","type":"string","minLength":1},"localIdentHashFunction":{"description":"Allows to specify hash function to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashfunction","type":"string","minLength":1},"localIdentHashDigest":{"description":"Allows to specify hash digest to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigest","type":"string","minLength":1},"localIdentHashDigestLength":{"description":"Allows to specify hash digest length to generate classes.","link":"https://github.com/webpack-contrib/css-loader#localidenthashdigestlength","type":"number"},"hashStrategy":{"description":"Allows to specify should localName be used when computing the hash.","link":"https://github.com/webpack-contrib/css-loader#hashstrategy","enum":["resource-path-and-local-name","minimal-subset"]},"localIdentRegExp":{"description":"Allows to specify custom RegExp for local ident name.","link":"https://github.com/webpack-contrib/css-loader#localidentregexp","anyOf":[{"type":"string","minLength":1},{"instanceof":"RegExp"}]},"getLocalIdent":{"description":"Allows to specify a function to generate the classname.","link":"https://github.com/webpack-contrib/css-loader#getlocalident","instanceof":"Function"},"namedExport":{"description":"Enables/disables ES modules named export for locals.","link":"https://github.com/webpack-contrib/css-loader#namedexport","type":"boolean"},"exportGlobals":{"description":"Allows to export names from global class or id, so you can use that as local name.","link":"https://github.com/webpack-contrib/css-loader#exportglobals","type":"boolean"},"exportLocalsConvention":{"description":"Style of exported classnames.","link":"https://github.com/webpack-contrib/css-loader#localsconvention","anyOf":[{"enum":["asIs","as-is","camelCase","camel-case","camelCaseOnly","camel-case-only","dashes","dashesOnly","dashes-only"]},{"instanceof":"Function"}]},"exportOnlyLocals":{"description":"Export only locals.","link":"https://github.com/webpack-contrib/css-loader#exportonlylocals","type":"boolean"},"getJSON":{"description":"Allows outputting of CSS modules mapping through a callback.","link":"https://github.com/webpack-contrib/css-loader#getJSON","instanceof":"Function"}}}]},"sourceMap":{"description":"Allows to enable/disable source maps.","link":"https://github.com/webpack-contrib/css-loader#sourcemap","type":"boolean"},"importLoaders":{"description":"Allows enables/disables or setups number of loaders applied before CSS loader for `@import`/CSS Modules and ICSS imports.","link":"https://github.com/webpack-contrib/css-loader#importloaders","anyOf":[{"type":"boolean"},{"type":"string"},{"type":"integer"}]},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"exportType":{"description":"Allows exporting styles as array with modules, string or constructable stylesheet (i.e. `CSSStyleSheet`).","link":"https://github.com/webpack-contrib/css-loader#exporttype","enum":["array","string","css-style-sheet"]}},"type":"object"}',
@@ -8119,6 +8121,6 @@
8119
8121
  }
8120
8122
  if (typeof __nccwpck_require__ !== "undefined")
8121
8123
  __nccwpck_require__.ab = __dirname + "/";
8122
- var __webpack_exports__ = __nccwpck_require__(3093);
8124
+ var __webpack_exports__ = __nccwpck_require__(818);
8123
8125
  module.exports = __webpack_exports__;
8124
8126
  })();
@@ -1,16 +1,16 @@
1
1
  (() => {
2
2
  "use strict";
3
3
  var __webpack_modules__ = {
4
- 345: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
- module.exports = __nccwpck_require__(83)["default"];
4
+ 198: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ module.exports = __nccwpck_require__(588)["default"];
6
6
  },
7
- 83: (__unused_webpack_module, exports, __nccwpck_require__) => {
7
+ 588: (__unused_webpack_module, exports, __nccwpck_require__) => {
8
8
  var __webpack_unused_export__;
9
9
  __webpack_unused_export__ = { value: true };
10
10
  exports["default"] = void 0;
11
11
  var _path = _interopRequireDefault(__nccwpck_require__(928));
12
- var _options = _interopRequireDefault(__nccwpck_require__(915));
13
- var _utils = __nccwpck_require__(406);
12
+ var _options = _interopRequireDefault(__nccwpck_require__(680));
13
+ var _utils = __nccwpck_require__(333);
14
14
  function _interopRequireDefault(e) {
15
15
  return e && e.__esModule ? e : { default: e };
16
16
  }
@@ -112,7 +112,7 @@
112
112
  }
113
113
  var _default = (exports["default"] = lessLoader);
114
114
  },
115
- 406: (__unused_webpack_module, exports, __nccwpck_require__) => {
115
+ 333: (__unused_webpack_module, exports, __nccwpck_require__) => {
116
116
  Object.defineProperty(exports, "__esModule", { value: true });
117
117
  exports.errorFactory = errorFactory;
118
118
  exports.getLessImplementation = getLessImplementation;
@@ -312,7 +312,7 @@
312
312
  928: (module) => {
313
313
  module.exports = require("path");
314
314
  },
315
- 915: (module) => {
315
+ 680: (module) => {
316
316
  module.exports = JSON.parse(
317
317
  '{"title":"Less Loader options","type":"object","properties":{"lessOptions":{"description":"Options to pass through to `Less`.","link":"https://github.com/webpack-contrib/less-loader#lessoptions","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Less` code to the actual entry file.","link":"https://github.com/webpack-contrib/less-loader#additionalData","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/less-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack-contrib/less-loader#webpackimporter","anyOf":[{"type":"boolean"},{"type":"string","enum":["only"]}]},"implementation":{"description":"The implementation of the `Less` to be used.","link":"https://github.com/webpack-contrib/less-loader#implementation","anyOf":[{"type":"string"},{"type":"object"}]},"lessLogAsWarnOrErr":{"description":"Less warnings and errors will be webpack warnings or errors.","link":"https://github.com/webpack-contrib/less-loader#lesslogaswarnorerr","type":"boolean"}},"additionalProperties":false}',
318
318
  );
@@ -340,6 +340,6 @@
340
340
  }
341
341
  if (typeof __nccwpck_require__ !== "undefined")
342
342
  __nccwpck_require__.ab = __dirname + "/";
343
- var __webpack_exports__ = __nccwpck_require__(345);
343
+ var __webpack_exports__ = __nccwpck_require__(198);
344
344
  module.exports = __webpack_exports__;
345
345
  })();
@@ -5319,19 +5319,19 @@
5319
5319
  module.exports = createColors();
5320
5320
  module.exports.createColors = createColors;
5321
5321
  },
5322
- 1429: (module, __unused_webpack_exports, __nccwpck_require__) => {
5322
+ 2296: (module, __unused_webpack_exports, __nccwpck_require__) => {
5323
5323
  "use strict";
5324
- module.exports = __nccwpck_require__(4079)["default"];
5324
+ module.exports = __nccwpck_require__(5062)["default"];
5325
5325
  },
5326
- 4079: (__unused_webpack_module, exports, __nccwpck_require__) => {
5326
+ 5062: (__unused_webpack_module, exports, __nccwpck_require__) => {
5327
5327
  "use strict";
5328
5328
  var __webpack_unused_export__;
5329
5329
  __webpack_unused_export__ = { value: true };
5330
5330
  exports["default"] = loader;
5331
5331
  var _nodePath = _interopRequireDefault(__nccwpck_require__(6760));
5332
5332
  var _package = _interopRequireDefault(__nccwpck_require__(444));
5333
- var _options = _interopRequireDefault(__nccwpck_require__(2565));
5334
- var _utils = __nccwpck_require__(3498);
5333
+ var _options = _interopRequireDefault(__nccwpck_require__(6512));
5334
+ var _utils = __nccwpck_require__(5047);
5335
5335
  function _interopRequireDefault(e) {
5336
5336
  return e && e.__esModule ? e : { default: e };
5337
5337
  }
@@ -5509,7 +5509,7 @@
5509
5509
  callback(null, result.css, map, { ast });
5510
5510
  }
5511
5511
  },
5512
- 3498: (module, exports, __nccwpck_require__) => {
5512
+ 5047: (module, exports, __nccwpck_require__) => {
5513
5513
  "use strict";
5514
5514
  module = __nccwpck_require__.nmd(module);
5515
5515
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -6620,7 +6620,7 @@
6620
6620
  return keywords.has(word);
6621
6621
  }
6622
6622
  },
6623
- 2565: (module) => {
6623
+ 6512: (module) => {
6624
6624
  "use strict";
6625
6625
  module.exports = JSON.parse(
6626
6626
  '{"title":"PostCSS Loader options","type":"object","properties":{"postcssOptions":{"description":"Options to pass through to `Postcss`.","link":"https://github.com/webpack-contrib/postcss-loader#postcssOptions","anyOf":[{"type":"object","additionalProperties":true,"properties":{"config":{"description":"Allows to specify PostCSS config path.","link":"https://github.com/webpack-contrib/postcss-loader#config","anyOf":[{"description":"Allows to specify the path to the configuration file","type":"string"},{"description":"Enables/Disables autoloading config","type":"boolean"}]}}},{"instanceof":"Function"}]},"execute":{"description":"Enables/Disables PostCSS parser support in \'CSS-in-JS\'.","link":"https://github.com/webpack-contrib/postcss-loader#execute","type":"boolean"},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack-contrib/postcss-loader#sourcemap","type":"boolean"},"implementation":{"description":"The implementation of postcss to use, instead of the locally installed version","link":"https://github.com/webpack-contrib/postcss-loader#implementation","anyOf":[{"type":"string"},{"instanceof":"Function"}]}},"additionalProperties":false}',
@@ -6730,6 +6730,6 @@
6730
6730
  })();
6731
6731
  if (typeof __nccwpck_require__ !== "undefined")
6732
6732
  __nccwpck_require__.ab = __dirname + "/";
6733
- var __webpack_exports__ = __nccwpck_require__(1429);
6733
+ var __webpack_exports__ = __nccwpck_require__(2296);
6734
6734
  module.exports = __webpack_exports__;
6735
6735
  })();
@@ -4795,19 +4795,19 @@
4795
4795
  }
4796
4796
  });
4797
4797
  },
4798
- 717: (module, __unused_webpack_exports, __nccwpck_require__) => {
4798
+ 498: (module, __unused_webpack_exports, __nccwpck_require__) => {
4799
4799
  "use strict";
4800
- const loader = __nccwpck_require__(127);
4800
+ const loader = __nccwpck_require__(472);
4801
4801
  module.exports = loader.default;
4802
4802
  },
4803
- 127: (__unused_webpack_module, exports, __nccwpck_require__) => {
4803
+ 472: (__unused_webpack_module, exports, __nccwpck_require__) => {
4804
4804
  "use strict";
4805
4805
  Object.defineProperty(exports, "__esModule", { value: true });
4806
4806
  exports["default"] = void 0;
4807
4807
  var _nodePath = _interopRequireDefault(__nccwpck_require__(760));
4808
4808
  var _nodeUrl = _interopRequireDefault(__nccwpck_require__(136));
4809
- var _options = _interopRequireDefault(__nccwpck_require__(979));
4810
- var _utils = __nccwpck_require__(450);
4809
+ var _options = _interopRequireDefault(__nccwpck_require__(32));
4810
+ var _utils = __nccwpck_require__(105);
4811
4811
  function _interopRequireDefault(e) {
4812
4812
  return e && e.__esModule ? e : { default: e };
4813
4813
  }
@@ -4914,7 +4914,7 @@
4914
4914
  }
4915
4915
  var _default = (exports["default"] = loader);
4916
4916
  },
4917
- 450: (__unused_webpack_module, exports, __nccwpck_require__) => {
4917
+ 105: (__unused_webpack_module, exports, __nccwpck_require__) => {
4918
4918
  "use strict";
4919
4919
  Object.defineProperty(exports, "__esModule", { value: true });
4920
4920
  exports.errorFactory = errorFactory;
@@ -5568,7 +5568,7 @@
5568
5568
  "use strict";
5569
5569
  module.exports = require("sass");
5570
5570
  },
5571
- 979: (module) => {
5571
+ 32: (module) => {
5572
5572
  "use strict";
5573
5573
  module.exports = JSON.parse(
5574
5574
  '{"title":"Sass Loader options","type":"object","properties":{"implementation":{"description":"The implementation of the sass to be used.","link":"https://github.com/webpack/sass-loader#implementation","anyOf":[{"type":"string"},{"type":"object"}]},"api":{"description":"Switch between old and modern API for `sass` (`Dart Sass`) and `Sass Embedded` implementations.","link":"https://github.com/webpack/sass-loader#sassoptions","enum":["legacy","modern","modern-compiler"]},"sassOptions":{"description":"Options for `node-sass` or `sass` (`Dart Sass`) implementation.","link":"https://github.com/webpack/sass-loader#sassoptions","anyOf":[{"type":"object","additionalProperties":true},{"instanceof":"Function"}]},"additionalData":{"description":"Prepends/Appends `Sass`/`SCSS` code before the actual entry file.","link":"https://github.com/webpack/sass-loader#additionaldata","anyOf":[{"type":"string"},{"instanceof":"Function"}]},"sourceMap":{"description":"Enables/Disables generation of source maps.","link":"https://github.com/webpack/sass-loader#sourcemap","type":"boolean"},"webpackImporter":{"description":"Enables/Disables default `webpack` importer.","link":"https://github.com/webpack/sass-loader#webpackimporter","type":"boolean"},"warnRuleAsWarning":{"description":"Treats the \'@warn\' rule as a webpack warning.","link":"https://github.com/webpack/sass-loader#warnruleaswarning","type":"boolean"}},"additionalProperties":false}',
@@ -5598,6 +5598,6 @@
5598
5598
  }
5599
5599
  if (typeof __nccwpck_require__ !== "undefined")
5600
5600
  __nccwpck_require__.ab = __dirname + "/";
5601
- var __webpack_exports__ = __nccwpck_require__(717);
5601
+ var __webpack_exports__ = __nccwpck_require__(498);
5602
5602
  module.exports = __webpack_exports__;
5603
5603
  })();
package/dist/index.js CHANGED
@@ -518,18 +518,18 @@ async function applyBuildAnalyzeConfig({ config }) {
518
518
  let { RsdoctorRspackPlugin } = await import("@rsdoctor/rspack-plugin");
519
519
  return config.plugins?.push(new RsdoctorRspackPlugin()), config;
520
520
  }
521
- async function getBuildDependencies(root, userBuildDependencies, envFilePaths) {
521
+ async function getBuildDependencies(root) {
522
522
  let rootPackageJson = node_path.join(root, 'package.json'), browserslistConfig = node_path.join(root, '.browserslistrc'), tsconfigPath = node_path.join(root, 'tsconfig.json'), buildDependencies = {};
523
523
  await isFileExists(rootPackageJson) && (buildDependencies.packageJson = [
524
524
  rootPackageJson
525
+ ]), await isFileExists(browserslistConfig) && (buildDependencies.browserslistrc = [
526
+ browserslistConfig
525
527
  ]), await isFileExists(tsconfigPath) && (buildDependencies.tsconfig = [
526
528
  tsconfigPath
527
529
  ]);
528
530
  let unpackConfigPath = resolveConfigPath(root);
529
531
  unpackConfigPath && (buildDependencies.unpackConfig = [
530
532
  unpackConfigPath
531
- ]), await isFileExists(browserslistConfig) && (buildDependencies.browserslistrc = [
532
- browserslistConfig
533
533
  ]);
534
534
  let tailwindConfig = findExists([
535
535
  'ts',
@@ -539,14 +539,13 @@ async function getBuildDependencies(root, userBuildDependencies, envFilePaths) {
539
539
  ].map((ext)=>node_path.join(root, `tailwind.config.${ext}`)));
540
540
  return tailwindConfig && (buildDependencies.tailwindcss = [
541
541
  tailwindConfig
542
- ]), envFilePaths && envFilePaths.length > 0 && (buildDependencies.envFiles = envFilePaths), {
543
- ...buildDependencies,
544
- userBuildDependencies
545
- };
542
+ ]), buildDependencies;
546
543
  }
547
544
  async function applyCacheConfig({ config, unpackConfig, envFilePaths }) {
548
- let cacheConfig = isPlainObject(unpackConfig.build.cache) ? unpackConfig.build.cache : {}, buildDependencies = await getBuildDependencies(unpackConfig.root, cacheConfig.buildDependencies || [], envFilePaths), cacheDirectory = node_path.resolve(unpackConfig.root, cacheConfig.cacheDirectory || `${unpackConfig._context.cachePath}/cache`, utils_isDevServer() ? 'dev' : 'build');
549
- return logger_logger.info('persistent cache enabled'), config = mergeConfig(config, {
545
+ let cacheConfig = isPlainObject(unpackConfig.build.cache) ? unpackConfig.build.cache : {}, buildDependencies = await getBuildDependencies(unpackConfig.root);
546
+ buildDependencies.userBuildDependencies = cacheConfig.buildDependencies || [], buildDependencies.envFilePaths = envFilePaths;
547
+ let cacheDirectory = node_path.resolve(unpackConfig.root, cacheConfig.cacheDirectory || `${unpackConfig._context.cachePath}/cache`, utils_isDevServer() ? 'dev' : 'build');
548
+ return mergeConfig(config, {
550
549
  cache: !0,
551
550
  experiments: {
552
551
  cache: {
@@ -670,7 +669,7 @@ class JsMinifyPlugin {
670
669
  apply(compiler) {
671
670
  let meta = JSON.stringify({
672
671
  name: jsMinify_PLUGIN_NAME,
673
- version: "3.7.7",
672
+ version: "3.7.8",
674
673
  options: this.minifyOptions
675
674
  });
676
675
  compiler.hooks.compilation.tap(jsMinify_PLUGIN_NAME, (compilation)=>{
@@ -790,10 +789,8 @@ async function printFileSize({ root, stats }) {
790
789
  color: 'cyan',
791
790
  chunks: []
792
791
  }
793
- ], chunkGroupMap = chunkGroups.reduce((acc, cur)=>(acc[cur.type] = cur, acc), {}), compressedCount = 0, loadingAnimation = new LoadingAnimation();
794
- logUpdate(`${loadingAnimation.getCurrentChar()} computing gzip size (0)...`);
795
- let distPath = stats.compilation.outputOptions.path, distFolder = node_path.relative(root, distPath), assets = Object.entries(stats.compilation.assets), longest = 0, totalSize = 0, totalCompressedSize = 0;
796
- await Promise.all(assets.map(async ([assetName, value])=>{
792
+ ], chunkGroupMap = chunkGroups.reduce((acc, cur)=>(acc[cur.type] = cur, acc), {}), distPath = stats.compilation.outputOptions.path, distFolder = node_path.relative(root, distPath), assets = Object.entries(stats.compilation.assets), longest = 0, totalSize = 0, totalCompressedSize = 0;
793
+ logUpdate('computing gzip size...'), await Promise.all(assets.map(async ([assetName, value])=>{
797
794
  let content, compressedSize, filePath = assetName.split('?')[0];
798
795
  try {
799
796
  content = value.source();
@@ -801,7 +798,7 @@ async function printFileSize({ root, stats }) {
801
798
  content = node_fs.readFileSync(node_path.join(distPath, filePath));
802
799
  }
803
800
  let size = Buffer.byteLength(content);
804
- compressedSize = COMPRESSIBLE_REGEX.test(filePath) ? await getCompressedSize(content) : size, totalSize += size, totalCompressedSize += compressedSize, compressedCount++, logUpdate(`${loadingAnimation.getCurrentChar()} computing gzip size (${compressedCount})...`), compressedCount === assets.length && (logUpdate(`✓ computed gzip size (${compressedCount})`), console.log());
801
+ compressedSize = COMPRESSIBLE_REGEX.test(filePath) ? await getCompressedSize(content) : size, totalSize += size, totalCompressedSize += compressedSize;
805
802
  let chunk = {
806
803
  name: node_path.basename(filePath),
807
804
  path: `${distFolder}/${filePath}`,
@@ -822,7 +819,7 @@ async function printFileSize({ root, stats }) {
822
819
  default:
823
820
  chunkGroupMap.Assets.chunks.push(chunk);
824
821
  }
825
- }));
822
+ })), logUpdate(`✓ computed gzip size (${assets.length})`), console.log();
826
823
  let sizePad = displaySize(totalSize).length, compressPad = displaySize(totalCompressedSize).length;
827
824
  chunkGroups.forEach((group)=>{
828
825
  group.chunks.sort((a, b)=>a.size - b.size).forEach((chunk)=>{
@@ -886,9 +883,7 @@ async function compileDone(compiler, stats) {
886
883
  let progress_PLUGIN_NAME = 'ProgressPlugin';
887
884
  class ProgressLiteRspackPlugin {
888
885
  apply(compiler) {
889
- compiler.hooks.run.tap(progress_PLUGIN_NAME, ()=>{
890
- logger_logger.info('build started...');
891
- }), compiler.hooks.afterDone.tap(progress_PLUGIN_NAME, async (stats)=>{
886
+ compiler.hooks.afterDone.tap(progress_PLUGIN_NAME, async (stats)=>{
892
887
  await compileDone(compiler, stats);
893
888
  });
894
889
  }
@@ -1870,7 +1865,7 @@ async function unpackDev(originalUnpackConfig) {
1870
1865
  req.headers.accept?.includes('html') && (req.url = '/index.html'), next();
1871
1866
  }), middlewares.unshift(rspack.lazyCompilationMiddleware(compiler)), middlewares);
1872
1867
  let server = new RspackDevServer(devServerOptions, compiler);
1873
- await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.7.7`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - global.__unpack_start_time))} ${colors.dim('ms')}\n`), printAddressUrls(port, unpackConfig.server?.host), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
1868
+ await server.start(), logger_logger.greet(` ${colors.brand(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v3.7.8${unpackConfig.build?.cache ? ' ϟ' : ''}`)} ${colors.dim('ready in')} ${colors.bold(Math.ceil(performance.now() - global.__unpack_start_time))} ${colors.dim('ms')}\n`), printAddressUrls(port, unpackConfig.server?.host), addRestartCleaner(()=>server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())));
1874
1869
  let open = unpackConfig.server?.open, url = isString(open) ? open : `http://localhost:${port}`;
1875
1870
  open && openBrowser(url), setupCliShortcuts({
1876
1871
  openPage: async ()=>{
@@ -1906,7 +1901,7 @@ function printAddressUrls(port, host) {
1906
1901
  function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'unpack' }) {
1907
1902
  let _context = {
1908
1903
  callerName,
1909
- version: "3.7.7",
1904
+ version: "3.7.8",
1910
1905
  cachePath: 'node_modules/.unpack'
1911
1906
  };
1912
1907
  global.__unpack_caller_name = callerName;
@@ -1952,7 +1947,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
1952
1947
  let mode = watch ? 'development' : 'production';
1953
1948
  setNodeEnv(mode);
1954
1949
  let config = resolveConfig(mode);
1955
- console.log(colors.brand(`${callerName} v3.7.7`), colors.cyan(`building for ${mode}...`)), await unpackBuild(config);
1950
+ console.log(colors.brand(`${callerName} v3.7.8${config.build?.cache ? ' ϟ' : ''}`), colors.cyan(`building for ${mode}...`)), await unpackBuild(config);
1956
1951
  },
1957
1952
  dev: async ()=>{
1958
1953
  global.__unpack_start_time = performance.now();
@@ -1963,7 +1958,7 @@ function createUnpack({ cwd = process.cwd(), config: userConfig, callerName = 'u
1963
1958
  },
1964
1959
  clean: ()=>{
1965
1960
  let root = userConfig.root || cwd, relativeDir = _context.cachePath, absDir = node_path.resolve(root, relativeDir);
1966
- node_fs.existsSync(absDir) ? (removeDir(absDir), logger_logger.ready(`cache cleaned: ${colors.dim(relativeDir)}`)) : logger_logger.info(`cache not found, skipping clean: ${colors.dim(relativeDir)}`);
1961
+ node_fs.existsSync(absDir) ? (removeDir(absDir), logger_logger.ready(`cache cleaned: ${colors.dim(relativeDir)}`)) : logger_logger.info(`no cache found, skipping clean: ${colors.dim(relativeDir)}`);
1967
1962
  }
1968
1963
  };
1969
1964
  }
@@ -2,6 +2,6 @@ import type { BundlerConfiguration, UnpackConfig } from '../types';
2
2
  export declare function applyCacheConfig({ config, unpackConfig, envFilePaths, }: {
3
3
  config: BundlerConfiguration;
4
4
  unpackConfig: UnpackConfig;
5
- envFilePaths?: string[];
5
+ envFilePaths: string[];
6
6
  }): Promise<BundlerConfiguration>;
7
7
  //# sourceMappingURL=cache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/bundler-config/cache.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAgDnE,wBAAsB,gBAAgB,CAAC,EACrC,MAAM,EACN,YAAY,EACZ,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA2BhC"}
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../src/bundler-config/cache.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAoCnE,wBAAsB,gBAAgB,CAAC,EACrC,MAAM,EACN,YAAY,EACZ,YAAY,GACb,EAAE;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,YAAY,EAAE,MAAM,EAAE,CAAA;CACvB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAwBhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundler-config/plugins/progress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAKvC,qBAAa,wBAAwB;IACnC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CAQvC;AAED,qBAAa,oBAAqB,SAAQ,MAAM,CAAC,cAAc;IAC7D,WAAW,cAAoB;;IAO/B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CAMvC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundler-config/plugins/progress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAKvC,qBAAa,wBAAwB;IACnC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CAKvC;AAED,qBAAa,oBAAqB,SAAQ,MAAM,CAAC,cAAc;IAC7D,WAAW,cAAoB;;IAO/B,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,GAAG,IAAI;CAMvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGrC,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAC,KAAK,CAAA;CACpB,CAAA;AA6BD,wBAAsB,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,iBAkG3D"}
1
+ {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAGrC,KAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAC,KAAK,CAAA;CACpB,CAAA;AA6BD,wBAAsB,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,iBA4F3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unpackjs/core",
3
- "version": "3.7.7",
3
+ "version": "3.7.8",
4
4
  "description": "An Rspack-based build tool",
5
5
  "type": "module",
6
6
  "exports": {
@@ -35,12 +35,12 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@rsdoctor/rspack-plugin": "1.3.16",
38
- "@rspack/core": "1.7.0-beta.0",
38
+ "@rspack/core": "1.7.0-beta.1",
39
39
  "@rspack/dev-server": "1.1.4",
40
40
  "chokidar": "5.0.0",
41
41
  "dotenv-expand": "12.0.3",
42
42
  "jiti": "2.6.1",
43
- "oxc-minify": "0.103.0",
43
+ "oxc-minify": "0.105.0",
44
44
  "portfinder": "1.0.38",
45
45
  "postcss": "8.5.6",
46
46
  "tinyglobby": "0.2.15",