@nx/workspace 17.0.0-rc.0 → 17.0.0-rc.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/workspace",
|
|
3
|
-
"version": "17.0.0-rc.
|
|
3
|
+
"version": "17.0.0-rc.2",
|
|
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": {
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@nx/devkit": "17.0.0-rc.
|
|
64
|
+
"@nx/devkit": "17.0.0-rc.2",
|
|
65
65
|
"chalk": "^4.1.0",
|
|
66
66
|
"enquirer": "~2.3.6",
|
|
67
67
|
"tslib": "^2.3.0",
|
|
68
68
|
"yargs-parser": "21.1.1",
|
|
69
|
-
"nx": "17.0.0-rc.
|
|
70
|
-
"@nrwl/workspace": "17.0.0-rc.
|
|
69
|
+
"nx": "17.0.0-rc.2",
|
|
70
|
+
"@nrwl/workspace": "17.0.0-rc.2"
|
|
71
71
|
},
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
@@ -6,6 +6,7 @@ const path = require("path");
|
|
|
6
6
|
const move_1 = require("../../generators/move/move");
|
|
7
7
|
const versions_1 = require("../../utils/versions");
|
|
8
8
|
const path_1 = require("path");
|
|
9
|
+
const get_import_path_1 = require("../../utilities/get-import-path");
|
|
9
10
|
const PROJECT_NAME = 'workspace-plugin';
|
|
10
11
|
const DESTINATION = `tools/${PROJECT_NAME}`;
|
|
11
12
|
async function default_1(tree) {
|
|
@@ -114,7 +115,7 @@ async function createNewPlugin(tree) {
|
|
|
114
115
|
require('@nx/plugin/src/generators/plugin/plugin');
|
|
115
116
|
// nx-ignore-next-line
|
|
116
117
|
const { Linter } = (0, devkit_1.ensurePackage)('@nx/eslint', versions_1.nxVersion);
|
|
117
|
-
const
|
|
118
|
+
const npmScope = (0, get_import_path_1.getNpmScope)(tree);
|
|
118
119
|
const importPath = npmScope ? `@${npmScope}/${PROJECT_NAME}` : PROJECT_NAME;
|
|
119
120
|
await pluginGenerator(tree, {
|
|
120
121
|
minimal: true,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNpmScope = exports.getImportPath = void 0;
|
|
4
|
-
const nx_json_1 = require("nx/src/generators/utils/nx-json");
|
|
5
4
|
const json_1 = require("nx/src/generators/utils/json");
|
|
6
5
|
function getImportPath(tree, projectDirectory) {
|
|
7
6
|
const npmScope = getNpmScope(tree);
|
|
@@ -11,11 +10,6 @@ function getImportPath(tree, projectDirectory) {
|
|
|
11
10
|
}
|
|
12
11
|
exports.getImportPath = getImportPath;
|
|
13
12
|
function getNpmScope(tree) {
|
|
14
|
-
const nxJson = (0, nx_json_1.readNxJson)(tree);
|
|
15
|
-
// TODO(v17): Remove reading this from nx.json
|
|
16
|
-
if (nxJson.npmScope) {
|
|
17
|
-
return nxJson.npmScope;
|
|
18
|
-
}
|
|
19
13
|
const { name } = tree.exists('package.json')
|
|
20
14
|
? (0, json_1.readJson)(tree, 'package.json')
|
|
21
15
|
: { name: null };
|