@storm-software/esbuild 0.35.10 → 0.35.12

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 (65) hide show
  1. package/README.md +1 -1
  2. package/bin/esbuild.cjs +1194 -2706
  3. package/dist/assets.cjs +6 -6
  4. package/dist/assets.js +5 -5
  5. package/dist/build.cjs +14 -14
  6. package/dist/build.js +13 -13
  7. package/dist/{chunk-N6KCNJOR.cjs → chunk-42HYZLJH.cjs} +17 -26
  8. package/dist/{chunk-SAK5QFCE.js → chunk-47A73LZ7.js} +232 -123
  9. package/dist/{chunk-Q77NJNNL.cjs → chunk-4PZGT5BH.cjs} +8 -11
  10. package/dist/{chunk-CHAHHSIR.js → chunk-72UBXZRO.js} +4 -6
  11. package/dist/chunk-77TTTWKY.cjs +25 -0
  12. package/dist/{chunk-DU5R4RJA.js → chunk-77XQDMGA.js} +36 -30
  13. package/dist/{chunk-KK2BGIRB.cjs → chunk-7VE5Y757.cjs} +18 -9
  14. package/dist/{chunk-JHQYSHQ5.js → chunk-CV2AM72J.js} +28 -13
  15. package/dist/{chunk-3VHLCZ6F.js → chunk-EBH4ZCN5.js} +189 -116
  16. package/dist/{chunk-JS5GZ7ZE.cjs → chunk-EGUR2GEF.cjs} +46 -40
  17. package/dist/{chunk-QBMHS72C.js → chunk-F3R5ZFGB.js} +7 -10
  18. package/dist/{chunk-GZSSIGNC.js → chunk-GZSSIGNC.cjs} +2 -2
  19. package/dist/{chunk-ZS2HZUYH.cjs → chunk-HIO4TSG7.cjs} +976 -1206
  20. package/dist/{chunk-YXJYZG6O.cjs → chunk-HPZXWRI7.cjs} +28 -26
  21. package/dist/{chunk-TKNLZW4V.cjs → chunk-JCICRU7K.cjs} +3 -5
  22. package/dist/chunk-KR4NRRPF.js +59 -0
  23. package/dist/{chunk-JNDYTIRD.js → chunk-MAXDIXOQ.js} +2 -2
  24. package/dist/{chunk-B4NWTB7S.cjs → chunk-MYUKVBFG.cjs} +288 -179
  25. package/dist/{chunk-ZDMKNQUW.cjs → chunk-OV5OYAJ7.cjs} +5 -5
  26. package/dist/{chunk-JZBM4QKF.cjs → chunk-PB5XBFPA.cjs} +36 -21
  27. package/dist/{chunk-GWGBQKRY.js → chunk-PDYSQLJS.js} +15 -24
  28. package/dist/{chunk-5ZPCV2IJ.js → chunk-POMR4JSG.js} +154 -266
  29. package/dist/chunk-Q366M4DV.js +37 -0
  30. package/dist/{chunk-UA2A6OC6.js → chunk-QOTJTLX7.js} +1 -1
  31. package/dist/{chunk-EBZ4R3MW.js → chunk-SB2WRTQ2.js} +43 -17
  32. package/dist/{chunk-2NQYRZKO.cjs → chunk-UAPH32Y3.cjs} +204 -131
  33. package/dist/{chunk-VGC3FXLU.js → chunk-VGC3FXLU.cjs} +1 -1
  34. package/dist/{chunk-CY4KF2US.cjs → chunk-WQVSYEMN.cjs} +47 -21
  35. package/dist/chunk-XHTD4QDZ.cjs +6 -0
  36. package/dist/{chunk-GKAHDFNO.js → chunk-ZF7HGC35.js} +3 -9
  37. package/dist/clean.cjs +5 -5
  38. package/dist/clean.js +4 -4
  39. package/dist/config.cjs +6 -6
  40. package/dist/config.js +5 -5
  41. package/dist/context.cjs +8 -8
  42. package/dist/context.js +7 -7
  43. package/dist/index.cjs +16 -16
  44. package/dist/index.js +14 -14
  45. package/dist/package-json.cjs +6 -6
  46. package/dist/package-json.js +5 -5
  47. package/dist/plugins/deps-check.cjs +5 -5
  48. package/dist/plugins/deps-check.js +4 -4
  49. package/dist/plugins/resolve-paths.cjs +4 -4
  50. package/dist/plugins/resolve-paths.js +3 -3
  51. package/dist/{rollup.js → rollup.cjs} +3 -3
  52. package/dist/tsup.cjs +5 -5
  53. package/dist/tsup.js +4 -4
  54. package/dist/types.cjs +2 -2
  55. package/dist/types.js +2 -2
  56. package/dist/watch.cjs +19 -29
  57. package/dist/watch.js +15 -25
  58. package/package.json +4 -4
  59. package/dist/chunk-5R3LX6E4.cjs +0 -6
  60. package/dist/chunk-CA7VVNV2.js +0 -28
  61. package/dist/chunk-IV2WE7RO.cjs +0 -31
  62. package/dist/chunk-ZILTNBKJ.js +0 -57
  63. /package/dist/{chunk-BYH4XDRH.js → chunk-BYH4XDRH.cjs} +0 -0
  64. /package/dist/{chunk-JZ25TPTY.js → chunk-JZ25TPTY.cjs} +0 -0
  65. /package/dist/{chunk-TWFEYLU4.js → chunk-TWFEYLU4.cjs} +0 -0
