@nx/node 16.0.0-beta.5 → 16.0.0-beta.7

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/executors.json CHANGED
@@ -1,10 +1,5 @@
1
1
  {
2
2
  "executors": {
3
- "webpack": {
4
- "implementation": "./src/executors/webpack/webpack.impl",
5
- "schema": "./src/executors/webpack/schema.json",
6
- "description": "Build a Node application using Webpack."
7
- },
8
3
  "node": {
9
4
  "implementation": "./src/executors/node/node.impl",
10
5
  "schema": "./src/executors/node/schema.json",
@@ -12,11 +7,6 @@
12
7
  }
13
8
  },
14
9
  "builders": {
15
- "webpack": {
16
- "implementation": "./src/executors/webpack/compat",
17
- "schema": "./src/executors/webpack/schema.json",
18
- "description": "Build a Node application using Webpack."
19
- },
20
10
  "node": {
21
11
  "implementation": "./src/executors/node/compat",
22
12
  "schema": "./src/executors/node/schema.json",
package/migrations.json CHANGED
@@ -35,6 +35,12 @@
35
35
  "version": "16.0.0-beta.1",
36
36
  "description": "Replace @nrwl/node with @nx/node",
37
37
  "implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
38
+ },
39
+ "update-16-0-0-update-executor": {
40
+ "cli": "nx",
41
+ "version": "16.0.0-beta.5",
42
+ "description": "Replace @nrwl/node:webpack with @nx/node:webpack",
43
+ "implementation": "./src/migrations/update-16-0-0/update-webpack-executor"
38
44
  }
39
45
  },
40
46
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/node",
3
- "version": "16.0.0-beta.5",
3
+ "version": "16.0.0-beta.7",
4
4
  "private": false,
5
5
  "description": "The Node Plugin for Nx contains generators and executors to manage Node applications within an Nx workspace.",
6
6
  "repository": {
@@ -31,18 +31,17 @@
31
31
  "migrations": "./migrations.json"
32
32
  },
33
33
  "dependencies": {
34
- "@nrwl/node": "16.0.0-beta.5",
35
- "@nx/devkit": "16.0.0-beta.5",
36
- "@nx/jest": "16.0.0-beta.5",
37
- "@nx/js": "16.0.0-beta.5",
38
- "@nx/linter": "16.0.0-beta.5",
39
- "@nx/webpack": "16.0.0-beta.5",
40
- "@nx/workspace": "16.0.0-beta.5",
34
+ "@nrwl/node": "16.0.0-beta.7",
35
+ "@nx/devkit": "16.0.0-beta.7",
36
+ "@nx/jest": "16.0.0-beta.7",
37
+ "@nx/js": "16.0.0-beta.7",
38
+ "@nx/linter": "16.0.0-beta.7",
39
+ "@nx/workspace": "16.0.0-beta.7",
41
40
  "tslib": "^2.3.0"
42
41
  },
43
42
  "publishConfig": {
44
43
  "access": "public"
45
44
  },
46
45
  "types": "./index.d.ts",
47
- "gitHead": "04fed26279d04c2b02663df5872c6857eb7914bf"
46
+ "gitHead": "eb477479bf73bca940323a66e486221f00006c0f"
48
47
  }
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(host: Tree): Promise<void>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nx/devkit");
5
+ function update(host) {
6
+ var _a, _b;
7
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
+ const projects = (0, devkit_1.getProjects)(host);
9
+ for (const [name, config] of projects.entries()) {
10
+ if (((_b = (_a = config === null || config === void 0 ? void 0 : config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/node:webpack') {
11
+ config.targets.build.executor = '@nx/webpack:webpack';
12
+ config.targets.build.options.target = 'node';
13
+ config.targets.build.options.compiler = 'tsc';
14
+ (0, devkit_1.updateProjectConfiguration)(host, name, config);
15
+ }
16
+ }
17
+ yield (0, devkit_1.formatFiles)(host);
18
+ });
19
+ }
20
+ exports.default = update;
21
+ //# sourceMappingURL=update-webpack-executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-webpack-executor.js","sourceRoot":"","sources":["../../../../../../packages/node/src/migrations/update-16-0-0/update-webpack-executor.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAEpB,SAA8B,MAAM,CAAC,IAAU;;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,KAAK,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,OAAO,EAAE,EAAE;YAC/C,IAAI,CAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,oBAAoB,EAAE;gBAC7D,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,qBAAqB,CAAC;gBACtD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;gBAC7C,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC;gBAC9C,IAAA,mCAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;aAChD;SACF;QAED,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;;CACzB;AAbD,yBAaC"}
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const devkit_1 = require("@nx/devkit");
4
- const webpack_impl_1 = require("./webpack.impl");
5
- exports.default = (0, devkit_1.convertNxExecutor)(webpack_impl_1.webpackExecutor);
6
- //# sourceMappingURL=compat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/node/src/executors/webpack/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAE/C,iDAAiD;AAEjD,kBAAe,IAAA,0BAAiB,EAAC,8BAAe,CAAC,CAAC"}
@@ -1,275 +0,0 @@
1
- {
2
- "version": 2,
3
- "outputCapture": "direct-nodejs",
4
- "title": "Node Application Build Target",
5
- "description": "Node application build target options for Build Facade.",
6
- "cli": "nx",
7
- "type": "object",
8
- "properties": {
9
- "main": {
10
- "type": "string",
11
- "description": "The name of the main entry-point file.",
12
- "x-completion-type": "file",
13
- "x-completion-glob": "main@(.js|.ts)"
14
- },
15
- "tsConfig": {
16
- "type": "string",
17
- "description": "The name of the Typescript configuration file.",
18
- "x-completion-type": "file",
19
- "x-completion-glob": "tsconfig.*.json"
20
- },
21
- "outputPath": {
22
- "type": "string",
23
- "description": "The output path of the generated files.",
24
- "x-completion-type": "directory",
25
- "x-priority": "important"
26
- },
27
- "deleteOutputPath": {
28
- "type": "boolean",
29
- "description": "Delete the output path before building.",
30
- "default": true
31
- },
32
- "watch": {
33
- "type": "boolean",
34
- "description": "Run build when files change.",
35
- "default": false
36
- },
37
- "watchOptions": {
38
- "type": "object",
39
- "description": "A set of options used to customize watch mode.",
40
- "properties": {
41
- "aggregateTimeout": {
42
- "type": "integer"
43
- },
44
- "ignored": {
45
- "oneOf": [
46
- {
47
- "type": "array",
48
- "items": {
49
- "type": "string"
50
- }
51
- },
52
- {
53
- "type": "string"
54
- }
55
- ]
56
- },
57
- "poll": {
58
- "type": "integer"
59
- },
60
- "followSymlinks": {
61
- "type": "boolean"
62
- },
63
- "stdin": {
64
- "type": "boolean"
65
- }
66
- }
67
- },
68
- "poll": {
69
- "type": "number",
70
- "description": "Frequency of file watcher in ms."
71
- },
72
- "sourceMap": {
73
- "type": "boolean",
74
- "description": "Produce source maps.",
75
- "default": true
76
- },
77
- "progress": {
78
- "type": "boolean",
79
- "description": "Log progress to the console while building.",
80
- "default": false
81
- },
82
- "assets": {
83
- "type": "array",
84
- "description": "List of static application assets.",
85
- "default": [],
86
- "items": {
87
- "$ref": "#/definitions/assetPattern"
88
- }
89
- },
90
- "externalDependencies": {
91
- "oneOf": [
92
- {
93
- "type": "string",
94
- "enum": ["none", "all"]
95
- },
96
- {
97
- "type": "array",
98
- "items": {
99
- "type": "string"
100
- }
101
- }
102
- ],
103
- "description": "Dependencies to keep external to the bundle. (`all` (default), `none`, or an array of module names)",
104
- "default": "all"
105
- },
106
- "statsJson": {
107
- "type": "boolean",
108
- "description": "Generates a `stats.json` file which can be analyzed using tools such as: `webpack-bundle-analyzer` or `<https://webpack.github.io/analyse>`.",
109
- "default": false
110
- },
111
- "verbose": {
112
- "type": "boolean",
113
- "description": "Emits verbose output",
114
- "default": false
115
- },
116
- "extractLicenses": {
117
- "type": "boolean",
118
- "description": "Extract all licenses in a separate file, in the case of production builds only.",
119
- "default": false
120
- },
121
- "optimization": {
122
- "type": "boolean",
123
- "description": "Defines the optimization level of the build.",
124
- "default": false
125
- },
126
- "maxWorkers": {
127
- "type": "number",
128
- "description": "Number of workers to use for type checking. (defaults to # of CPUS)"
129
- },
130
- "memoryLimit": {
131
- "type": "number",
132
- "description": "Memory limit for type checking service process in MB. (defaults to `2048`)",
133
- "default": 2048
134
- },
135
- "fileReplacements": {
136
- "description": "Replace files with other files in the build.",
137
- "type": "array",
138
- "items": {
139
- "type": "object",
140
- "properties": {
141
- "replace": {
142
- "type": "string",
143
- "description": "The file to be replaced.",
144
- "x-completion-type": "file"
145
- },
146
- "with": {
147
- "type": "string",
148
- "description": "The file to replace with.",
149
- "x-completion-type": "file"
150
- }
151
- },
152
- "additionalProperties": false,
153
- "required": ["replace", "with"]
154
- },
155
- "default": []
156
- },
157
- "webpackConfig": {
158
- "oneOf": [
159
- {
160
- "type": "array",
161
- "items": {
162
- "type": "string",
163
- "x-completion-type": "file",
164
- "x-completion-glob": "webpack?(*)@(.js|.ts)"
165
- }
166
- },
167
- {
168
- "type": "string",
169
- "x-completion-type": "file",
170
- "x-completion-glob": "webpack?(*)@(.js|.ts)"
171
- }
172
- ],
173
- "description": "Path to a function which takes a webpack config, context and returns the resulting webpack config. See https://nx.dev/guides/customize-webpack"
174
- },
175
- "buildLibsFromSource": {
176
- "type": "boolean",
177
- "description": "Read buildable libraries from source instead of building them separately.",
178
- "default": true
179
- },
180
- "generatePackageJson": {
181
- "type": "boolean",
182
- "description": "Generates a `package.json` and pruned lock file with the project's `node_module` dependencies populated for installing in a container. If a `package.json` exists in the project's directory, it will be reused with dependencies populated.",
183
- "default": false
184
- },
185
- "transformers": {
186
- "type": "array",
187
- "description": "List of TypeScript Compiler Transfomers Plugins.",
188
- "default": [],
189
- "aliases": ["tsPlugins"],
190
- "items": {
191
- "$ref": "#/definitions/transformerPattern"
192
- }
193
- },
194
- "additionalEntryPoints": {
195
- "type": "array",
196
- "items": {
197
- "type": "object",
198
- "properties": {
199
- "entryName": {
200
- "type": "string",
201
- "description": "Name of the additional entry file."
202
- },
203
- "entryPath": {
204
- "type": "string",
205
- "description": "Path to the additional entry file.",
206
- "x-completion-type": "file",
207
- "x-completion-glob": "**/*@(.js|.ts)"
208
- }
209
- }
210
- }
211
- },
212
- "outputFileName": {
213
- "type": "string",
214
- "description": "Name of the main output file. (defaults to `main.js`)",
215
- "default": "main.js"
216
- }
217
- },
218
- "required": ["tsConfig", "main"],
219
- "definitions": {
220
- "assetPattern": {
221
- "oneOf": [
222
- {
223
- "type": "object",
224
- "properties": {
225
- "glob": {
226
- "type": "string",
227
- "description": "The pattern to match."
228
- },
229
- "input": {
230
- "type": "string",
231
- "description": "The input directory path in which to apply `glob`. Defaults to the project root."
232
- },
233
- "ignore": {
234
- "description": "An array of globs to ignore.",
235
- "type": "array",
236
- "items": {
237
- "type": "string"
238
- }
239
- },
240
- "output": {
241
- "type": "string",
242
- "description": "Absolute path within the output."
243
- }
244
- },
245
- "additionalProperties": false,
246
- "required": ["glob", "input", "output"]
247
- },
248
- {
249
- "type": "string"
250
- }
251
- ]
252
- },
253
- "transformerPattern": {
254
- "oneOf": [
255
- {
256
- "type": "string"
257
- },
258
- {
259
- "type": "object",
260
- "properties": {
261
- "name": {
262
- "type": "string"
263
- },
264
- "options": {
265
- "type": "object",
266
- "additionalProperties": true
267
- }
268
- },
269
- "additionalProperties": false,
270
- "required": ["name"]
271
- }
272
- ]
273
- }
274
- }
275
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * For backwards compat.
3
- * TODO(v16): Remove in Nx 16.
4
- */
5
- import { ExecutorContext } from '@nx/devkit';
6
- import type { WebpackExecutorOptions } from '@nx/webpack';
7
- export declare function webpackExecutor(options: WebpackExecutorOptions, context: ExecutorContext): AsyncGenerator<import("@nx/webpack").WebpackExecutorEvent, void, undefined>;
8
- export default webpackExecutor;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.webpackExecutor = void 0;
4
- const tslib_1 = require("tslib");
5
- /**
6
- * For backwards compat.
7
- * TODO(v16): Remove in Nx 16.
8
- */
9
- const devkit_1 = require("@nx/devkit");
10
- const webpack_1 = require("@nx/webpack");
11
- function webpackExecutor(options, context) {
12
- return tslib_1.__asyncGenerator(this, arguments, function* webpackExecutor_1() {
13
- devkit_1.logger.warn('"@nx/node:webpack" executor is deprecated. Use "@nx/webpack:webpack" instead in your project.json.');
14
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues((0, webpack_1.webpackExecutor)(Object.assign(Object.assign({}, options), { target: 'node', compiler: 'tsc', scripts: [], styles: [] }), context))));
15
- });
16
- }
17
- exports.webpackExecutor = webpackExecutor;
18
- exports.default = webpackExecutor;
19
- //# sourceMappingURL=webpack.impl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webpack.impl.js","sourceRoot":"","sources":["../../../../../../packages/node/src/executors/webpack/webpack.impl.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAAqD;AAErD,yCAAqE;AAErE,SAAuB,eAAe,CACpC,OAA+B,EAC/B,OAAwB;;QAExB,eAAM,CAAC,IAAI,CACT,oGAAoG,CACrG,CAAC;QACF,sBAAA,KAAK,CAAC,CAAC,yBAAA,sBAAA,IAAA,yBAAmB,kCAEnB,OAAO,KACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,KAAK,EACf,OAAO,EAAE,EAAE,EACX,MAAM,EAAE,EAAE,KAEZ,OAAO,CACR,CAAA,CAAA,CAAA,CAAC;IACJ,CAAC;CAAA;AAjBD,0CAiBC;AAED,kBAAe,eAAe,CAAC"}