@nx/workspace 17.0.0-rc.3 → 17.0.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/workspace",
3
- "version": "17.0.0-rc.3",
3
+ "version": "17.0.1",
4
4
  "private": false,
5
5
  "description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.",
6
6
  "repository": {
@@ -61,13 +61,13 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "@nx/devkit": "17.0.0-rc.3",
64
+ "@nx/devkit": "17.0.1",
65
65
  "chalk": "^4.1.0",
66
66
  "enquirer": "~2.3.6",
67
67
  "tslib": "^2.3.0",
68
68
  "yargs-parser": "21.1.1",
69
- "nx": "17.0.0-rc.3",
70
- "@nrwl/workspace": "17.0.0-rc.3"
69
+ "nx": "17.0.1",
70
+ "@nrwl/workspace": "17.0.1"
71
71
  },
72
72
  "publishConfig": {
73
73
  "access": "public"
@@ -13,7 +13,7 @@ async function monorepoGenerator(tree, options) {
13
13
  for (const [, project] of projects) {
14
14
  if (project.root === '.')
15
15
  rootProject = project;
16
- projectsToMove.push(project);
16
+ projectsToMove.unshift(project); // move the root project 1st
17
17
  }
18
18
  // Currently, Nx only handles apps+libs or packages. You cannot mix and match them.
19
19
  // If the standalone project is an app (React, Angular, etc), then use apps+libs.
@@ -41,7 +41,7 @@ function maybeExtractEslintConfigIfRootProject(tree, rootProject) {
41
41
  }
42
42
  // Only need to handle migrating the root rootProject.
43
43
  // If other libs/apps exist, then this migration is already done by `@nx/eslint:lint-rootProject` generator.
44
- migrateConfigToMonorepoStyle?.([rootProject.name], tree, tree.exists((0, devkit_1.joinPathFragments)(rootProject.root, 'jest.config.ts')) ||
44
+ migrateConfigToMonorepoStyle?.([rootProject], tree, tree.exists((0, devkit_1.joinPathFragments)(rootProject.root, 'jest.config.ts')) ||
45
45
  tree.exists((0, devkit_1.joinPathFragments)(rootProject.root, 'jest.config.js'))
46
46
  ? 'jest'
47
47
  : 'none');
@@ -9,7 +9,10 @@ const devkit_1 = require("@nx/devkit");
9
9
  */
10
10
  function updateEslintConfig(tree, schema, project) {
11
11
  // if there is no suitable eslint config, we don't need to do anything
12
- if (!tree.exists('.eslintrc.json') && !tree.exists('eslint.config.js')) {
12
+ if (!tree.exists('.eslintrc.json') &&
13
+ !tree.exists('eslint.config.js') &&
14
+ !tree.exists('.eslintrc.base.json') &&
15
+ !tree.exists('eslint.base.config.js')) {
13
16
  return;
14
17
  }
15
18
  try {
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateImports = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ts_config_1 = require("../../../utilities/ts-config");
6
- const utils_1 = require("./utils");
7
5
  const path_1 = require("path");
8
- const typescript_1 = require("../../../utilities/typescript");
9
6
  const get_import_path_1 = require("../../../utilities/get-import-path");
7
+ const ts_config_1 = require("../../../utilities/ts-config");
8
+ const typescript_1 = require("../../../utilities/typescript");
9
+ const utils_1 = require("./utils");
10
10
  let tsModule;
11
11
  /**
12
12
  * Updates all the imports in the workspace and modifies the tsconfig appropriately.
@@ -118,7 +118,10 @@ function updateImportDeclarations(sourceFile, from, to) {
118
118
  if (!tsModule) {
119
119
  tsModule = (0, typescript_1.ensureTypescript)();
120
120
  }
121
- const importDecls = (0, ts_config_1.findNodes)(sourceFile, tsModule.SyntaxKind.ImportDeclaration);
121
+ const importDecls = (0, ts_config_1.findNodes)(sourceFile, [
122
+ tsModule.SyntaxKind.ImportDeclaration,
123
+ tsModule.SyntaxKind.ExportDeclaration,
124
+ ]);
122
125
  const changes = [];
123
126
  for (const { moduleSpecifier } of importDecls) {
124
127
  if (tsModule.isStringLiteral(moduleSpecifier)) {