package/dist/watch.js CHANGED
@@ -1,12 +1,11 @@
1
1
  import {
2
2
  writeError,
3
3
  writeTrace
4
- } from "./chunk-3VHLCZ6F.js";
5
- import "./chunk-QBMHS72C.js";
4
+ } from "./chunk-EBH4ZCN5.js";
5
+ import "./chunk-F3R5ZFGB.js";
6
6
  import {
7
- __name,
8
7
  init_esm_shims
9
- } from "./chunk-CHAHHSIR.js";
8
+ } from "./chunk-72UBXZRO.js";
10
9
 
11
10
  // src/watch.ts
12
11
  init_esm_shims();
@@ -22,7 +21,6 @@ function handleSync(fn) {
22
21
  return error_;
23
22
  }
24
23
  }
25
- __name(handleSync, "handleSync");
26
24
  async function handleAsync(fn) {
27
25
  try {
28
26
  return await fn();
@@ -30,7 +28,6 @@ async function handleAsync(fn) {
30
28
  return error_;
31
29
  }
32
30
  }
33
- __name(handleAsync, "handleAsync");
34
31
  var handle = handleSync;
35
32
  handle.async = handleAsync;
36
33
  var skip = Symbol("skip");
@@ -44,18 +41,18 @@ function transduceSync(list, transformer) {
44
41
  }
45
42
  return transduced;
46
43
  }
47
- __name(transduceSync, "transduceSync");
48
44
  async function transduceAsync(list, transformer) {
49
45
  const transduced = [];
50
- await Promise.all(list.entries().map(async ([i, element_]) => {
51
- const transformed = await transformer(element_, i);
52
- if (transformed !== skip) {
53
- transduced[transduced.length] = transformed;
54
- }
55
- }));
46
+ await Promise.all(
47
+ list.entries().map(async ([i, element_]) => {
48
+ const transformed = await transformer(element_, i);
49
+ if (transformed !== skip) {
50
+ transduced[transduced.length] = transformed;
51
+ }
52
+ })
53
+ );
56
54
  return transduced;
57
55
  }
58
- __name(transduceAsync, "transduceAsync");
59
56
  var transduce = transduceSync;
60
57
  transduce.async = transduceAsync;
