@storm-software/unbuild 0.41.21 → 0.41.22

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.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/bin/unbuild.cjs +798 -412
  3. package/bin/unbuild.js +826 -420
  4. package/dist/build.cjs +8 -8
  5. package/dist/build.js +7 -7
  6. package/dist/{chunk-3GQAWCBQ.js → chunk-3RG5ZIWI.js} +0 -3
  7. package/dist/{chunk-HZNOKNKE.js → chunk-4KHUAP4R.js} +13 -10
  8. package/dist/{chunk-BFBEOACU.cjs → chunk-ALGMIE4E.cjs} +471 -257
  9. package/dist/{chunk-5FQ2QYFQ.js → chunk-ATN45QRM.js} +418 -204
  10. package/dist/{chunk-F4MPFQDI.cjs → chunk-FAW45G3E.cjs} +13 -10
  11. package/dist/{chunk-3BXXHK3F.cjs → chunk-MO3MUSJO.cjs} +7 -15
  12. package/dist/chunk-OBGZSXTJ.cjs +10 -0
  13. package/dist/{chunk-DUDE4LYM.js → chunk-PCGRQKDH.js} +2 -10
  14. package/dist/{chunk-PWE7CANF.cjs → chunk-Q2G4VMOW.cjs} +198 -130
  15. package/dist/{chunk-ITHOVA3D.cjs → chunk-Q3NBYYR4.cjs} +4 -12
  16. package/dist/{chunk-ZB2JWLJS.cjs → chunk-Q4VUCJPK.cjs} +51 -16
  17. package/dist/chunk-WQLDD6CA.js +106 -0
  18. package/dist/{chunk-3BDIPKMO.js → chunk-XQLLOGJZ.js} +197 -129
  19. package/dist/{chunk-SMAV5VSP.js → chunk-XWLZOFQ4.js} +6 -14
  20. package/dist/clean.cjs +4 -4
  21. package/dist/clean.js +3 -3
  22. package/dist/index.cjs +9 -9
  23. package/dist/index.js +8 -8
  24. package/dist/plugins/analyze.cjs +4 -4
  25. package/dist/plugins/analyze.js +3 -3
  26. package/dist/plugins/on-error.cjs +4 -4
  27. package/dist/plugins/on-error.js +3 -3
  28. package/dist/plugins/swc.cjs +5 -8
  29. package/dist/plugins/swc.js +4 -7
  30. package/dist/plugins/tsc.cjs +4 -4
  31. package/dist/plugins/tsc.js +3 -3
  32. package/dist/plugins/type-definitions.cjs +9 -6
  33. package/dist/plugins/type-definitions.js +9 -6
  34. package/dist/types.cjs +1 -1
  35. package/dist/types.js +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-BGYQAVKQ.cjs +0 -13
  38. package/dist/chunk-XXRSY6EE.js +0 -71
  39. /package/dist/{chunk-OULCUN6I.js → chunk-GGNOJ77I.js} +0 -0
  40. /package/dist/{chunk-ORA4UQMU.cjs → chunk-SFZRYJZ2.cjs} +0 -0
package/dist/index.cjs CHANGED
@@ -5,20 +5,20 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkBFBEOACUcjs = require('./chunk-BFBEOACU.cjs');
8
+ var _chunkALGMIE4Ecjs = require('./chunk-ALGMIE4E.cjs');
9
9
 
10
10
 
11
11
 
