@nx/rollup 20.0.0-beta.5 → 20.0.0-beta.6
Sign up to get free protection for your applications and to get access to all the features.
- package/migrations.json +1 -20
- package/package.json +4 -4
- package/src/plugins/analyze.js +2 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +0 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +0 -9
- package/src/migrations/update-16-3-3-add-babel-upward-root-mode-flag/update-16-3-3-add-babel-upward-root-mode-flag.d.ts +0 -2
- package/src/migrations/update-16-3-3-add-babel-upward-root-mode-flag/update-16-3-3-add-babel-upward-root-mode-flag.js +0 -17
- package/src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps.d.ts +0 -2
- package/src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps.js +0 -29
package/migrations.json
CHANGED
@@ -1,24 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"generators": {
|
3
|
-
"update-16-0-0-add-nx-packages": {
|
4
|
-
"cli": "nx",
|
5
|
-
"version": "16.0.0-beta.1",
|
6
|
-
"description": "Replace @nrwl/rollup with @nx/rollup",
|
7
|
-
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
|
8
|
-
},
|
9
|
-
"update-16-3-3-add-babel-upward-root-mode-flag": {
|
10
|
-
"cli": "nx",
|
11
|
-
"version": "16.3.3-beta.0",
|
12
|
-
"description": "Add babelUpwardRootMode if not already defined",
|
13
|
-
"implementation": "./src/migrations/update-16-3-3-add-babel-upward-root-mode-flag/update-16-3-3-add-babel-upward-root-mode-flag"
|
14
|
-
},
|
15
|
-
"explicitly-set-projects-to-update-buildable-deps": {
|
16
|
-
"cli": "nx",
|
17
|
-
"version": "16.6.0-beta.0",
|
18
|
-
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
|
19
|
-
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps"
|
20
|
-
}
|
21
|
-
},
|
2
|
+
"generators": {},
|
22
3
|
"packageJsonUpdates": {
|
23
4
|
"18.2.0": {
|
24
5
|
"version": "18.2.0-beta.1",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/rollup",
|
3
|
-
"version": "20.0.0-beta.
|
3
|
+
"version": "20.0.0-beta.6",
|
4
4
|
"private": false,
|
5
5
|
"description": "The Nx Plugin for Rollup contains executors and generators that support building applications using Rollup.",
|
6
6
|
"repository": {
|
@@ -35,16 +35,16 @@
|
|
35
35
|
"@rollup/plugin-json": "^6.1.0",
|
36
36
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
37
37
|
"autoprefixer": "^10.4.9",
|
38
|
-
"chalk": "^4.1.0",
|
39
38
|
"minimatch": "9.0.3",
|
39
|
+
"picocolors": "^1.1.0",
|
40
40
|
"postcss": "^8.4.38",
|
41
41
|
"rollup": "^4.14.0",
|
42
42
|
"rollup-plugin-copy": "^3.5.0",
|
43
43
|
"rollup-plugin-postcss": "^4.0.2",
|
44
44
|
"rollup-plugin-typescript2": "^0.36.0",
|
45
45
|
"tslib": "^2.3.0",
|
46
|
-
"@nx/devkit": "20.0.0-beta.
|
47
|
-
"@nx/js": "20.0.0-beta.
|
46
|
+
"@nx/devkit": "20.0.0-beta.6",
|
47
|
+
"@nx/js": "20.0.0-beta.6"
|
48
48
|
},
|
49
49
|
"publishConfig": {
|
50
50
|
"access": "public"
|
package/src/plugins/analyze.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.analyze = analyze;
|
4
|
-
const
|
4
|
+
const pc = require("picocolors");
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
6
6
|
const formatBytes = (bytes) => {
|
7
7
|
if (bytes === 0)
|
@@ -18,7 +18,7 @@ function analyze() {
|
|
18
18
|
renderChunk(source, chunk) {
|
19
19
|
const sourceBytes = formatBytes(source.length);
|
20
20
|
const fileName = chunk.fileName;
|
21
|
-
devkit_1.logger.info(` ${
|
21
|
+
devkit_1.logger.info(` ${pc.bold(fileName)} ${pc.cyan(sourceBytes)}`);
|
22
22
|
},
|
23
23
|
};
|
24
24
|
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.default = replacePackage;
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
5
|
-
const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
|
6
|
-
async function replacePackage(tree) {
|
7
|
-
await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/rollup', '@nx/rollup');
|
8
|
-
await (0, devkit_1.formatFiles)(tree);
|
9
|
-
}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.default = default_1;
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
5
|
-
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
6
|
-
async function default_1(tree) {
|
7
|
-
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/rollup:rollup', (options, projectName, targetName, _configurationName) => {
|
8
|
-
if (options.babelUpwardRootMode !== undefined) {
|
9
|
-
return;
|
10
|
-
}
|
11
|
-
const projectConfiguration = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
12
|
-
projectConfiguration.targets[targetName].options.babelUpwardRootMode =
|
13
|
-
true;
|
14
|
-
(0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfiguration);
|
15
|
-
});
|
16
|
-
await (0, devkit_1.formatFiles)(tree);
|
17
|
-
}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.default = default_1;
|
4
|
-
const devkit_1 = require("@nx/devkit");
|
5
|
-
const executors = new Set(['@nx/rollup:rollup', '@nrwl/rollup:rollup']);
|
6
|
-
async function default_1(tree) {
|
7
|
-
// use project graph to get the expanded target configurations
|
8
|
-
const projectGraph = await (0, devkit_1.createProjectGraphAsync)();
|
9
|
-
for (const [projectName, { data: projectData }] of Object.entries(projectGraph.nodes)) {
|
10
|
-
if (projectData.projectType !== 'library') {
|
11
|
-
continue;
|
12
|
-
}
|
13
|
-
for (const [targetName, target] of Object.entries(projectData.targets || {})) {
|
14
|
-
if (!executors.has(target.executor)) {
|
15
|
-
continue;
|
16
|
-
}
|
17
|
-
if (!target.options ||
|
18
|
-
target.options.updateBuildableProjectDepsInPackageJson === undefined) {
|
19
|
-
// read the project configuration to write the explicit project configuration
|
20
|
-
// and avoid writing the expanded target configuration
|
21
|
-
const project = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
22
|
-
project.targets[targetName].options ??= {};
|
23
|
-
project.targets[targetName].options.updateBuildableProjectDepsInPackageJson = true;
|
24
|
-
(0, devkit_1.updateProjectConfiguration)(tree, projectName, project);
|
25
|
-
}
|
26
|
-
}
|
27
|
-
}
|
28
|
-
await (0, devkit_1.formatFiles)(tree);
|
29
|
-
}
|