@nx/web 19.0.0-beta.8 → 19.0.0-beta.9
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 +0 -24
- package/package.json +4 -4
- package/src/migrations/update-15-0-0/add-babel-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/add-babel-inputs.js +0 -9
- package/src/migrations/update-15-0-0/update-rollup-executor.d.ts +0 -2
- package/src/migrations/update-15-0-0/update-rollup-executor.js +0 -33
- package/src/migrations/update-15-5-4/update-babel-preset.d.ts +0 -2
- package/src/migrations/update-15-5-4/update-babel-preset.js +0 -32
- package/src/migrations/update-15-9-1/add-dropped-dependencies.d.ts +0 -2
- package/src/migrations/update-15-9-1/add-dropped-dependencies.js +0 -35
package/migrations.json
CHANGED
|
@@ -1,29 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
-
"add-babel-inputs": {
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"version": "15.0.0-beta.0",
|
|
6
|
-
"description": "Adds babel.config.json to the hash of all tasks",
|
|
7
|
-
"factory": "./src/migrations/update-15-0-0/add-babel-inputs"
|
|
8
|
-
},
|
|
9
|
-
"update-rollup-executor": {
|
|
10
|
-
"cli": "nx",
|
|
11
|
-
"version": "15.0.0-beta.1",
|
|
12
|
-
"description": "Update usages of rollup executors to @nrwl/rollup",
|
|
13
|
-
"factory": "./src/migrations/update-15-0-0/update-rollup-executor"
|
|
14
|
-
},
|
|
15
|
-
"update-babel-preset": {
|
|
16
|
-
"cli": "nx",
|
|
17
|
-
"version": "15.5.4-beta.0",
|
|
18
|
-
"description": "Update `@nrwl/web/babel` preset to `@nrwl/js/babel` for projects that have a .babelrc file.",
|
|
19
|
-
"factory": "./src/migrations/update-15-5-4/update-babel-preset"
|
|
20
|
-
},
|
|
21
|
-
"add-dropped-dependencies": {
|
|
22
|
-
"cli": "nx",
|
|
23
|
-
"version": "15.9.1",
|
|
24
|
-
"description": "Add @nrwl/linter, @nrwl/cypress, @nrwl/jest, @nrwl/rollup if they are used",
|
|
25
|
-
"factory": "./src/migrations/update-15-9-1/add-dropped-dependencies"
|
|
26
|
-
},
|
|
27
3
|
"update-16-0-0-add-nx-packages": {
|
|
28
4
|
"cli": "nx",
|
|
29
5
|
"version": "16.0.0-beta.1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/web",
|
|
3
|
-
"version": "19.0.0-beta.
|
|
3
|
+
"version": "19.0.0-beta.9",
|
|
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, Playwright, 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": "19.0.0-beta.
|
|
38
|
-
"@nx/js": "19.0.0-beta.
|
|
39
|
-
"@nrwl/web": "19.0.0-beta.
|
|
37
|
+
"@nx/devkit": "19.0.0-beta.9",
|
|
38
|
+
"@nx/js": "19.0.0-beta.9",
|
|
39
|
+
"@nrwl/web": "19.0.0-beta.9"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
const add_babel_inputs_1 = require("@nx/js/src/utils/add-babel-inputs");
|
|
5
|
-
async function default_1(tree) {
|
|
6
|
-
(0, add_babel_inputs_1.addBabelInputs)(tree);
|
|
7
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
8
|
-
}
|
|
9
|
-
exports.default = default_1;
|
|
@@ -1,33 +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:rollup') {
|
|
9
|
-
config.targets.build.executor = '@nrwl/rollup:rollup';
|
|
10
|
-
updated = true;
|
|
11
|
-
}
|
|
12
|
-
if (config?.targets?.build?.options?.formats?.includes('umd')) {
|
|
13
|
-
config.targets.build.options.formats =
|
|
14
|
-
config.targets.build.options.formats.reduce((acc, x) => {
|
|
15
|
-
const format = x === 'umd' ? 'cjs' : x;
|
|
16
|
-
if (format === 'cjs') {
|
|
17
|
-
if (!acc.includes('cjs'))
|
|
18
|
-
acc.push(format);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
acc.push(format);
|
|
22
|
-
}
|
|
23
|
-
return acc;
|
|
24
|
-
}, []);
|
|
25
|
-
updated = true;
|
|
26
|
-
}
|
|
27
|
-
if (updated) {
|
|
28
|
-
(0, devkit_1.updateProjectConfiguration)(host, name, config);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
await (0, devkit_1.formatFiles)(host);
|
|
32
|
-
}
|
|
33
|
-
exports.default = update;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
const versions_1 = require("../../utils/versions");
|
|
5
|
-
/* Updates @nrwl/web/babel to @nrwl/js/babel because web package is no longer necessary to use webpack/rollup + babel. */
|
|
6
|
-
async function update(tree) {
|
|
7
|
-
// Add `@nrwl/js` in case it was missing before.
|
|
8
|
-
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
9
|
-
'@nrwl/js': versions_1.nxVersion,
|
|
10
|
-
});
|
|
11
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
12
|
-
projects.forEach((config, name) => {
|
|
13
|
-
const babelrcPath = (0, devkit_1.joinPathFragments)(config.root, '.babelrc');
|
|
14
|
-
if (!tree.exists(babelrcPath))
|
|
15
|
-
return;
|
|
16
|
-
const babelrc = (0, devkit_1.readJson)(tree, babelrcPath);
|
|
17
|
-
const idx = babelrc?.presets?.findIndex((p) => typeof p === 'string'
|
|
18
|
-
? p === '@nrwl/web/babel'
|
|
19
|
-
: p[0] === '@nrwl/web/babel');
|
|
20
|
-
if (idx === -1)
|
|
21
|
-
return;
|
|
22
|
-
const preset = babelrc.presets[idx];
|
|
23
|
-
if (typeof preset === 'string') {
|
|
24
|
-
babelrc.presets.splice(idx, 1, '@nrwl/js/babel');
|
|
25
|
-
}
|
|
26
|
-
else if (Array.isArray(preset)) {
|
|
27
|
-
babelrc.presets.splice(idx, 1, ['@nrwl/js/babel', preset[1]]);
|
|
28
|
-
}
|
|
29
|
-
(0, devkit_1.writeJson)(tree, babelrcPath, babelrc);
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
exports.default = update;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const devkit_1 = require("@nx/devkit");
|
|
4
|
-
async function addDroppedDependencies(tree) {
|
|
5
|
-
const devDependencies = {};
|
|
6
|
-
const droppedDependencies = [
|
|
7
|
-
'@nrwl/linter',
|
|
8
|
-
'@nrwl/cypress',
|
|
9
|
-
'@nrwl/jest',
|
|
10
|
-
'@nrwl/rollup',
|
|
11
|
-
];
|
|
12
|
-
const projects = (0, devkit_1.getProjects)(tree);
|
|
13
|
-
for (const [_, projectConfiguration] of projects) {
|
|
14
|
-
for (const [_, targetConfiguration] of Object.entries(projectConfiguration.targets ?? {})) {
|
|
15
|
-
for (const droppedDependency of droppedDependencies) {
|
|
16
|
-
if (targetConfiguration?.['executor']?.startsWith(droppedDependency + ':')) {
|
|
17
|
-
devDependencies[droppedDependency] = devkit_1.NX_VERSION;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
23
|
-
for (const [_, targetConfiguration] of Object.entries(nxJson?.targetDefaults ?? {})) {
|
|
24
|
-
for (const droppedDependency of droppedDependencies) {
|
|
25
|
-
if (targetConfiguration?.['executor']?.startsWith(droppedDependency + ':')) {
|
|
26
|
-
devDependencies[droppedDependency] = devkit_1.NX_VERSION;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
if (Object.keys(devDependencies).length > 0) {
|
|
31
|
-
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies);
|
|
32
|
-
}
|
|
33
|
-
await (0, devkit_1.formatFiles)(tree);
|
|
34
|
-
}
|
|
35
|
-
exports.default = addDroppedDependencies;
|