@nx/node 0.0.0-pr-32117-f006df9 → 0.0.0-pr-32117-ebf1c19

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": "0.0.0-pr-32117-f006df9",
3
+ "version": "0.0.0-pr-32117-ebf1c19",
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,16 +32,16 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "tslib": "^2.3.0",
35
- "@nx/devkit": "0.0.0-pr-32117-f006df9",
36
- "@nx/jest": "0.0.0-pr-32117-f006df9",
37
- "@nx/js": "0.0.0-pr-32117-f006df9",
38
- "@nx/eslint": "0.0.0-pr-32117-f006df9",
39
- "@nx/docker": "0.0.0-pr-32117-f006df9",
35
+ "@nx/devkit": "0.0.0-pr-32117-ebf1c19",
36
+ "@nx/jest": "0.0.0-pr-32117-ebf1c19",
37
+ "@nx/js": "0.0.0-pr-32117-ebf1c19",
38
+ "@nx/eslint": "0.0.0-pr-32117-ebf1c19",
39
+ "@nx/docker": "0.0.0-pr-32117-ebf1c19",
40
40
  "tcp-port-used": "^1.0.2",
41
41
  "kill-port": "^1.6.1"
42
42
  },
43
43
  "devDependencies": {
44
- "nx": "0.0.0-pr-32117-f006df9"
44
+ "nx": "0.0.0-pr-32117-ebf1c19"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
@@ -1 +1 @@
1
- {"version":3,"file":"add-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../packages/node/src/generators/application/lib/add-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,IAAI,EACL,MAAM,YAAY,CAAC;AAepB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,iBAAiB,CA8CnB"}
1
+ {"version":3,"file":"add-dependencies.d.ts","sourceRoot":"","sources":["../../../../../../../packages/node/src/generators/application/lib/add-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,IAAI,EAEL,MAAM,YAAY,CAAC;AAepB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,GACxB,iBAAiB,CA0DnB"}
@@ -37,6 +37,13 @@ function addProjectDependencies(tree, options) {
37
37
  },
38
38
  fastify: {},
39
39
  };
40
+ const projectPackageJson = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'package.json');
41
+ if (tree.exists(projectPackageJson)) {
42
+ (0, devkit_1.updateJson)(tree, projectPackageJson, (json) => {
43
+ json.dependencies ??= { ...frameworkDependencies };
44
+ return json;
45
+ });
46
+ }
40
47
  return (0, devkit_1.addDependenciesToPackageJson)(tree, {
41
48
  ...frameworkDependencies[options.framework],
42
49
  tslib: versions_2.tslibVersion,
@@ -30,7 +30,7 @@ function addProject(tree, options) {
30
30
  }
31
31
  project.targets = {
32
32
  ...project.targets,
33
- ...(0, create_targets_1.getPruneTargets)('build'),
33
+ ...(0, create_targets_1.getPruneTargets)('build', options.outputPath),
34
34
  };
35
35
  project.targets.serve = (0, create_targets_1.getServeConfig)(options);
36
36
  const packageJson = {
@@ -4,7 +4,7 @@ export declare function getWebpackBuildConfig(tree: Tree, project: ProjectConfig
4
4
  export declare function getEsBuildConfig(tree: Tree, project: ProjectConfiguration, options: NormalizedSchema): TargetConfiguration;
5
5
  export declare function getServeConfig(options: NormalizedSchema): TargetConfiguration;
6
6
  export declare function getNestWebpackBuildConfig(): TargetConfiguration;
7
- export declare function getPruneTargets(buildTarget: string): {
7
+ export declare function getPruneTargets(buildTarget: string, outputPath: string): {
8
8
  prune: TargetConfiguration;
9
9
  'prune-lockfile': TargetConfiguration;
10
10
  'copy-workspace-modules': TargetConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"create-targets.d.ts","sourceRoot":"","sources":["../../../../../../../packages/node/src/generators/application/lib/create-targets.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EACpB,IAAI,EACJ,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,mBAAmB,CA+BrB;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,mBAAmB,CAqCrB;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,mBAAmB,CAuB7E;AAED,wBAAgB,yBAAyB,IAAI,mBAAmB,CAa/D;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG;IACpD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,gBAAgB,EAAE,mBAAmB,CAAC;IACtC,wBAAwB,EAAE,mBAAmB,CAAC;CAC/C,CAwBA"}
1
+ {"version":3,"file":"create-targets.d.ts","sourceRoot":"","sources":["../../../../../../../packages/node/src/generators/application/lib/create-targets.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,oBAAoB,EACpB,IAAI,EACJ,mBAAmB,EAEpB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,mBAAmB,CA+BrB;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,mBAAmB,CAqCrB;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,mBAAmB,CAuB7E;AAED,wBAAgB,yBAAyB,IAAI,mBAAmB,CAa/D;AAED,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,GACjB;IACD,KAAK,EAAE,mBAAmB,CAAC;IAC3B,gBAAgB,EAAE,mBAAmB,CAAC;IACtC,wBAAwB,EAAE,mBAAmB,CAAC;CAC/C,CAgCA"}
@@ -7,6 +7,7 @@ exports.getNestWebpackBuildConfig = getNestWebpackBuildConfig;
7
7
  exports.getPruneTargets = getPruneTargets;
8
8
  const devkit_1 = require("@nx/devkit");
9
9
  const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
10
+ const js_1 = require("@nx/js");
10
11
  function getWebpackBuildConfig(tree, project, options) {
11
12
  const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(project, tree);
12
13
  return {
@@ -106,12 +107,17 @@ function getNestWebpackBuildConfig() {
106
107
  },
107
108
  };
108
109
  }
109
- function getPruneTargets(buildTarget) {
110
+ function getPruneTargets(buildTarget, outputPath) {
111
+ const lockFileName = (0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)() ?? 'npm') ?? 'package-lock.json';
110
112
  return {
111
113
  'prune-lockfile': {
112
114
  dependsOn: ['build'],
113
115
  cache: true,
114
116
  executor: '@nx/js:prune-lockfile',
117
+ outputs: [
118
+ `{workspaceRoot}/${(0, devkit_1.joinPathFragments)(outputPath, 'package.json')}`,
119
+ `{workspaceRoot}/${(0, devkit_1.joinPathFragments)(outputPath, lockFileName)}`,
120
+ ],
115
121
  options: {
116
122
  buildTarget,
117
123
  },
@@ -119,13 +125,15 @@ function getPruneTargets(buildTarget) {
119
125
  'copy-workspace-modules': {
120
126
  dependsOn: ['build'],
121
127
  cache: true,
128
+ outputs: [
129
+ `{workspaceRoot}/${(0, devkit_1.joinPathFragments)(outputPath, 'workspace_modules')}`,
130
+ ],
122
131
  executor: '@nx/js:copy-workspace-modules',
123
132
  options: {
124
133
  buildTarget,
125
134
  },
126
135
  },
127
136
  prune: {
128
- cache: true,
129
137
  dependsOn: ['prune-lockfile', 'copy-workspace-modules'],
130
138
  executor: 'nx:noop',
131
139
  },