@nx/js 16.8.0-beta.0 → 16.8.0-beta.2

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": "16.8.0-beta.0",
3
+ "version": "16.8.0-beta.2",
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,9 +39,9 @@
39
39
  "@babel/preset-env": "^7.22.9",
40
40
  "@babel/preset-typescript": "^7.22.5",
41
41
  "@babel/runtime": "^7.22.6",
42
- "@nrwl/js": "16.8.0-beta.0",
43
- "@nx/devkit": "16.8.0-beta.0",
44
- "@nx/workspace": "16.8.0-beta.0",
42
+ "@nrwl/js": "16.8.0-beta.2",
43
+ "@nx/devkit": "16.8.0-beta.2",
44
+ "@nx/workspace": "16.8.0-beta.2",
45
45
  "@phenomnomnominal/tsquery": "~5.0.1",
46
46
  "babel-plugin-const-enum": "^1.0.1",
47
47
  "babel-plugin-macros": "^2.8.0",
@@ -71,5 +71,5 @@
71
71
  "access": "public"
72
72
  },
73
73
  "type": "commonjs",
74
- "gitHead": "818352404283c1d34ab303d91b3bd16474f54916"
74
+ "gitHead": "9bcc04742f9e1516d8c1ddbfb1907770c347876f"
75
75
  }
@@ -164,21 +164,21 @@ function addLint(tree, options) {
164
164
  setParserOptionsProject: options.setParserOptionsProject,
165
165
  rootProject: options.rootProject,
166
166
  });
167
- // Also update the root .eslintrc.json lintProjectGenerator will not generate it for root projects.
167
+ // Also update the root ESLint config. The lintProjectGenerator will not generate it for root projects.
168
168
  // But we need to set the package.json checks.
169
169
  if (options.rootProject) {
170
- (0, devkit_1.updateJson)(tree, '.eslintrc.json', (json) => {
171
- var _a;
172
- (_a = json.overrides) !== null && _a !== void 0 ? _a : (json.overrides = []);
173
- json.overrides.push({
170
+ const { addOverrideToLintConfig, isEslintConfigSupported,
171
+ // nx-ignore-next-line
172
+ } = require('@nx/linter/src/generators/utils/eslint-file');
173
+ if (isEslintConfigSupported(tree)) {
174
+ addOverrideToLintConfig(tree, '', {
174
175
  files: ['*.json'],
175
176
  parser: 'jsonc-eslint-parser',
176
177
  rules: {
177
178
  '@nx/dependency-checks': 'error',
178
179
  },
179
180
  });
180
- return json;
181
- });
181
+ }
182
182
  }
183
183
  return task;
184
184
  });
@@ -1,4 +1,4 @@
1
- import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-directory-utils';
1
+ import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
2
2
  // nx-ignore-next-line
3
3
  const { Linter } = require('@nx/linter'); // use require to import to avoid circular dependency
4
4
  import type { AssetGlob, FileInputOutput } from './assets/assets';
@@ -10,7 +10,7 @@ const print_diagnostics_1 = require("../typescript/print-diagnostics");
10
10
  const run_type_check_1 = require("../typescript/run-type-check");
11
11
  function getSwcCmd({ swcrcPath, srcPath, destPath }, watch = false) {
12
12
  const swcCLI = require.resolve('@swc/cli/bin/swc.js');
13
- let swcCmd = `${swcCLI} ${
13
+ let swcCmd = `node ${swcCLI} ${
14
14
  // TODO(jack): clean this up when we remove inline module support
15
15
  // Handle root project
16
16
  srcPath === '.' ? 'src' : srcPath} -d ${srcPath === '.' ? `${destPath}/src` : destPath} --config-file=${swcrcPath}`;