@nx/js 16.8.0 → 16.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/js",
3
- "version": "16.8.0",
3
+ "version": "16.8.1",
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",
43
- "@nx/devkit": "16.8.0",
44
- "@nx/workspace": "16.8.0",
42
+ "@nrwl/js": "16.8.1",
43
+ "@nx/devkit": "16.8.1",
44
+ "@nx/workspace": "16.8.1",
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": "af53c7cfb21c0ebc7be2dab33b712f8d10bc81f7"
74
+ "gitHead": "29a7b8575e683d3a581b4bf6f82ee4486bfa94dd"
75
75
  }
@@ -166,18 +166,20 @@ async function addLint(tree, options) {
166
166
  const { addOverrideToLintConfig, lintConfigHasOverride, isEslintConfigSupported, updateOverrideInLintConfig,
167
167
  // nx-ignore-next-line
168
168
  } = require('@nx/linter/src/generators/utils/eslint-file');
169
+ // if config is not supported, we don't need to do anything
170
+ if (!isEslintConfigSupported(tree)) {
171
+ return task;
172
+ }
169
173
  // Also update the root ESLint config. The lintProjectGenerator will not generate it for root projects.
170
174
  // But we need to set the package.json checks.
171
175
  if (options.rootProject) {
172
- if (isEslintConfigSupported(tree)) {
173
- addOverrideToLintConfig(tree, '', {
174
- files: ['*.json'],
175
- parser: 'jsonc-eslint-parser',
176
- rules: {
177
- '@nx/dependency-checks': 'error',
178
- },
179
- });
180
- }
176
+ addOverrideToLintConfig(tree, '', {
177
+ files: ['*.json'],
178
+ parser: 'jsonc-eslint-parser',
179
+ rules: {
180
+ '@nx/dependency-checks': 'error',
181
+ },
182
+ });
181
183
  }
182
184
  // If project lints package.json with @nx/dependency-checks, then add ignore files for
183
185
  // build configuration files such as vite.config.ts. These config files need to be
@@ -67,7 +67,11 @@ function addMissingDependencies(packageJson, { projectName, targetName, configur
67
67
  }
68
68
  else {
69
69
  const packageName = entry.name;
70
+ if (!!workspacePackageJson.devDependencies?.[packageName]) {
71
+ return;
72
+ }
70
73
  if (!packageJson.dependencies?.[packageName] &&
74
+ !packageJson.devDependencies?.[packageName] &&
71
75
  !packageJson.peerDependencies?.[packageName]) {
72
76
  const outputs = (0, devkit_1.getOutputsForTargetAndConfiguration)({
73
77
  overrides: {},