@nx/esbuild 20.0.0-canary.20240925-6182d20 → 20.0.0-canary.20240928-f221a41
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/esbuild",
|
3
|
-
"version": "20.0.0-canary.
|
3
|
+
"version": "20.0.0-canary.20240928-f221a41",
|
4
4
|
"private": false,
|
5
5
|
"description": "The Nx Plugin for esbuild contains executors and generators that support building applications using esbuild",
|
6
6
|
"repository": {
|
@@ -31,14 +31,12 @@
|
|
31
31
|
"migrations": "./migrations.json"
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
|
-
"@nx/devkit": "20.0.0-canary.
|
35
|
-
"@nx/js": "20.0.0-canary.
|
34
|
+
"@nx/devkit": "20.0.0-canary.20240928-f221a41",
|
35
|
+
"@nx/js": "20.0.0-canary.20240928-f221a41",
|
36
36
|
"fast-glob": "3.2.7",
|
37
|
-
"fs-extra": "^11.1.0",
|
38
37
|
"picocolors": "^1.1.0",
|
39
38
|
"tsconfig-paths": "^4.1.2",
|
40
|
-
"tslib": "^2.3.0"
|
41
|
-
"@nrwl/esbuild": "20.0.0-canary.20240925-6182d20"
|
39
|
+
"tslib": "^2.3.0"
|
42
40
|
},
|
43
41
|
"peerDependencies": {
|
44
42
|
"esbuild": "~0.19.2"
|
@@ -6,10 +6,10 @@ const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const js_1 = require("@nx/js");
|
7
7
|
const esbuild = require("esbuild");
|
8
8
|
const normalize_1 = require("./lib/normalize");
|
9
|
-
const fs_extra_1 = require("fs-extra");
|
10
9
|
const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
|
11
10
|
const build_esbuild_options_1 = require("./lib/build-esbuild-options");
|
12
11
|
const get_extra_dependencies_1 = require("./lib/get-extra-dependencies");
|
12
|
+
const node_fs_1 = require("node:fs");
|
13
13
|
const path_1 = require("path");
|
14
14
|
const BUILD_WATCH_FAILED = `[ ${pc.red('watch')} ] build finished with errors (see above), watching for changes...`;
|
15
15
|
const BUILD_WATCH_SUCCEEDED = `[ ${pc.green('watch')} ] build succeeded, watching for changes...`;
|
@@ -17,7 +17,7 @@ async function* esbuildExecutor(_options, context) {
|
|
17
17
|
process.env.NODE_ENV ??= context.configurationName ?? 'production';
|
18
18
|
const options = (0, normalize_1.normalizeOptions)(_options, context);
|
19
19
|
if (options.deleteOutputPath)
|
20
|
-
(0,
|
20
|
+
(0, node_fs_1.rmSync)(options.outputPath, { recursive: true, force: true });
|
21
21
|
const assetsResult = await (0, js_1.copyAssets)(options, context);
|
22
22
|
const externalDependencies = options.external.reduce((acc, name) => {
|
23
23
|
const externalNode = context.projectGraph.externalNodes[`npm:${name}`];
|
@@ -131,7 +131,7 @@ async function* esbuildExecutor(_options, context) {
|
|
131
131
|
const filename = options.format.length === 1
|
132
132
|
? 'meta.json'
|
133
133
|
: `meta.${options.format[i]}.json`;
|
134
|
-
(0,
|
134
|
+
(0, devkit_1.writeJsonFile)((0, devkit_1.joinPathFragments)(options.outputPath, filename), buildResult.metafile);
|
135
135
|
}
|
136
136
|
yield {
|
137
137
|
success: buildResult.errors.length === 0,
|
package/src/utils/fs.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.deleteOutputDir = deleteOutputDir;
|
4
4
|
const path = require("path");
|
5
|
-
const
|
5
|
+
const node_fs_1 = require("node:fs");
|
6
6
|
/**
|
7
7
|
* Delete an output directory, but error out if it's the root of the project.
|
8
8
|
*/
|
@@ -11,5 +11,5 @@ function deleteOutputDir(root, outputPath) {
|
|
11
11
|
if (resolvedOutputPath === root) {
|
12
12
|
throw new Error('Output path MUST not be project root directory!');
|
13
13
|
}
|
14
|
-
(0,
|
14
|
+
(0, node_fs_1.rmSync)(resolvedOutputPath, { recursive: true, force: true });
|
15
15
|
}
|