12
- var _chunkITHOVA3Dcjs = require('./chunk-ITHOVA3D.cjs');
13
- require('./chunk-ORA4UQMU.cjs');
14
- require('./chunk-3BXXHK3F.cjs');
15
- require('./chunk-F4MPFQDI.cjs');
12
+ var _chunkQ3NBYYR4cjs = require('./chunk-Q3NBYYR4.cjs');
13
+ require('./chunk-SFZRYJZ2.cjs');
14
+ require('./chunk-MO3MUSJO.cjs');
15
+ require('./chunk-FAW45G3E.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunkZB2JWLJScjs = require('./chunk-ZB2JWLJS.cjs');
20
- require('./chunk-PWE7CANF.cjs');
21
- require('./chunk-BGYQAVKQ.cjs');
19
+ var _chunkQ4VUCJPKcjs = require('./chunk-Q4VUCJPK.cjs');
20
+ require('./chunk-Q2G4VMOW.cjs');
21
+ require('./chunk-OBGZSXTJ.cjs');
22
22
 
23
23
 
24
24
 
@@ -30,4 +30,4 @@ require('./chunk-BGYQAVKQ.cjs');
30
30
 
31
31
 
32
32
 
33
- exports.build = _chunkBFBEOACUcjs.build; exports.clean = _chunkITHOVA3Dcjs.clean; exports.cleanDirectories = _chunkITHOVA3Dcjs.cleanDirectories; exports.cleanOutputPath = _chunkBFBEOACUcjs.cleanOutputPath; exports.copyBuildAssets = _chunkBFBEOACUcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkZB2JWLJScjs.createTsCompilerOptions; exports.executeUnbuild = _chunkBFBEOACUcjs.executeUnbuild; exports.generatePackageJson = _chunkBFBEOACUcjs.generatePackageJson; exports.loadConfig = _chunkZB2JWLJScjs.loadConfig; exports.resolveOptions = _chunkBFBEOACUcjs.resolveOptions;
33
+ exports.build = _chunkALGMIE4Ecjs.build; exports.clean = _chunkQ3NBYYR4cjs.clean; exports.cleanDirectories = _chunkQ3NBYYR4cjs.cleanDirectories; exports.cleanOutputPath = _chunkALGMIE4Ecjs.cleanOutputPath; exports.copyBuildAssets = _chunkALGMIE4Ecjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkQ4VUCJPKcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkALGMIE4Ecjs.executeUnbuild; exports.generatePackageJson = _chunkALGMIE4Ecjs.generatePackageJson; exports.loadConfig = _chunkQ4VUCJPKcjs.loadConfig; exports.resolveOptions = _chunkALGMIE4Ecjs.resolveOptions;
package/dist/index.js CHANGED
@@ -5,20 +5,20 @@ import {
5
5
  executeUnbuild,
6
6
  generatePackageJson,
7
7
  resolveOptions
8
- } from "./chunk-5FQ2QYFQ.js";
8
+ } from "./chunk-ATN45QRM.js";
9
9
  import {
10
10
  clean,
11
11
  cleanDirectories
12
- } from "./chunk-DUDE4LYM.js";
13
- import "./chunk-OULCUN6I.js";
14
- import "./chunk-SMAV5VSP.js";
15
- import "./chunk-HZNOKNKE.js";
12
+ } from "./chunk-PCGRQKDH.js";
13
+ import "./chunk-GGNOJ77I.js";
14
+ import "./chunk-XWLZOFQ4.js";
15
+ import "./chunk-4KHUAP4R.js";
16
16
  import {
17
17
  createTsCompilerOptions,
18
18
  loadConfig
19
- } from "./chunk-XXRSY6EE.js";
20
- import "./chunk-3BDIPKMO.js";
21
- import "./chunk-3GQAWCBQ.js";
19
+ } from "./chunk-WQLDD6CA.js";
20
+ import "./chunk-XQLLOGJZ.js";
21
+ import "./chunk-3RG5ZIWI.js";
22
22
  export {
23
23
  build,
24
24
  clean,
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk3BXXHK3Fcjs = require('../chunk-3BXXHK3F.cjs');
4
- require('../chunk-PWE7CANF.cjs');
5
- require('../chunk-BGYQAVKQ.cjs');
3
+ var _chunkMO3MUSJOcjs = require('../chunk-MO3MUSJO.cjs');
4
+ require('../chunk-Q2G4VMOW.cjs');
5
+ require('../chunk-OBGZSXTJ.cjs');
6
6
 
7
7
 
8
- exports.analyzePlugin = _chunk3BXXHK3Fcjs.analyzePlugin;
8
+ exports.analyzePlugin = _chunkMO3MUSJOcjs.analyzePlugin;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  analyzePlugin
3
- } from "../chunk-SMAV5VSP.js";
4
- import "../chunk-3BDIPKMO.js";
5
- import "../chunk-3GQAWCBQ.js";
3
+ } from "../chunk-XWLZOFQ4.js";
4
+ import "../chunk-XQLLOGJZ.js";
5
+ import "../chunk-3RG5ZIWI.js";
6
6
  export {
7
7
  analyzePlugin
8
8
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkF4MPFQDIcjs = require('../chunk-F4MPFQDI.cjs');
4
- require('../chunk-PWE7CANF.cjs');
5
- require('../chunk-BGYQAVKQ.cjs');
3
+ var _chunkFAW45G3Ecjs = require('../chunk-FAW45G3E.cjs');
4
+ require('../chunk-Q2G4VMOW.cjs');
5
+ require('../chunk-OBGZSXTJ.cjs');
6
6
 
7
7
 
8
- exports.onErrorPlugin = _chunkF4MPFQDIcjs.onErrorPlugin;
8
+ exports.onErrorPlugin = _chunkFAW45G3Ecjs.onErrorPlugin;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  onErrorPlugin
3
- } from "../chunk-HZNOKNKE.js";
4
- import "../chunk-3BDIPKMO.js";
5
- import "../chunk-3GQAWCBQ.js";
3
+ } from "../chunk-4KHUAP4R.js";
4
+ import "../chunk-XQLLOGJZ.js";
5
+ import "../chunk-3RG5ZIWI.js";
6
6
  export {
7
7
  onErrorPlugin
8
8
  };
