@nx/node 20.4.0-canary.20250116-a127177 → 20.4.0-canary.20250117-cba25da

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/node",
3
- "version": "20.4.0-canary.20250116-a127177",
3
+ "version": "20.4.0-canary.20250117-cba25da",
4
4
  "private": false,
5
5
  "description": "The Node Plugin for Nx contains generators to manage Node applications within an Nx workspace.",
6
6
  "repository": {
@@ -32,10 +32,10 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "tslib": "^2.3.0",
35
- "@nx/devkit": "20.4.0-canary.20250116-a127177",
36
- "@nx/jest": "20.4.0-canary.20250116-a127177",
37
- "@nx/js": "20.4.0-canary.20250116-a127177",
38
- "@nx/eslint": "20.4.0-canary.20250116-a127177"
35
+ "@nx/devkit": "20.4.0-canary.20250117-cba25da",
36
+ "@nx/jest": "20.4.0-canary.20250117-cba25da",
37
+ "@nx/js": "20.4.0-canary.20250117-cba25da",
38
+ "@nx/eslint": "20.4.0-canary.20250117-cba25da"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -159,11 +159,15 @@ function ensureDependencies(tree) {
159
159
  return (0, devkit_1.addDependenciesToPackageJson)(tree, { tslib: versions_1.tslibVersion }, { '@types/node': versions_1.typesNodeVersion });
160
160
  }
161
161
  function updatePackageJson(tree, options) {
162
- const packageJson = (0, devkit_1.readJson)(tree, (0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'));
162
+ const packageJsonPath = (0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json');
163
+ if (!tree.exists(packageJsonPath)) {
164
+ return;
165
+ }
166
+ const packageJson = (0, devkit_1.readJson)(tree, packageJsonPath);
163
167
  if (packageJson.type === 'module') {
164
168
  // The @nx/js:lib generator can set the type to 'module' which would
165
169
  // potentially break consumers of the library.
166
170
  delete packageJson.type;
167
171
  }
168
- (0, devkit_1.writeJson)(tree, (0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'), packageJson);
172
+ (0, devkit_1.writeJson)(tree, packageJsonPath, packageJson);
169
173
  }