@storm-software/esbuild 0.34.0 → 0.34.1
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 +1 -1
- package/bin/esbuild.cjs +4 -4
- package/dist/build.cjs +3 -3
- package/dist/build.js +2 -2
- package/dist/{chunk-X6OXFNDR.js → chunk-7A6JPBG7.js} +4 -5
- package/dist/{chunk-AXEZCHZS.cjs → chunk-DZPLKD6O.cjs} +1 -0
- package/dist/{chunk-KGKL7VDG.js → chunk-RTDGFM3J.js} +1 -0
- package/dist/{chunk-E5AAO2PH.cjs → chunk-RVMQBDDK.cjs} +10 -11
- package/dist/config.cjs +2 -2
- package/dist/config.d.cts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/esbuild.cjs
CHANGED
|
@@ -78,6 +78,7 @@ var DEFAULT_BUILD_OPTIONS = {
|
|
|
78
78
|
keepNames: true,
|
|
79
79
|
metafile: false,
|
|
80
80
|
treeshake: true,
|
|
81
|
+
splitting: true,
|
|
81
82
|
shims: false,
|
|
82
83
|
watch: false,
|
|
83
84
|
bundle: true,
|
|
@@ -232,19 +233,18 @@ async function resolveContext(userOptions) {
|
|
|
232
233
|
throw new Error("Cannot find package.json configuration");
|
|
233
234
|
}
|
|
234
235
|
const env = (0, import_build_tools2.getEnv)("esbuild", options);
|
|
236
|
+
const define = (0, import_defu.default)(options.define ?? {}, env ?? {});
|
|
235
237
|
const resolvedOptions = {
|
|
236
238
|
name: projectName,
|
|
237
239
|
...options,
|
|
238
240
|
tsconfig: (0, import_correct_paths.joinPaths)(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
239
241
|
metafile: userOptions.mode === "development",
|
|
240
242
|
clean: false,
|
|
241
|
-
splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
|
|
242
243
|
env,
|
|
243
244
|
define: {
|
|
244
245
|
STORM_FORMAT: JSON.stringify(options.format),
|
|
245
|
-
...
|
|
246
|
-
|
|
247
|
-
const value = JSON.stringify(env[key]);
|
|
246
|
+
...Object.keys(define).filter((key) => define[key] !== void 0).reduce((res, key) => {
|
|
247
|
+
const value = JSON.stringify(define[key]);
|
|
248
248
|
const safeKey = key.replaceAll("(", "").replaceAll(")", "");
|
|
249
249
|
return {
|
|
250
250
|
...res,
|
package/dist/build.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkRVMQBDDKcjs = require('./chunk-RVMQBDDK.cjs');
|
|
5
5
|
require('./chunk-Y4XWI6JJ.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-DZPLKD6O.cjs');
|
|
7
7
|
require('./chunk-EZGTDCYM.cjs');
|
|
8
8
|
require('./chunk-S6M44SSZ.cjs');
|
|
9
9
|
require('./chunk-WRBUO7H6.cjs');
|
|
@@ -18,4 +18,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.build =
|
|
21
|
+
exports.build = _chunkRVMQBDDKcjs.build; exports.watch = _chunkRVMQBDDKcjs.watch;
|
package/dist/build.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
build,
|
|
3
3
|
watch
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7A6JPBG7.js";
|
|
5
5
|
import "./chunk-35YNFZCF.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-RTDGFM3J.js";
|
|
7
7
|
import "./chunk-GWG4HOQ6.js";
|
|
8
8
|
import "./chunk-T5272PC2.js";
|
|
9
9
|
import "./chunk-LYDEMC26.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
copyAssets,
|
|
9
9
|
getEnv,
|
|
10
10
|
getWorkspaceConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RTDGFM3J.js";
|
|
12
12
|
import {
|
|
13
13
|
depsCheckPlugin
|
|
14
14
|
} from "./chunk-IX6DNVUR.js";
|
|
@@ -145,19 +145,18 @@ async function resolveContext(userOptions) {
|
|
|
145
145
|
throw new Error("Cannot find package.json configuration");
|
|
146
146
|
}
|
|
147
147
|
const env = getEnv("esbuild", options);
|
|
148
|
+
const define = defu(options.define ?? {}, env ?? {});
|
|
148
149
|
const resolvedOptions = {
|
|
149
150
|
name: projectName,
|
|
150
151
|
...options,
|
|
151
152
|
tsconfig: joinPaths(projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
152
153
|
metafile: userOptions.mode === "development",
|
|
153
154
|
clean: false,
|
|
154
|
-
splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
|
|
155
155
|
env,
|
|
156
156
|
define: {
|
|
157
157
|
STORM_FORMAT: JSON.stringify(options.format),
|
|
158
|
-
...
|
|
159
|
-
|
|
160
|
-
const value = JSON.stringify(env[key]);
|
|
158
|
+
...Object.keys(define).filter((key) => define[key] !== void 0).reduce((res, key) => {
|
|
159
|
+
const value = JSON.stringify(define[key]);
|
|
161
160
|
const safeKey = key.replaceAll("(", "").replaceAll(")", "");
|
|
162
161
|
return {
|
|
163
162
|
...res,
|
|
@@ -8,7 +8,7 @@ var _chunkY4XWI6JJcjs = require('./chunk-Y4XWI6JJ.cjs');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkDZPLKD6Ocjs = require('./chunk-DZPLKD6O.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunkMWGFCZF4cjs = require('./chunk-MWGFCZF4.cjs');
|
|
@@ -120,7 +120,7 @@ async function resolveContext(userOptions) {
|
|
|
120
120
|
if (!workspaceRoot) {
|
|
121
121
|
throw new Error("Cannot find Nx workspace root");
|
|
122
122
|
}
|
|
123
|
-
const workspaceConfig = await
|
|
123
|
+
const workspaceConfig = await _chunkDZPLKD6Ocjs.getWorkspaceConfig.call(void 0, true, {
|
|
124
124
|
workspaceRoot: workspaceRoot.dir
|
|
125
125
|
});
|
|
126
126
|
_chunkY3LXNK5Ccjs.writeDebug.call(void 0, " \u2699\uFE0F Resolving build options", workspaceConfig);
|
|
@@ -139,25 +139,24 @@ async function resolveContext(userOptions) {
|
|
|
139
139
|
if (!_optionalChain([projectConfigurations, 'optionalAccess', _5 => _5.projects, 'optionalAccess', _6 => _6[projectName]])) {
|
|
140
140
|
throw new Error("The Build process failed because the project does not have a valid configuration in the project.json file. Check if the file exists in the root of the project.");
|
|
141
141
|
}
|
|
142
|
-
const options = _defu2.default.call(void 0, userOptions,
|
|
142
|
+
const options = _defu2.default.call(void 0, userOptions, _chunkDZPLKD6Ocjs.DEFAULT_BUILD_OPTIONS);
|
|
143
143
|
const packageJsonPath = _chunkXITTOHOGcjs.joinPaths.call(void 0, workspaceRoot.dir, options.projectRoot, "package.json");
|
|
144
144
|
if (!_fs.existsSync.call(void 0, packageJsonPath)) {
|
|
145
145
|
throw new Error("Cannot find package.json configuration");
|
|
146
146
|
}
|
|
147
|
-
const env =
|
|
147
|
+
const env = _chunkDZPLKD6Ocjs.getEnv.call(void 0, "esbuild", options);
|
|
148
|
+
const define = _defu2.default.call(void 0, _nullishCoalesce(options.define, () => ( {})), _nullishCoalesce(env, () => ( {})));
|
|
148
149
|
const resolvedOptions = {
|
|
149
150
|
name: projectName,
|
|
150
151
|
...options,
|
|
151
152
|
tsconfig: _chunkXITTOHOGcjs.joinPaths.call(void 0, projectRoot, userOptions.tsconfig ? userOptions.tsconfig.replace(projectRoot, "") : "tsconfig.json"),
|
|
152
153
|
metafile: userOptions.mode === "development",
|
|
153
154
|
clean: false,
|
|
154
|
-
splitting: options.format === "iife" ? false : options.treeshake === void 0 ? options.splitting : true,
|
|
155
155
|
env,
|
|
156
156
|
define: {
|
|
157
157
|
STORM_FORMAT: JSON.stringify(options.format),
|
|
158
|
-
...
|
|
159
|
-
|
|
160
|
-
const value = JSON.stringify(env[key]);
|
|
158
|
+
...Object.keys(define).filter((key) => define[key] !== void 0).reduce((res, key) => {
|
|
159
|
+
const value = JSON.stringify(define[key]);
|
|
161
160
|
const safeKey = key.replaceAll("(", "").replaceAll(")", "");
|
|
162
161
|
return {
|
|
163
162
|
...res,
|
|
@@ -194,8 +193,8 @@ async function generatePackageJson(context) {
|
|
|
194
193
|
if (!packageJson) {
|
|
195
194
|
throw new Error("Cannot find package.json configuration file");
|
|
196
195
|
}
|
|
197
|
-
packageJson = await
|
|
198
|
-
packageJson = await
|
|
196
|
+
packageJson = await _chunkDZPLKD6Ocjs.addPackageDependencies.call(void 0, context.workspaceConfig.workspaceRoot, context.options.projectRoot, context.projectName, packageJson);
|
|
197
|
+
packageJson = await _chunkDZPLKD6Ocjs.addWorkspacePackageJsonFields.call(void 0, context.workspaceConfig, context.options.projectRoot, context.sourceRoot, context.projectName, false, packageJson);
|
|
199
198
|
if (context.options.entry) {
|
|
200
199
|
packageJson.exports ??= {};
|
|
201
200
|
packageJson.exports["./package.json"] ??= "./package.json";
|
|
@@ -295,7 +294,7 @@ async function copyBuildAssets(context) {
|
|
|
295
294
|
if (_optionalChain([context, 'access', _7 => _7.result, 'optionalAccess', _8 => _8.errors, 'access', _9 => _9.length]) === 0) {
|
|
296
295
|
_chunkY3LXNK5Ccjs.writeDebug.call(void 0, ` \u{1F4CB} Copying asset files to output directory: ${context.outputPath}`, context.workspaceConfig);
|
|
297
296
|
const stopwatch = _chunkY3LXNK5Ccjs.getStopwatch.call(void 0, `${context.options.name} asset copy`);
|
|
298
|
-
await
|
|
297
|
+
await _chunkDZPLKD6Ocjs.copyAssets.call(void 0, context.workspaceConfig, _nullishCoalesce(context.options.assets, () => ( [])), context.outputPath, context.options.projectRoot, context.sourceRoot, true, false);
|
|
299
298
|
stopwatch();
|
|
300
299
|
}
|
|
301
300
|
return context;
|
package/dist/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkDZPLKD6Ocjs = require('./chunk-DZPLKD6O.cjs');
|
|
5
5
|
require('./chunk-EZGTDCYM.cjs');
|
|
6
6
|
require('./chunk-S6M44SSZ.cjs');
|
|
7
7
|
require('./chunk-WRBUO7H6.cjs');
|
|
@@ -15,4 +15,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.DEFAULT_BUILD_OPTIONS =
|
|
18
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkDZPLKD6Ocjs.DEFAULT_BUILD_OPTIONS; exports.getDefaultBuildPlugins = _chunkDZPLKD6Ocjs.getDefaultBuildPlugins;
|
package/dist/config.d.cts
CHANGED
|
@@ -7,6 +7,6 @@ import 'zod';
|
|
|
7
7
|
import 'tsup';
|
|
8
8
|
|
|
9
9
|
declare const getDefaultBuildPlugins: (options: ESBuildOptions, context: ESBuildContext) => esbuild.Plugin[];
|
|
10
|
-
declare const DEFAULT_BUILD_OPTIONS: Required<Pick<ESBuildOptions, "assets" | "format" | "platform" | "target" | "tsconfig" | "mode" | "includeSrc" | "generatePackageJson" | "keepNames" | "metafile" | "treeshake" | "shims" | "watch" | "bundle" | "loader" | "banner" | "distDir">>;
|
|
10
|
+
declare const DEFAULT_BUILD_OPTIONS: Required<Pick<ESBuildOptions, "assets" | "format" | "platform" | "target" | "tsconfig" | "mode" | "includeSrc" | "generatePackageJson" | "keepNames" | "metafile" | "treeshake" | "splitting" | "shims" | "watch" | "bundle" | "loader" | "banner" | "distDir">>;
|
|
11
11
|
|
|
12
12
|
export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins };
|
package/dist/config.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ import 'zod';
|
|
|
7
7
|
import 'tsup';
|
|
8
8
|
|
|
9
9
|
declare const getDefaultBuildPlugins: (options: ESBuildOptions, context: ESBuildContext) => esbuild.Plugin[];
|
|
10
|
-
declare const DEFAULT_BUILD_OPTIONS: Required<Pick<ESBuildOptions, "assets" | "format" | "platform" | "target" | "tsconfig" | "mode" | "includeSrc" | "generatePackageJson" | "keepNames" | "metafile" | "treeshake" | "shims" | "watch" | "bundle" | "loader" | "banner" | "distDir">>;
|
|
10
|
+
declare const DEFAULT_BUILD_OPTIONS: Required<Pick<ESBuildOptions, "assets" | "format" | "platform" | "target" | "tsconfig" | "mode" | "includeSrc" | "generatePackageJson" | "keepNames" | "metafile" | "treeshake" | "splitting" | "shims" | "watch" | "bundle" | "loader" | "banner" | "distDir">>;
|
|
11
11
|
|
|
12
12
|
export { DEFAULT_BUILD_OPTIONS, getDefaultBuildPlugins };
|
package/dist/config.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkRVMQBDDKcjs = require('./chunk-RVMQBDDK.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ var _chunkY4XWI6JJcjs = require('./chunk-Y4XWI6JJ.cjs');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkDZPLKD6Ocjs = require('./chunk-DZPLKD6O.cjs');
|
|
19
19
|
require('./chunk-EZGTDCYM.cjs');
|
|
20
20
|
require('./chunk-S6M44SSZ.cjs');
|
|
21
21
|
require('./chunk-WRBUO7H6.cjs');
|
|
@@ -53,4 +53,4 @@ require('./chunk-BGYQAVKQ.cjs');
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
exports.DEFAULT_BUILD_OPTIONS =
|
|
56
|
+
exports.DEFAULT_BUILD_OPTIONS = _chunkDZPLKD6Ocjs.DEFAULT_BUILD_OPTIONS; exports.Filter = _chunkRVMQBDDKcjs.Filter; exports.Mapper = _chunkRVMQBDDKcjs.Mapper; exports.build = _chunkRVMQBDDKcjs.build; exports.clean = _chunkY4XWI6JJcjs.clean; exports.cleanDirectories = _chunkY4XWI6JJcjs.cleanDirectories; exports.emitDts = _chunkETTFFUNGcjs.emitDts; exports.emitDtsFiles = _chunkETTFFUNGcjs.emitDtsFiles; exports.ensureTempDeclarationDir = _chunkETTFFUNGcjs.ensureTempDeclarationDir; exports.getDefaultBuildPlugins = _chunkDZPLKD6Ocjs.getDefaultBuildPlugins; exports.handle = _chunkRVMQBDDKcjs.handle; exports.pipe = _chunkRVMQBDDKcjs.pipe; exports.skip = _chunkRVMQBDDKcjs.skip; exports.slash = _chunkETTFFUNGcjs.slash; exports.toAbsolutePath = _chunkETTFFUNGcjs.toAbsolutePath; exports.transduce = _chunkRVMQBDDKcjs.transduce; exports.watch = _chunkRVMQBDDKcjs.watch;
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
skip,
|
|
8
8
|
transduce,
|
|
9
9
|
watch
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7A6JPBG7.js";
|
|
11
11
|
import {
|
|
12
12
|
clean,
|
|
13
13
|
cleanDirectories
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
DEFAULT_BUILD_OPTIONS,
|
|
17
17
|
getDefaultBuildPlugins
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RTDGFM3J.js";
|
|
19
19
|
import "./chunk-GWG4HOQ6.js";
|
|
20
20
|
import "./chunk-T5272PC2.js";
|
|
21
21
|
import "./chunk-LYDEMC26.js";
|