@nrwl/workspace 15.4.1 → 15.4.3-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/CHANGELOG.md +1 -1
- package/package.json +29 -29
- package/src/generators/remove/lib/check-targets.d.ts +1 -1
- package/src/generators/remove/lib/check-targets.js +33 -29
- package/src/generators/remove/lib/check-targets.js.map +1 -1
- package/src/generators/remove/remove.js +1 -1
- package/src/generators/remove/remove.js.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,6 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
-
## [15.4.1](https://github.com/nrwl/nx/compare/15.4.
|
6
|
+
## [15.4.3-beta.1](https://github.com/nrwl/nx/compare/15.4.2...15.4.3-beta.1) (2022-12-30)
|
7
7
|
|
8
8
|
**Note:** Version bump only for package @nrwl/workspace
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nrwl/workspace",
|
3
|
-
"version": "15.4.1",
|
3
|
+
"version": "15.4.3-beta.1",
|
4
4
|
"private": false,
|
5
5
|
"description": "The Workspace plugin contains executors and generators that are useful for any Nx workspace. It should be present in every Nx workspace and other plugins build on it.",
|
6
6
|
"repository": {
|
@@ -33,31 +33,31 @@
|
|
33
33
|
"requirements": {},
|
34
34
|
"migrations": "./migrations.json",
|
35
35
|
"packageGroup": {
|
36
|
-
"@nrwl/angular": "15.4.1",
|
37
|
-
"@nrwl/cli": "15.4.1",
|
38
|
-
"@nrwl/cypress": "15.4.1",
|
39
|
-
"@nrwl/detox": "15.4.1",
|
40
|
-
"@nrwl/devkit": "15.4.1",
|
41
|
-
"@nrwl/esbuild": "15.4.1",
|
42
|
-
"@nrwl/eslint-plugin-nx": "15.4.1",
|
43
|
-
"@nrwl/expo": "15.4.1",
|
44
|
-
"@nrwl/express": "15.4.1",
|
45
|
-
"@nrwl/jest": "15.4.1",
|
46
|
-
"@nrwl/js": "15.4.1",
|
47
|
-
"@nrwl/linter": "15.4.1",
|
48
|
-
"@nrwl/nest": "15.4.1",
|
49
|
-
"@nrwl/next": "15.4.1",
|
50
|
-
"@nrwl/node": "15.4.1",
|
36
|
+
"@nrwl/angular": "15.4.3-beta.1",
|
37
|
+
"@nrwl/cli": "15.4.3-beta.1",
|
38
|
+
"@nrwl/cypress": "15.4.3-beta.1",
|
39
|
+
"@nrwl/detox": "15.4.3-beta.1",
|
40
|
+
"@nrwl/devkit": "15.4.3-beta.1",
|
41
|
+
"@nrwl/esbuild": "15.4.3-beta.1",
|
42
|
+
"@nrwl/eslint-plugin-nx": "15.4.3-beta.1",
|
43
|
+
"@nrwl/expo": "15.4.3-beta.1",
|
44
|
+
"@nrwl/express": "15.4.3-beta.1",
|
45
|
+
"@nrwl/jest": "15.4.3-beta.1",
|
46
|
+
"@nrwl/js": "15.4.3-beta.1",
|
47
|
+
"@nrwl/linter": "15.4.3-beta.1",
|
48
|
+
"@nrwl/nest": "15.4.3-beta.1",
|
49
|
+
"@nrwl/next": "15.4.3-beta.1",
|
50
|
+
"@nrwl/node": "15.4.3-beta.1",
|
51
51
|
"@nrwl/nx-cloud": "latest",
|
52
|
-
"@nrwl/nx-plugin": "15.4.1",
|
53
|
-
"@nrwl/react": "15.4.1",
|
54
|
-
"@nrwl/react-native": "15.4.1",
|
55
|
-
"@nrwl/rollup": "15.4.1",
|
56
|
-
"@nrwl/storybook": "15.4.1",
|
57
|
-
"@nrwl/tao": "15.4.1",
|
58
|
-
"@nrwl/web": "15.4.1",
|
59
|
-
"@nrwl/webpack": "15.4.1",
|
60
|
-
"nx": "15.4.1"
|
52
|
+
"@nrwl/nx-plugin": "15.4.3-beta.1",
|
53
|
+
"@nrwl/react": "15.4.3-beta.1",
|
54
|
+
"@nrwl/react-native": "15.4.3-beta.1",
|
55
|
+
"@nrwl/rollup": "15.4.3-beta.1",
|
56
|
+
"@nrwl/storybook": "15.4.3-beta.1",
|
57
|
+
"@nrwl/tao": "15.4.3-beta.1",
|
58
|
+
"@nrwl/web": "15.4.3-beta.1",
|
59
|
+
"@nrwl/webpack": "15.4.3-beta.1",
|
60
|
+
"nx": "15.4.3-beta.1"
|
61
61
|
}
|
62
62
|
},
|
63
63
|
"peerDependencies": {
|
@@ -69,8 +69,8 @@
|
|
69
69
|
}
|
70
70
|
},
|
71
71
|
"dependencies": {
|
72
|
-
"@nrwl/devkit": "15.4.1",
|
73
|
-
"@nrwl/linter": "15.4.1",
|
72
|
+
"@nrwl/devkit": "15.4.3-beta.1",
|
73
|
+
"@nrwl/linter": "15.4.3-beta.1",
|
74
74
|
"@parcel/watcher": "2.0.4",
|
75
75
|
"chalk": "4.1.0",
|
76
76
|
"chokidar": "^3.5.1",
|
@@ -86,7 +86,7 @@
|
|
86
86
|
"jsonc-parser": "3.2.0",
|
87
87
|
"minimatch": "3.0.5",
|
88
88
|
"npm-run-path": "^4.0.1",
|
89
|
-
"nx": "15.4.1",
|
89
|
+
"nx": "15.4.3-beta.1",
|
90
90
|
"open": "^8.4.0",
|
91
91
|
"rxjs": "^6.5.4",
|
92
92
|
"semver": "7.3.4",
|
@@ -99,5 +99,5 @@
|
|
99
99
|
"access": "public"
|
100
100
|
},
|
101
101
|
"types": "./index.d.ts",
|
102
|
-
"gitHead": "
|
102
|
+
"gitHead": "c783ac5e9a001b95c58ad88dbd5cecd6a610078a"
|
103
103
|
}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.checkTargets = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
4
5
|
const devkit_1 = require("@nrwl/devkit");
|
5
6
|
/**
|
6
7
|
* Check whether the project to be removed has builders targetted by another project
|
@@ -10,41 +11,44 @@ const devkit_1 = require("@nrwl/devkit");
|
|
10
11
|
* @param schema The options provided to the schematic
|
11
12
|
*/
|
12
13
|
function checkTargets(tree, schema) {
|
13
|
-
|
14
|
-
|
15
|
-
}
|
16
|
-
const errors = [];
|
17
|
-
(0, devkit_1.getProjects)(tree).forEach((projectConfig, projectName) => {
|
18
|
-
if (projectName === schema.projectName) {
|
14
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
15
|
+
if (schema.forceRemove) {
|
19
16
|
return;
|
20
17
|
}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
18
|
+
const graph = yield (0, devkit_1.createProjectGraphAsync)();
|
19
|
+
const errors = [];
|
20
|
+
(0, devkit_1.getProjects)(tree).forEach((projectConfig, projectName) => {
|
21
|
+
if (projectName === schema.projectName) {
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
Object.entries(projectConfig.targets || {}).forEach(([, targetConfig]) => {
|
25
|
+
checkIfProjectIsUsed(targetConfig, (value) => {
|
26
|
+
try {
|
27
|
+
const { project } = (0, devkit_1.parseTargetString)(value, graph);
|
28
|
+
if (project === schema.projectName) {
|
29
|
+
errors.push(`"${value}" is used by "${projectName}"`);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
catch (err) {
|
33
|
+
/**
|
34
|
+
* It threw because the target string was not
|
35
|
+
* in the format of project:target:configuration
|
36
|
+
*
|
37
|
+
* In that case, we don't care about it.
|
38
|
+
* So we can ignore this error.
|
39
|
+
*/
|
27
40
|
}
|
28
|
-
}
|
29
|
-
catch (err) {
|
30
|
-
/**
|
31
|
-
* It threw because the target string was not
|
32
|
-
* in the format of project:target:configuration
|
33
|
-
*
|
34
|
-
* In that case, we don't care about it.
|
35
|
-
* So we can ignore this error.
|
36
|
-
*/
|
37
|
-
}
|
41
|
+
});
|
38
42
|
});
|
39
43
|
});
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
44
|
+
if (errors.length > 0) {
|
45
|
+
let message = `${schema.projectName} is still targeted by some projects:\n\n`;
|
46
|
+
for (let error of errors) {
|
47
|
+
message += `${error}\n`;
|
48
|
+
}
|
49
|
+
throw new Error(message);
|
45
50
|
}
|
46
|
-
|
47
|
-
}
|
51
|
+
});
|
48
52
|
}
|
49
53
|
exports.checkTargets = checkTargets;
|
50
54
|
function checkIfProjectIsUsed(config, callback) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"check-targets.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/remove/lib/check-targets.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"check-targets.js","sourceRoot":"","sources":["../../../../../../../packages/workspace/src/generators/remove/lib/check-targets.ts"],"names":[],"mappings":";;;;AAAA,yCAMsB;AAGtB;;;;;;GAMG;AACH,SAAsB,YAAY,CAAC,IAAU,EAAE,MAAc;;QAC3D,IAAI,MAAM,CAAC,WAAW,EAAE;YACtB,OAAO;SACR;QAED,MAAM,KAAK,GAAG,MAAM,IAAA,gCAAuB,GAAE,CAAC;QAC9C,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,WAAW,EAAE,EAAE;YACvD,IAAI,WAAW,KAAK,MAAM,CAAC,WAAW,EAAE;gBACtC,OAAO;aACR;YACD,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,EAAE;gBACvE,oBAAoB,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE;oBAC3C,IAAI;wBACF,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,0BAAiB,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;wBACpD,IAAI,OAAO,KAAK,MAAM,CAAC,WAAW,EAAE;4BAClC,MAAM,CAAC,IAAI,CAAC,IAAI,KAAK,iBAAiB,WAAW,GAAG,CAAC,CAAC;yBACvD;qBACF;oBAAC,OAAO,GAAG,EAAE;wBACZ;;;;;;2BAMG;qB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removeGenerator(tree, schema) {
|
|
13
13
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
14
14
|
const project = (0, devkit_1.readProjectConfiguration)(tree, schema.projectName);
|
15
15
|
yield (0, check_dependencies_1.checkDependencies)(tree, schema);
|
16
|
-
(0, check_targets_1.checkTargets)(tree, schema);
|
16
|
+
yield (0, check_targets_1.checkTargets)(tree, schema);
|
17
17
|
(0, update_jest_config_1.updateJestConfig)(tree, schema, project);
|
18
18
|
(0, remove_project_config_1.removeProjectConfig)(tree, schema);
|
19
19
|
(0, remove_project_1.removeProject)(tree, project);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../../../packages/workspace/src/generators/remove/remove.ts"],"names":[],"mappings":";;;;AAAA,yCAOsB;AAEtB,iEAA6D;AAC7D,uDAAmD;AACnD,yDAAqD;AACrD,2DAAuD;AACvD,uEAAkE;AAElE,iEAA4D;AAE5D,SAAsB,eAAe,CAAC,IAAU,EAAE,MAAc;;QAC9D,MAAM,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QACnE,MAAM,IAAA,sCAAiB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACtC,IAAA,4BAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../../../../../packages/workspace/src/generators/remove/remove.ts"],"names":[],"mappings":";;;;AAAA,yCAOsB;AAEtB,iEAA6D;AAC7D,uDAAmD;AACnD,yDAAqD;AACrD,2DAAuD;AACvD,uEAAkE;AAElE,iEAA4D;AAE5D,SAAsB,eAAe,CAAC,IAAU,EAAE,MAAc;;QAC9D,MAAM,OAAO,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QACnE,MAAM,IAAA,sCAAiB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACtC,MAAM,IAAA,4BAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACjC,IAAA,qCAAgB,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACxC,IAAA,2CAAmB,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAClC,IAAA,8BAAa,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7B,MAAM,IAAA,gCAAc,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACtB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;IACH,CAAC;CAAA;AAXD,0CAWC;AAED,kBAAe,eAAe,CAAC;AAElB,QAAA,eAAe,GAAG,IAAA,2BAAkB,EAAC,eAAe,CAAC,CAAC"}
|