@@ -1,11 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
-
4
- var _chunkBGYQAVKQcjs = require('../chunk-BGYQAVKQ.cjs');
3
+ var _chunkOBGZSXTJcjs = require('../chunk-OBGZSXTJ.cjs');
5
4
 
6
5
  // src/plugins/swc.ts
7
- var swcPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options) => {
8
- const { transform } = _chunkBGYQAVKQcjs.__require.call(void 0, "@swc/core");
6
+ var swcPlugin = (options) => {
7
+ const { transform } = _chunkOBGZSXTJcjs.__require.call(void 0, "@swc/core");
9
8
  return {
10
9
  name: "storm:swc",
11
10
  transform(code, filename) {
@@ -13,15 +12,13 @@ var swcPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options)
13
12
  filename,
14
13
  jsc: {
15
14
  transform: {
16
- react: {
17
- runtime: "automatic"
18
- }
15
+ react: { runtime: "automatic" }
19
16
  }
20
17
  }
21
18
  });
22
19
  }
23
20
  };
24
- }, "swcPlugin");
21
+ };
25
22
 
26
23
 
27
24
  exports.swcPlugin = swcPlugin;
@@ -1,10 +1,9 @@
1
1
  import {
2
- __name,
3
2
  __require
4
- } from "../chunk-3GQAWCBQ.js";
3
+ } from "../chunk-3RG5ZIWI.js";
5
4
 
6
5
  // src/plugins/swc.ts
7
- var swcPlugin = /* @__PURE__ */ __name((options) => {
6
+ var swcPlugin = (options) => {
8
7
  const { transform } = __require("@swc/core");
9
8
  return {
10
9
  name: "storm:swc",
@@ -13,15 +12,13 @@ var swcPlugin = /* @__PURE__ */ __name((options) => {
13
12
  filename,
14
13
  jsc: {
15
14
  transform: {
16
- react: {
17
- runtime: "automatic"
18
- }
15
+ react: { runtime: "automatic" }
19
16
  }
20
17
  }
21
18
  });
22
19
  }
23
20
  };
24
- }, "swcPlugin");
21
+ };
25
22
  export {
26
23
  swcPlugin
27
24
  };
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZB2JWLJScjs = require('../chunk-ZB2JWLJS.cjs');
4
- require('../chunk-PWE7CANF.cjs');
5
- require('../chunk-BGYQAVKQ.cjs');
3
+ var _chunkQ4VUCJPKcjs = require('../chunk-Q4VUCJPK.cjs');
4
+ require('../chunk-Q2G4VMOW.cjs');
5
+ require('../chunk-OBGZSXTJ.cjs');
6
6
 