61
58
  function pipeSync(fn, ...fns) {
@@ -67,7 +64,6 @@ function pipeSync(fn, ...fns) {
67
64
  return result;
68
65
  };
69
66
  }
70
- __name(pipeSync, "pipeSync");
71
67
  function pipeAsync(fn, ...fns) {
72
68
  return async (...args) => {
73
69
  let result = await fn(...args);
@@ -77,26 +73,20 @@ function pipeAsync(fn, ...fns) {
77
73
  return result;
78
74
  };
79
75
  }
80
- __name(pipeAsync, "pipeAsync");
81
76
  var pipe = pipeSync;
82
77
  pipe.async = pipeAsync;
83
78
 
84
79
  // src/watch.ts
85
- var watch = /* @__PURE__ */ __name((context, options) => {
80
+ var watch = (context, options) => {
86
81
  if (!options.watch) {
87
82
  return context;
88
83
  }
89
84
  const config = {
90
85
  ignoreInitial: true,
91
86
  useFsEvents: true,
92
- ignored: [
93
- "./src/__tests__/**/*",
94
- "./package.json"
95
- ]
87
+ ignored: ["./src/__tests__/**/*", "./package.json"]
96
88
  };
97
- const changeWatcher = createWatcher([
98
- "./src/**/*"
99
- ], config);
89
+ const changeWatcher = createWatcher(["./src/**/*"], config);
100
90
  const fastRebuild = debounce(async () => {
101
91
  const timeBefore = Date.now();
102
92
  const rebuildResult = await handle.async(() => {
@@ -109,7 +99,7 @@ var watch = /* @__PURE__ */ __name((context, options) => {
109
99
  }, 10);
110
100
  changeWatcher.on("change", fastRebuild);
111
101
  return void 0;
112
- }, "watch");
102
+ };
113
103
  export {
114
104
  watch
115
105
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/esbuild",
3
- "version": "0.35.10",
3
+ "version": "0.35.12",
4
4
  "type": "module",
5
5
  "description": "A package containing `esbuild` utilities for building Storm Software libraries and applications",
6
6
  "repository": {
@@ -186,9 +186,9 @@
186
186
  "dependencies": {
187
187
  "@nx/devkit": "20.8.0",
188
188
  "@nx/js": "20.8.0",
189
- "@storm-software/build-tools": "0.144.19",
190
- "@storm-software/config": "1.113.23",
191
- "@storm-software/config-tools": "1.163.24",
189
+ "@storm-software/build-tools": "0.144.21",
190
+ "@storm-software/config": "1.113.25",
191
+ "@storm-software/config-tools": "1.163.26",
192
192
  "chokidar": "^4.0.3",
193
193
  "commander": "^12.1.0",
194
194
  "defu": "6.1.4",
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
4
-
5
- // src/types.ts
6
- _chunkTKNLZW4Vcjs.init_cjs_shims.call(void 0, );
@@ -1,28 +0,0 @@
1
- import {
2
- copyAssets
3
- } from "./chunk-SAK5QFCE.js";
4
- import {
5
- getStopwatch,
6
- writeDebug
7
- } from "./chunk-3VHLCZ6F.js";
8
- import {
9
- __name,
10
- init_esm_shims
11
- } from "./chunk-CHAHHSIR.js";
12
-
13
- // src/assets.ts
14
- init_esm_shims();
15
- async function copyBuildAssets(context) {
16
- if (context.result?.errors.length === 0) {
17
- writeDebug(` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
18
- const stopwatch = getStopwatch(`${context.options.name} asset copy`);
19
- await copyAssets(context.workspaceConfig, context.options.assets ?? [], context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
20
- stopwatch();
21
- }
22
- return context;
23
- }
24
- __name(copyBuildAssets, "copyBuildAssets");
25
-
26
- export {
27
- copyBuildAssets
28
- };
@@ -1,31 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunk2NQYRZKOcjs = require('./chunk-2NQYRZKO.cjs');
5
-
6
-
7
-
8
- var _chunkTKNLZW4Vcjs = require('./chunk-TKNLZW4V.cjs');
9
-
10
- // src/clean.ts
11
- _chunkTKNLZW4Vcjs.init_cjs_shims.call(void 0, );
12
- var _promises = require('fs/promises');
13
- async function clean(name = "ESBuild", directory, config) {
14
- _chunk2NQYRZKOcjs.writeDebug.call(void 0, ` \u{1F9F9} Cleaning ${name} output path: ${directory}`, config);
15
- const stopwatch = _chunk2NQYRZKOcjs.getStopwatch.call(void 0, `${name} output clean`);
16
- await cleanDirectories(directory);
17
- stopwatch();
18
- }
19
- _chunkTKNLZW4Vcjs.__name.call(void 0, clean, "clean");
20
- async function cleanDirectories(directory) {
21
- await _promises.rm.call(void 0, directory, {
22
- recursive: true,
23
- force: true
24
- });
25
- }
26
- _chunkTKNLZW4Vcjs.__name.call(void 0, cleanDirectories, "cleanDirectories");
27
-
28
-
29
-
30
-
31
- exports.clean = clean; exports.cleanDirectories = cleanDirectories;
@@ -1,57 +0,0 @@
1
- import {
2
- joinPaths
3
- } from "./chunk-QBMHS72C.js";
4
- import {
5
- __name,
6
- __require,
7
- init_esm_shims
8
- } from "./chunk-CHAHHSIR.js";
9
-
10
- // src/plugins/resolve-paths.ts
11
- init_esm_shims();
12
- import path from "node:path";
13
- function resolvePathsConfig(options, cwd, projectRoot) {
14
- if (options?.compilerOptions?.paths) {
15
- const paths = Object.entries(options.compilerOptions.paths);
16
- const resolvedPaths = paths.map(([key, paths2]) => {
17
- return [
18
- key,
19
- paths2.map((v) => path.resolve(cwd, v))
20
- ];
21
- });
22
- return Object.fromEntries(resolvedPaths);
23
- }
24
- if (options.extends) {
25
- const extendsPath = path.resolve(projectRoot ? joinPaths(cwd, projectRoot, options.extends) : joinPaths(cwd, options.extends));
26
- const extendsDir = path.dirname(extendsPath);
27
- const extendsConfig = __require(extendsPath);
28
- return resolvePathsConfig(extendsConfig, extendsDir);
29
- }
30
- return [];
31
- }
32
- __name(resolvePathsConfig, "resolvePathsConfig");
33
- var resolvePathsPlugin = /* @__PURE__ */ __name((context) => ({
34
- name: "storm:resolve-paths",
35
- setup(build) {
36
- const parentTsConfig = build.initialOptions.tsconfig ? __require(joinPaths(context.workspaceConfig.workspaceRoot, build.initialOptions.tsconfig.replace(context.workspaceConfig.workspaceRoot, ""))) : __require(joinPaths(context.workspaceConfig.workspaceRoot, "tsconfig.json"));
37
- const resolvedTsPaths = resolvePathsConfig(parentTsConfig, context.workspaceConfig.workspaceRoot, context.options.projectRoot);
38
- const packagesRegex = new RegExp(`^(${Object.keys(resolvedTsPaths).join("|")})$`);
39
- build.onResolve({
40
- filter: packagesRegex
41
- }, (args) => {
42
- if (build.initialOptions.external?.includes(args.path)) {
43
- return {
44
- path: args.path,
45
- external: true
46
- };
47
- }
48
- return {
49
- path: `${resolvedTsPaths[args.path][0]}/index.ts`
50
- };
51
- });
52
- }
53
- }), "resolvePathsPlugin");
54
-
55
- export {
56
- resolvePathsPlugin
57
- };
File without changes
File without changes
File without changes