@nx/web 16.10.0 → 17.0.0-beta.1
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/migrations.json +1 -56
- package/package.json +4 -4
- package/src/migrations/update-13-0-0/remove-deprecated-options-13-0-0.d.ts +0 -2
- package/src/migrations/update-13-0-0/remove-deprecated-options-13-0-0.js +0 -29
- package/src/migrations/update-13-0-0/remove-node-sass-13-0-0.d.ts +0 -6
- package/src/migrations/update-13-0-0/remove-node-sass-13-0-0.js +0 -21
- package/src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0.d.ts +0 -2
- package/src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0.js +0 -28
- package/src/migrations/update-13-3-0/rename-build-to-webpack.d.ts +0 -2
- package/src/migrations/update-13-3-0/rename-build-to-webpack.js +0 -14
- package/src/migrations/update-13-3-0/rename-package-to-rollup.d.ts +0 -2
- package/src/migrations/update-13-3-0/rename-package-to-rollup.js +0 -14
- package/src/migrations/update-13-8-0/add-postcss-config-option.d.ts +0 -2
- package/src/migrations/update-13-8-0/add-postcss-config-option.js +0 -21
- package/src/migrations/update-14-1-7/rollup-format-backwards-compatibility.d.ts +0 -2
- package/src/migrations/update-14-1-7/rollup-format-backwards-compatibility.js +0 -21
- package/src/migrations/update-14-7-6/update-webpack-executor.d.ts +0 -2
- package/src/migrations/update-14-7-6/update-webpack-executor.js +0 -22
package/migrations.json
CHANGED
|
@@ -1,41 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
-
"remove-node-sass-13-0-0": {
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"version": "13.0.0-beta.1",
|
|
6
|
-
"description": "Removes deprecated node-sass package (sass is already a dependency of @nrwl/web).",
|
|
7
|
-
"factory": "./src/migrations/update-13-0-0/remove-node-sass-13-0-0"
|
|
8
|
-
},
|
|
9
|
-
"remove-webpack-5-packages": {
|
|
10
|
-
"cli": "nx",
|
|
11
|
-
"version": "13.0.0-beta.1",
|
|
12
|
-
"description": "Remove packages installed by Nx 12's `@nrwl/web:webpack5` generator.",
|
|
13
|
-
"factory": "./src/migrations/update-13-0-0/remove-webpack-5-packages-13-0-0"
|
|
14
|
-
},
|
|
15
|
-
"rename-build-to-webpack": {
|
|
16
|
-
"cli": "nx",
|
|
17
|
-
"version": "13.3.0-beta.1",
|
|
18
|
-
"description": "Rename the 'build' executor to 'webpack'",
|
|
19
|
-
"factory": "./src/migrations/update-13-3-0/rename-build-to-webpack"
|
|
20
|
-
},
|
|
21
|
-
"rename-package-to-rollup": {
|
|
22
|
-
"cli": "nx",
|
|
23
|
-
"version": "13.3.0-beta.1",
|
|
24
|
-
"description": "Rename the 'package' executor to 'rollup'",
|
|
25
|
-
"factory": "./src/migrations/update-13-3-0/rename-package-to-rollup"
|
|
26
|
-
},
|
|
27
|
-
"add-postcss-config-option": {
|
|
28
|
-
"cli": "nx",
|
|
29
|
-
"version": "13.8.0-beta.1",
|
|
30
|
-
"description": "Add a postcss config option to apps to load a single config file for all libs",
|
|
31
|
-
"factory": "./src/migrations/update-13-8-0/add-postcss-config-option"
|
|
32
|
-
},
|
|
33
|
-
"update-webpack-executor": {
|
|
34
|
-
"cli": "nx",
|
|
35
|
-
"version": "14.7.6-beta.1",
|
|
36
|
-
"description": "Update usages of webpack executors to @nrwl/webpack",
|
|
37
|
-
"factory": "./src/migrations/update-14-7-6/update-webpack-executor"
|
|
38
|
-
},
|
|
39
3
|
"add-babel-inputs": {
|
|
40
4
|
"cli": "nx",
|
|
41
5
|
"version": "15.0.0-beta.0",
|
|
@@ -73,24 +37,5 @@
|
|
|
73
37
|
"implementation": "./src/migrations/update-16-0-0-update-executors/update-16-0-0-update-executors"
|
|
74
38
|
}
|
|
75
39
|
},
|
|
76
|
-
"packageJsonUpdates": {
|
|
77
|
-
"14.3.7": {
|
|
78
|
-
"version": "14.3.7-beta.0",
|
|
79
|
-
"packages": {
|
|
80
|
-
"@types/node": {
|
|
81
|
-
"version": "18.0.0",
|
|
82
|
-
"alwaysAddToPackageJson": false
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"14.5.5": {
|
|
87
|
-
"version": "14.5.5-beta.0",
|
|
88
|
-
"packages": {
|
|
89
|
-
"@types/node": {
|
|
90
|
-
"version": "18.7.1",
|
|
91
|
-
"alwaysAddToPackageJson": false
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
40
|
+
"packageJsonUpdates": {}
|
|
96
41
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/web",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"detect-port": "^1.5.1",
|
|
35
35
|
"http-server": "^14.1.0",
|
|
36
36
|
"tslib": "^2.3.0",
|
|
37
|
-
"@nx/devkit": "
|
|
38
|
-
"@nx/js": "
|
|
39
|
-
"@nrwl/web": "
|
|
37
|
+
"@nx/devkit": "17.0.0-beta.1",
|
|
38
|
+
"@nx/js": "17.0.0-beta.1",
|
|
39
|
+
"@nrwl/web": "17.0.0-beta.1"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
const deprecatedOptions = ['showCircularDependencies', 'budgets'];
|
|
5
|
-
async function update(host) {
|
|
6
|
-
const projects = (0, devkit_1.getProjects)(host);
|
|
7
|
-
for (const [name, config] of projects.entries()) {
|
|
8
|
-
if (config.targets.build.executor !== '@nrwl/web:build')
|
|
9
|
-
return;
|
|
10
|
-
for (const opt of deprecatedOptions) {
|
|
11
|
-
let updated = false;
|
|
12
|
-
if (typeof config.targets.build?.configurations?.production?.[opt] !==
|
|
13
|
-
'undefined') {
|
|
14
|
-
delete config.targets.build.configurations.production[opt];
|
|
15
|
-
updated = true;
|
|
16
|
-
}
|
|
17
|
-
if (typeof config.targets.build.options[opt] !== 'undefined') {
|
|
18
|
-
delete config.targets.build.options[opt];
|
|
19
|
-
updated = true;
|
|
20
|
-
}
|
|
21
|
-
if (updated) {
|
|
22
|
-
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
23
|
-
devkit_1.logger.info(`NX Removed legacy build option from "${name}": ${opt}`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
await (0, devkit_1.formatFiles)(host);
|
|
28
|
-
}
|
|
29
|
-
exports.default = update;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
|
-
/**
|
|
3
|
-
* For web/react apps with style scss option, remove node-sass sine it is deprecated.
|
|
4
|
-
* We already include sass package in `@nrwl/web` deps so no need to install anything extra.
|
|
5
|
-
*/
|
|
6
|
-
export default function update(tree: Tree): Promise<GeneratorCallback>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
/**
|
|
5
|
-
* For web/react apps with style scss option, remove node-sass sine it is deprecated.
|
|
6
|
-
* We already include sass package in `@nrwl/web` deps so no need to install anything extra.
|
|
7
|
-
*/
|
|
8
|
-
async function update(tree) {
|
|
9
|
-
const packageJson = (0, devkit_1.readJson)(tree, 'package.json');
|
|
10
|
-
let task = undefined;
|
|
11
|
-
if (packageJson.devDependencies['node-sass']) {
|
|
12
|
-
task = (0, devkit_1.removeDependenciesFromPackageJson)(tree, [], ['node-sass']);
|
|
13
|
-
}
|
|
14
|
-
if (packageJson.dependencies['node-sass']) {
|
|
15
|
-
task = (0, devkit_1.removeDependenciesFromPackageJson)(tree, ['node-sass'], []);
|
|
16
|
-
}
|
|
17
|
-
if (task)
|
|
18
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
19
|
-
return task;
|
|
20
|
-
}
|
|
21
|
-
exports.default = update;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
const packages = [
|
|
5
|
-
'webpack',
|
|
6
|
-
'copy-webpack-plugin',
|
|
7
|
-
'webpack-merge',
|
|
8
|
-
'webpack-node-externals',
|
|
9
|
-
'mini-css-extract-plugin',
|
|
10
|
-
'source-map-loader',
|
|
11
|
-
'terser-webpack-plugin',
|
|
12
|
-
'webpack-dev-server',
|
|
13
|
-
'webpack-sources',
|
|
14
|
-
'react-refresh',
|
|
15
|
-
'@pmmmwh/react-refresh-webpack-plugin',
|
|
16
|
-
];
|
|
17
|
-
async function update(tree) {
|
|
18
|
-
const packageJson = (0, devkit_1.readJson)(tree, 'package.json');
|
|
19
|
-
let task = undefined;
|
|
20
|
-
// Undo the install by `nx g @nrwl/web:webpack5` in Nx 12.
|
|
21
|
-
if (packageJson.devDependencies['webpack']?.match(/^([\^~])?5\./) &&
|
|
22
|
-
packages.every((p) => packageJson.devDependencies[p])) {
|
|
23
|
-
task = (0, devkit_1.removeDependenciesFromPackageJson)(tree, [], packages);
|
|
24
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
25
|
-
}
|
|
26
|
-
return task;
|
|
27
|
-
}
|
|
28
|
-
exports.default = update;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
async function update(host) {
|
|
5
|
-
const projects = (0, devkit_1.getProjects)(host);
|
|
6
|
-
for (const [name, config] of projects.entries()) {
|
|
7
|
-
if (config?.targets?.build?.executor !== '@nrwl/web:build')
|
|
8
|
-
continue;
|
|
9
|
-
config.targets.build.executor = '@nrwl/web:webpack';
|
|
10
|
-
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
11
|
-
}
|
|
12
|
-
await (0, devkit_1.formatFiles)(host);
|
|
13
|
-
}
|
|
14
|
-
exports.default = update;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
async function update(host) {
|
|
5
|
-
const projects = (0, devkit_1.getProjects)(host);
|
|
6
|
-
for (const [name, config] of projects.entries()) {
|
|
7
|
-
if (config?.targets?.build?.executor !== '@nrwl/web:package')
|
|
8
|
-
continue;
|
|
9
|
-
config.targets.build.executor = '@nrwl/web:rollup';
|
|
10
|
-
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
11
|
-
}
|
|
12
|
-
await (0, devkit_1.formatFiles)(host);
|
|
13
|
-
}
|
|
14
|
-
exports.default = update;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
/*
|
|
5
|
-
* This migration ensures that the previous behavior of applying the app postcss config
|
|
6
|
-
* is carried over to Nx 13.8.0.
|
|
7
|
-
*/
|
|
8
|
-
async function update(host) {
|
|
9
|
-
const projects = (0, devkit_1.getProjects)(host);
|
|
10
|
-
for (const [name, config] of projects.entries()) {
|
|
11
|
-
if (config?.targets?.build?.executor !== '@nrwl/web:webpack')
|
|
12
|
-
continue;
|
|
13
|
-
const configPath = `${config.root}/postcss.config.js`;
|
|
14
|
-
if (host.exists(configPath)) {
|
|
15
|
-
config.targets.build.options.postcssConfig = configPath;
|
|
16
|
-
}
|
|
17
|
-
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
18
|
-
}
|
|
19
|
-
await (0, devkit_1.formatFiles)(host);
|
|
20
|
-
}
|
|
21
|
-
exports.default = update;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
/*
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
async function update(tree) {
|
|
8
|
-
for (const [name, config] of (0, devkit_1.getProjects)(tree)) {
|
|
9
|
-
if (config.targets?.build?.executor !== '@nrwl/web:rollup')
|
|
10
|
-
continue;
|
|
11
|
-
if (Array.isArray(config.targets.build.options?.format))
|
|
12
|
-
continue;
|
|
13
|
-
config.targets.build.options = {
|
|
14
|
-
...config.targets.build.options,
|
|
15
|
-
format: ['esm', 'cjs'],
|
|
16
|
-
};
|
|
17
|
-
(0, devkit_1.updateProjectConfiguration)(tree, name, config);
|
|
18
|
-
}
|
|
19
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
20
|
-
}
|
|
21
|
-
exports.default = update;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
async function update(host) {
|
|
5
|
-
const projects = (0, devkit_1.getProjects)(host);
|
|
6
|
-
for (const [name, config] of projects.entries()) {
|
|
7
|
-
let updated = false;
|
|
8
|
-
if (config?.targets?.build?.executor === '@nrwl/web:webpack') {
|
|
9
|
-
config.targets.build.executor = '@nrwl/webpack:webpack';
|
|
10
|
-
updated = true;
|
|
11
|
-
}
|
|
12
|
-
if (config?.targets?.serve?.executor === '@nrwl/web:dev-server') {
|
|
13
|
-
config.targets.serve.executor = '@nrwl/webpack:dev-server';
|
|
14
|
-
updated = true;
|
|
15
|
-
}
|
|
16
|
-
if (updated) {
|
|
17
|
-
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
await (0, devkit_1.formatFiles)(host);
|
|
21
|
-
}
|
|
22
|
-
exports.default = update;
|