7
7
 
8
- exports.tscPlugin = _chunkZB2JWLJScjs.tscPlugin;
8
+ exports.tscPlugin = _chunkQ4VUCJPKcjs.tscPlugin;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  tscPlugin
3
- } from "../chunk-XXRSY6EE.js";
4
- import "../chunk-3BDIPKMO.js";
5
- import "../chunk-3GQAWCBQ.js";
3
+ } from "../chunk-WQLDD6CA.js";
4
+ import "../chunk-XQLLOGJZ.js";
5
+ import "../chunk-3RG5ZIWI.js";
6
6
  export {
7
7
  tscPlugin
8
8
  };
@@ -1,6 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkBGYQAVKQcjs = require('../chunk-BGYQAVKQ.cjs');
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-OBGZSXTJ.cjs');
4
2
 
5
3
  // src/plugins/type-definitions.ts
6
4
  var _path = require('path');
@@ -13,8 +11,14 @@ function typeDefinitionsPlugin(options) {
13
11
  continue;
14
12
  }
15
13
  const hasDefaultExport = file.exports.includes("default");
16
- const entrySourceFileName = _path.relative.call(void 0, options.projectRoot, file.facadeModuleId);
17
- const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
14
+ const entrySourceFileName = _path.relative.call(void 0,
15
+ options.projectRoot,
16
+ file.facadeModuleId
17
+ );
18
+ const entrySourceDtsName = entrySourceFileName.replace(
19
+ /\.[cm]?[jt]sx?$/,
20
+ ""
21
+ );
18
22
  const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
19
23
  const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
20
24
  const dtsFileSource = hasDefaultExport ? `
@@ -31,7 +35,6 @@ export { default } from ${relativeSourceDtsName};
31
35
  }
32
36
  };
33
37
  }
34
- _chunkBGYQAVKQcjs.__name.call(void 0, typeDefinitionsPlugin, "typeDefinitionsPlugin");
35
38
 
36
39
 
37
40
  exports.typeDefinitionsPlugin = typeDefinitionsPlugin;
@@ -1,6 +1,4 @@
1
- import {
2
- __name
3
- } from "../chunk-3GQAWCBQ.js";
1
+ import "../chunk-3RG5ZIWI.js";
4
2
 
5
3
  // src/plugins/type-definitions.ts
6
4
  import { relative } from "node:path";
@@ -13,8 +11,14 @@ function typeDefinitionsPlugin(options) {
13
11
  continue;
14
12
  }
15
13
  const hasDefaultExport = file.exports.includes("default");
16
- const entrySourceFileName = relative(options.projectRoot, file.facadeModuleId);
17
- const entrySourceDtsName = entrySourceFileName.replace(/\.[cm]?[jt]sx?$/, "");
14
+ const entrySourceFileName = relative(
15
+ options.projectRoot,
16
+ file.facadeModuleId
17
+ );
18
+ const entrySourceDtsName = entrySourceFileName.replace(
19
+ /\.[cm]?[jt]sx?$/,
20
+ ""
21
+ );
18
22
  const dtsFileName = file.fileName.replace(/\.[cm]?js$/, ".d.ts");
19
23
  const relativeSourceDtsName = JSON.stringify("./" + entrySourceDtsName);
20
24
  const dtsFileSource = hasDefaultExport ? `
@@ -31,7 +35,6 @@ export { default } from ${relativeSourceDtsName};
31
35
  }
32
36
  };
33
37
  }
34
- __name(typeDefinitionsPlugin, "typeDefinitionsPlugin");
35
38
  export {
36
39
  typeDefinitionsPlugin
37
40
  };
package/dist/types.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";require('./chunk-ORA4UQMU.cjs');
1
+ "use strict";require('./chunk-SFZRYJZ2.cjs');
package/dist/types.js CHANGED
@@ -1 +1 @@
1
- import "./chunk-OULCUN6I.js";
1
+ import "./chunk-GGNOJ77I.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/unbuild",
3
- "version": "0.41.21",
3
+ "version": "0.41.22",
4
4
  "type": "module",
5
5
  "description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
