@nx/workspace 20.3.0-canary.20241218-fb40366 → 20.3.0-rc.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/workspace",
3
- "version": "20.3.0-canary.20241218-fb40366",
3
+ "version": "20.3.0-rc.0",
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": {
@@ -38,12 +38,12 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@nx/devkit": "20.3.0-canary.20241218-fb40366",
41
+ "@nx/devkit": "20.3.0-rc.0",
42
42
  "chalk": "^4.1.0",
43
43
  "enquirer": "~2.3.6",
44
44
  "tslib": "^2.3.0",
45
45
  "yargs-parser": "21.1.1",
46
- "nx": "20.3.0-canary.20241218-fb40366"
46
+ "nx": "20.3.0-rc.0"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
@@ -19,6 +19,7 @@ function moveProjectFiles(tree, schema, project) {
19
19
  '.babelrc',
20
20
  '.eslintrc.json',
21
21
  'eslint.config.js',
22
+ 'eslint.config.cjs',
22
23
  /^jest\.config\.((app|lib)\.)?[jt]s$/,
23
24
  'vite.config.ts',
24
25
  /^webpack.*\.js$/,
@@ -11,8 +11,10 @@ function updateEslintConfig(tree, schema, project) {
11
11
  // if there is no suitable eslint config, we don't need to do anything
12
12
  if (!tree.exists('.eslintrc.json') &&
13
13
  !tree.exists('eslint.config.js') &&
14
+ !tree.exists('eslint.config.cjs') &&
14
15
  !tree.exists('.eslintrc.base.json') &&
15
- !tree.exists('eslint.base.config.js')) {
16
+ !tree.exists('eslint.base.config.js') &&
17
+ !tree.exists('eslint.base.config.cjs')) {
16
18
  return;
17
19
  }
18
20
  try {
@@ -41,7 +41,9 @@ function updateFilesForRootProjects(tree, schema, project) {
41
41
  if (!allowedExt.includes(ext)) {
42
42
  continue;
43
43
  }
44
- if (file === '.eslintrc.json' || file === 'eslint.config.js') {
44
+ if (file === '.eslintrc.json' ||
45
+ file === 'eslint.config.js' ||
46
+ file === 'eslint.config.cjs') {
45
47
  continue;
46
48
  }
47
49
  const oldContent = tree.read((0, path_1.join)(schema.relativeToRootDestination, file), 'utf-8');
@@ -73,7 +75,9 @@ function updateFilesForNonRootProjects(tree, schema, project) {
73
75
  if (!allowedExt.includes(ext)) {
74
76
  continue;
75
77
  }
76
- if (file === '.eslintrc.json' || file === 'eslint.config.js') {
78
+ if (file === '.eslintrc.json' ||
79
+ file === 'eslint.config.cjs' ||
80
+ file === 'eslint.config.js') {
77
81
  continue;
78
82
  }
79
83
  const oldContent = tree.read((0, path_1.join)(schema.relativeToRootDestination, file), 'utf-8');
@@ -339,7 +339,7 @@ function setUpWorkspacesInPackageJson(tree, options) {
339
339
  const workspaces = options.workspaceGlobs ?? ['packages/**'];
340
340
  if (options.packageManager === 'pnpm') {
341
341
  tree.write((0, path_1.join)(options.directory, 'pnpm-workspace.yaml'), `packages:
342
- - ${workspaces.join('\n - ')}
342
+ ${workspaces.map((workspace) => `- "${workspace}"`).join('\n ')}
343
343
  `);
344
344
  }
345
345
  else {