@nx/node 0.0.0-pr-29720-6055188 → 0.0.0-pr-29705-bc2a0dd
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/node",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-29705-bc2a0dd",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Node Plugin for Nx contains generators to manage Node applications within an Nx workspace.",
|
|
6
6
|
"repository": {
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"tslib": "^2.3.0",
|
|
35
|
-
"@nx/devkit": "0.0.0-pr-
|
|
36
|
-
"@nx/jest": "0.0.0-pr-
|
|
37
|
-
"@nx/js": "0.0.0-pr-
|
|
38
|
-
"@nx/eslint": "0.0.0-pr-
|
|
35
|
+
"@nx/devkit": "0.0.0-pr-29705-bc2a0dd",
|
|
36
|
+
"@nx/jest": "0.0.0-pr-29705-bc2a0dd",
|
|
37
|
+
"@nx/js": "0.0.0-pr-29705-bc2a0dd",
|
|
38
|
+
"@nx/eslint": "0.0.0-pr-29705-bc2a0dd"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -22,6 +22,11 @@ async function libraryGenerator(tree, schema) {
|
|
|
22
22
|
}
|
|
23
23
|
async function libraryGeneratorInternal(tree, schema) {
|
|
24
24
|
const options = await normalizeOptions(tree, schema);
|
|
25
|
+
// If we are using the new TS solution
|
|
26
|
+
// We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
|
|
27
|
+
if (options.isUsingTsSolutionConfig) {
|
|
28
|
+
(0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(tree, options.projectRoot);
|
|
29
|
+
}
|
|
25
30
|
const tasks = [];
|
|
26
31
|
if (options.publishable === true && !schema.importPath) {
|
|
27
32
|
throw new Error(`For publishable libs you have to provide a proper "--importPath" which needs to be a valid npm package name (e.g. my-awesome-lib or @myorg/my-lib)`);
|
|
@@ -62,11 +67,6 @@ async function libraryGeneratorInternal(tree, schema) {
|
|
|
62
67
|
if (options.isUsingTsSolutionConfig) {
|
|
63
68
|
tasks.push(() => (0, devkit_1.installPackagesTask)(tree, true));
|
|
64
69
|
}
|
|
65
|
-
// If we are using the new TS solution
|
|
66
|
-
// We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
|
|
67
|
-
if (options.isUsingTsSolutionConfig) {
|
|
68
|
-
(0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(tree, options.projectRoot);
|
|
69
|
-
}
|
|
70
70
|
(0, sort_fields_1.sortPackageJsonFields)(tree, options.projectRoot);
|
|
71
71
|
if (!schema.skipFormat) {
|
|
72
72
|
await (0, devkit_1.formatFiles)(tree);
|
|
@@ -92,14 +92,17 @@ async function normalizeOptions(tree, options) {
|
|
|
92
92
|
const parsedTags = options.tags
|
|
93
93
|
? options.tags.split(',').map((s) => s.trim())
|
|
94
94
|
: [];
|
|
95
|
+
const isUsingTsSolutionConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
|
|
95
96
|
return {
|
|
96
97
|
...options,
|
|
97
98
|
fileName,
|
|
98
|
-
projectName
|
|
99
|
+
projectName: isUsingTsSolutionConfig
|
|
100
|
+
? (0, get_import_path_1.getImportPath)(tree, projectName)
|
|
101
|
+
: projectName,
|
|
99
102
|
projectRoot,
|
|
100
103
|
parsedTags,
|
|
101
104
|
importPath,
|
|
102
|
-
isUsingTsSolutionConfig
|
|
105
|
+
isUsingTsSolutionConfig,
|
|
103
106
|
};
|
|
104
107
|
}
|
|
105
108
|
function createFiles(tree, options) {
|