6
6
  "repository": {
@@ -1,13 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
- }) : x)(function(x) {
6
- if (typeof require !== "undefined") return require.apply(this, arguments);
7
- throw Error('Dynamic require of "' + x + '" is not supported');
8
- });
9
-
10
-
11
-
12
-
13
- exports.__name = __name; exports.__require = __require;
@@ -1,71 +0,0 @@
1
- import {
2
- writeTrace
3
- } from "./chunk-3BDIPKMO.js";
4
- import {
5
- __name
6
- } from "./chunk-3GQAWCBQ.js";
7
-
8
- // src/plugins/tsc.ts
9
- import { createProjectGraphAsync, readCachedProjectGraph } from "@nx/devkit";
10
- import { calculateProjectBuildableDependencies } from "@nx/js/src/utils/buildable-libs-utils";
11
- import { getHelperDependency, HelperDependency } from "@nx/js/src/utils/compiler-helper-dependency";
12
- import ts2Plugin from "rollup-plugin-typescript2";
13
-
14
- // src/utilities/helpers.ts
15
- import { joinPathFragments } from "@nx/devkit";
16
- import { computeCompilerOptionsPaths } from "@nx/js/src/utils/buildable-libs-utils";
17
- import { dirname, extname } from "node:path";
18
- import { pathToFileURL } from "node:url";
19
- import ts from "typescript";
20
- async function loadConfig(configPath) {
21
- if (!/\.(js|mjs)$/.test(extname(configPath))) {
22
- throw new Error("Unsupported config file format");
23
- }
24
- return import(pathToFileURL(configPath).toString()).then((config) => config.default);
25
- }
26
- __name(loadConfig, "loadConfig");
27
- async function createTsCompilerOptions(config, tsConfigPath, projectRoot, dependencies) {
28
- const tsConfigFile = ts.readConfigFile(joinPathFragments(config.workspaceRoot, projectRoot, tsConfigPath), ts.sys.readFile);
29
- const tsConfig = ts.parseJsonConfigFileContent(tsConfigFile.config, ts.sys, dirname(joinPathFragments(config.workspaceRoot, projectRoot, tsConfigPath)));
30
- const compilerOptions = {
31
- rootDir: projectRoot,
32
- declaration: true,
33
- paths: computeCompilerOptionsPaths(tsConfig, dependencies ?? [])
34
- };
35
- writeTrace(compilerOptions, config);
36
- return compilerOptions;
37
- }
38
- __name(createTsCompilerOptions, "createTsCompilerOptions");
39
-
40
- // src/plugins/tsc.ts
41
- var tscPlugin = /* @__PURE__ */ __name(async (options) => {
42
- let projectGraph;
43
- try {
44
- projectGraph = readCachedProjectGraph();
45
- } catch {
46
- await createProjectGraphAsync();
47
- projectGraph = readCachedProjectGraph();
48
- }
49
- if (!projectGraph) {
50
- throw new Error("The build process failed because the project graph is not available. Please run the build command again.");
51
- }
52
- const result = calculateProjectBuildableDependencies(void 0, projectGraph, options.config.workspaceRoot, options.projectName, process.env.NX_TASK_TARGET_TARGET || "build", process.env.NX_TASK_TARGET_CONFIGURATION || "production", true);
53
- let dependencies = result.dependencies;
54
- const tsLibDependency = getHelperDependency(HelperDependency.tsc, options.tsconfig, dependencies, projectGraph, true);
55
- if (tsLibDependency) {
56
- dependencies = dependencies.filter((deps) => deps.name !== tsLibDependency.name);
57
- dependencies.push(tsLibDependency);
58
- }
59
- const compilerOptions = await createTsCompilerOptions(options.config, options.tsconfig, options.projectRoot, dependencies);
60
- return ts2Plugin({
61
- check: options.declaration !== false,
62
- tsconfig: options.tsconfig,
63
- tsconfigOverride: compilerOptions
64
- });
65
- }, "tscPlugin");
66
-
67
- export {
68
- loadConfig,
69
- createTsCompilerOptions,
70
- tscPlugin
71
- };
File without changes
File without changes