@nx/js 16.8.0-beta.1 → 16.8.0-beta.3

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.1",
3
+ "version": "16.8.0-beta.3",
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.1",
43
- "@nx/devkit": "16.8.0-beta.1",
44
- "@nx/workspace": "16.8.0-beta.1",
42
+ "@nrwl/js": "16.8.0-beta.3",
43
+ "@nx/devkit": "16.8.0-beta.3",
44
+ "@nx/workspace": "16.8.0-beta.3",
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": "231a998e004c13e559c171ba6c164a9127886153"
74
+ "gitHead": "dcd48165a485bc8db57a1fb02b96a0772de3b7e9"
75
75
  }
@@ -8,6 +8,7 @@ const package_json_1 = require("nx/src/utils/package-json");
8
8
  const semver_2 = require("semver");
9
9
  const ts_config_1 = require("../../utils/typescript/ts-config");
10
10
  const versions_1 = require("../../utils/versions");
11
+ const path_1 = require("path");
11
12
  function getInstalledTypescriptVersion(tree) {
12
13
  var _a, _b, _c, _d, _e, _f;
13
14
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
@@ -41,7 +42,7 @@ function initGenerator(tree, schema) {
41
42
  const tasks = [];
42
43
  // add tsconfig.base.json
43
44
  if (!(0, ts_config_1.getRootTsConfigFileName)(tree)) {
44
- (0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, './files'), '.', {
45
+ (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, './files'), '.', {
45
46
  fileName: (_a = schema.tsConfigName) !== null && _a !== void 0 ? _a : 'tsconfig.base.json',
46
47
  });
47
48
  }
@@ -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
  });