@nx/node 20.4.0-canary.20250116-a127177 → 20.4.0-canary.20250118-ee135b2

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/node",
3
- "version": "20.4.0-canary.20250116-a127177",
3
+ "version": "20.4.0-canary.20250118-ee135b2",
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.20250118-ee135b2",
36
+ "@nx/jest": "20.4.0-canary.20250118-ee135b2",
37
+ "@nx/js": "20.4.0-canary.20250118-ee135b2",
38
+ "@nx/eslint": "20.4.0-canary.20250118-ee135b2"
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
  }