@nx/js 17.2.8 → 17.3.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/README.md CHANGED
@@ -1,4 +1,9 @@
1
- <p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
1
+ <p style="text-align: center;">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
+ <img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
5
+ </picture>
6
+ </p>
2
7
 
3
8
  <div style="text-align: center;">
4
9
 
@@ -15,9 +20,9 @@
15
20
 
16
21
  <hr>
17
22
 
18
- # Nx: Smart, Fast and Extensible Build System
23
+ # Nx: Smart Monorepos · Fast CI
19
24
 
20
- Nx is a next generation build system with first class monorepo support and powerful integrations.
25
+ Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
21
26
 
22
27
  This package is a [JavaScript/TypeScript plugin for Nx](https://nx.dev/js/overview).
23
28
 
@@ -59,5 +64,5 @@ npx nx@latest init
59
64
  - [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
60
65
 
61
66
  <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
62
- width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
67
+ width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
63
68
 
package/migrations.json CHANGED
@@ -123,6 +123,15 @@
123
123
  "version": "~5.2.2"
124
124
  }
125
125
  }
126
+ },
127
+ "17.3.0": {
128
+ "version": "17.3.0-beta.3",
129
+ "packages": {
130
+ "@types/node": {
131
+ "version": "^18.16.9",
132
+ "alwaysAddToPackageJson": false
133
+ }
134
+ }
126
135
  }
127
136
  }
128
137
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/js",
3
- "version": "17.2.8",
3
+ "version": "17.3.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": {
@@ -57,9 +57,9 @@
57
57
  "semver": "7.5.3",
58
58
  "source-map-support": "0.5.19",
59
59
  "tslib": "^2.3.0",
60
- "@nx/devkit": "17.2.8",
61
- "@nx/workspace": "17.2.8",
62
- "@nrwl/js": "17.2.8"
60
+ "@nx/devkit": "17.3.0-beta.2",
61
+ "@nx/workspace": "17.3.0-beta.2",
62
+ "@nrwl/js": "17.3.0-beta.2"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "verdaccio": "^5.0.4"
@@ -135,9 +135,9 @@ async function runExecutor(options, context) {
135
135
  const stdoutData = JSON.parse(err.stdout?.toString() || '{}');
136
136
  // If the error is that the package doesn't exist, then we can ignore it because we will be publishing it for the first time in the next step
137
137
  if (!(stdoutData.error?.code?.includes('E404') &&
138
- stdoutData.error?.summary?.includes('no such package available')) &&
138
+ stdoutData.error?.summary?.toLowerCase().includes('not found')) &&
139
139
  !(err.stderr?.toString().includes('E404') &&
140
- err.stderr?.toString().includes('no such package available'))) {
140
+ err.stderr?.toString().toLowerCase().includes('not found'))) {
141
141
  console.error(`Something unexpected went wrong when checking for existing dist-tags.\n`, err);
142
142
  return {
143
143
  success: false,
@@ -153,7 +153,10 @@ To fix this you will either need to add a package.json file at that location, or
153
153
  if (options.currentVersionResolver !== 'git-tag') {
154
154
  throw new Error(`Invalid currentVersionResolver "${options.currentVersionResolver}" provided for release group "${options.releaseGroup.name}". Must be "git-tag" when "specifierSource" is "conventional-commits"`);
155
155
  }
156
- specifier = await (0, resolve_semver_specifier_1.resolveSemverSpecifierFromConventionalCommits)(latestMatchingGitTag.tag, options.projectGraph, projects.map((p) => p.name));
156
+ const affectedProjects = options.releaseGroup.projectsRelationship === 'independent'
157
+ ? [projectName]
158
+ : projects.map((p) => p.name);
159
+ specifier = await (0, resolve_semver_specifier_1.resolveSemverSpecifierFromConventionalCommits)(latestMatchingGitTag.tag, options.projectGraph, affectedProjects);
157
160
  if (!specifier) {
158
161
  log(`🚫 No changes were detected using git history and the conventional commits standard.`);
159
162
  break;
@@ -177,7 +177,7 @@ function recursiveUpdateImport(dirPath, importRegex, inlinedDepsDestOutputRecord
177
177
  const updatedContent = fileContent.replace(importRegex, (matched) => {
178
178
  const result = matched.replace(/['"]/g, '');
179
179
  // If a match is the same as the rootParentDir, we're checking its own files so we return the matched as in no changes.
180
- if (result === rootParentDir)
180
+ if (result === rootParentDir || !inlinedDepsDestOutputRecord[result])
181
181
  return matched;
182
182
  const importPath = `"${(0, path_1.relative)(dirPath, inlinedDepsDestOutputRecord[result])}"`;
183
183
  return (0, devkit_1.normalizePath)(importPath);
@@ -1,11 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.findNodes = exports.findClass = exports.addMethod = exports.addParameterToConstructor = exports.replaceNodeValue = exports.getImport = exports.addGlobal = exports.insertImport = exports.removeChange = exports.replaceChange = exports.insertChange = exports.resolveModuleByImport = void 0;
4
- // TODO(colum): replace when https://github.com/nrwl/nx/pull/15497 is merged
5
- const typescript_1 = require("@nx/workspace/src/utilities/typescript");
6
4
  const ensure_typescript_1 = require("./ensure-typescript");
7
5
  const devkit_1 = require("@nx/devkit");
8
6
  const path_1 = require("path");
7
+ const get_source_nodes_1 = require("./get-source-nodes");
9
8
  const normalizedAppRoot = devkit_1.workspaceRoot.replace(/\\/g, '/');
10
9
  let tsModule;
11
10
  let compilerHost;
@@ -228,7 +227,7 @@ function findClass(source, className, silent = false) {
228
227
  if (!tsModule) {
229
228
  tsModule = (0, ensure_typescript_1.ensureTypescript)();
230
229
  }
231
- const nodes = (0, typescript_1.getSourceNodes)(source);
230
+ const nodes = (0, get_source_nodes_1.getSourceNodes)(source);
232
231
  const clazz = nodes.filter((n) => n.kind === tsModule.SyntaxKind.ClassDeclaration &&
233
232
  n.name.text === className)[0];
234
233
  if (!clazz && !silent) {
@@ -6,7 +6,7 @@ export declare const swcCoreVersion = "~1.3.85";
6
6
  export declare const swcHelpersVersion = "~0.5.2";
7
7
  export declare const swcNodeVersion = "~1.6.7";
8
8
  export declare const tsLibVersion = "^2.3.0";
9
- export declare const typesNodeVersion = "18.7.1";
9
+ export declare const typesNodeVersion = "18.16.9";
10
10
  export declare const verdaccioVersion = "^5.0.4";
11
11
  export declare const typescriptVersion = "~5.2.2";
12
12
  /**
@@ -9,7 +9,7 @@ exports.swcCoreVersion = '~1.3.85';
9
9
  exports.swcHelpersVersion = '~0.5.2';
10
10
  exports.swcNodeVersion = '~1.6.7';
11
11
  exports.tsLibVersion = '^2.3.0';
12
- exports.typesNodeVersion = '18.7.1';
12
+ exports.typesNodeVersion = '18.16.9';
13
13
  exports.verdaccioVersion = '^5.0.4';
14
14
  // Typescript
15
15
  exports.typescriptVersion = '~5.2.2';