@nx/js 22.2.2 → 22.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/js",
3
- "version": "22.2.2",
3
+ "version": "22.2.4",
4
4
  "private": false,
5
5
  "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
6
6
  "repository": {
@@ -39,8 +39,8 @@
39
39
  "@babel/preset-env": "^7.23.2",
40
40
  "@babel/preset-typescript": "^7.22.5",
41
41
  "@babel/runtime": "^7.22.6",
42
- "@nx/devkit": "22.2.2",
43
- "@nx/workspace": "22.2.2",
42
+ "@nx/devkit": "22.2.4",
43
+ "@nx/workspace": "22.2.4",
44
44
  "@zkochan/js-yaml": "0.0.7",
45
45
  "babel-plugin-const-enum": "^1.0.1",
46
46
  "babel-plugin-macros": "^3.1.0",
@@ -60,7 +60,7 @@
60
60
  "tslib": "^2.3.0"
61
61
  },
62
62
  "devDependencies": {
63
- "nx": "22.2.2"
63
+ "nx": "22.2.4"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "verdaccio": "^6.0.5"
@@ -208,7 +208,7 @@ async function* nodeExecutor(options, context) {
208
208
  const runBuild = async () => {
209
209
  let childProcess = null;
210
210
  const whenReady = new Promise(async (resolve) => {
211
- childProcess = (0, child_process_1.fork)(require.resolve('nx'), [
211
+ childProcess = (0, child_process_1.fork)(require.resolve('nx/bin/nx.js'), [
212
212
  'run',
213
213
  `${context.projectName}:${buildTarget.target}${buildTarget.configuration ? `:${buildTarget.configuration}` : ''}`,
214
214
  ], {
@@ -77,8 +77,8 @@ async function* swcExecutor(_options, context) {
77
77
  }
78
78
  if (options.watch) {
79
79
  let disposeFn;
80
- process.on('SIGINT', () => disposeFn());
81
- process.on('SIGTERM', () => disposeFn());
80
+ process.on('SIGINT', () => disposeFn?.());
81
+ process.on('SIGTERM', () => disposeFn?.());
82
82
  return yield* (0, compile_swc_1.compileSwcWatch)(context, options, async () => {
83
83
  const assetResult = await (0, assets_1.copyAssets)(options, context);
84
84
  let packageJsonResult;
@@ -1 +1 @@
1
- {"version":3,"file":"compile-swc.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/swc/compile-swc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,eAAe,EAAU,MAAM,YAAY,CAAC;AAK/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAkEzD,wBAAsB,UAAU,CAC9B,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,4BAA4B,EAC/C,uBAAuB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;;;;;;GA4C7C;AAED,wBAAuB,eAAe,CACpC,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,4BAA4B,EAC/C,uBAAuB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;aAcC,OAAO;aAAW,MAAM;aA+FtE"}
1
+ {"version":3,"file":"compile-swc.d.ts","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/swc/compile-swc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,eAAe,EAAU,MAAM,YAAY,CAAC;AAK/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAkEzD,wBAAsB,UAAU,CAC9B,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,4BAA4B,EAC/C,uBAAuB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;;;;;;GA+C7C;AAED,wBAAuB,eAAe,CACpC,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,4BAA4B,EAC/C,uBAAuB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC;aAcC,OAAO;aAAW,MAAM;aA+FtE"}
@@ -66,10 +66,13 @@ async function compileSwc(context, normalizedOptions, postCompilationCallback) {
66
66
  devkit_1.logger.log(swcCmdLog.replace(/\n/, ''));
67
67
  }
68
68
  catch (error) {
69
- devkit_1.logger.error('SWC compilation failed');
70
- if (error.stderr) {
69
+ devkit_1.logger.error(`SWC compilation failed: ${error?.message ?? error}`);
70
+ if (error?.stderr) {
71
71
  devkit_1.logger.error(error.stderr.toString());
72
72
  }
73
+ if (error?.stdout) {
74
+ devkit_1.logger.error(error.stdout.toString());
75
+ }
73
76
  return { success: false };
74
77
  }
75
78
  if (normalizedOptions.skipTypeCheck && !normalizedOptions.isTsSolutionSetup) {