@nx/plugin 0.0.0-pr-29705-bc2a0dd → 0.0.0-pr-29408-73bb882
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/plugin",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-29408-73bb882",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.",
|
|
6
6
|
"repository": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"tslib": "^2.3.0",
|
|
31
|
-
"@nx/devkit": "0.0.0-pr-
|
|
32
|
-
"@nx/jest": "0.0.0-pr-
|
|
33
|
-
"@nx/js": "0.0.0-pr-
|
|
34
|
-
"@nx/eslint": "0.0.0-pr-
|
|
31
|
+
"@nx/devkit": "0.0.0-pr-29408-73bb882",
|
|
32
|
+
"@nx/jest": "0.0.0-pr-29408-73bb882",
|
|
33
|
+
"@nx/js": "0.0.0-pr-29408-73bb882",
|
|
34
|
+
"@nx/eslint": "0.0.0-pr-29408-73bb882"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
@@ -88,6 +88,7 @@ async function addJest(host, options) {
|
|
|
88
88
|
skipSerializers: true,
|
|
89
89
|
skipFormat: true,
|
|
90
90
|
addPlugin: options.addPlugin,
|
|
91
|
+
compiler: options.isTsSolutionSetup ? 'swc' : undefined,
|
|
91
92
|
});
|
|
92
93
|
const { startLocalRegistryPath, stopLocalRegistryPath } = (0, add_local_registry_scripts_1.addLocalRegistryScripts)(host);
|
|
93
94
|
(0, jest_1.addPropertyToJestConfig)(host, (0, path_1.join)(options.projectRoot, 'jest.config.ts'), 'globalSetup', (0, path_1.join)((0, devkit_1.offsetFromRoot)(options.projectRoot), startLocalRegistryPath));
|
|
@@ -109,7 +109,7 @@ async function normalizeOptions(tree, options) {
|
|
|
109
109
|
propertyName,
|
|
110
110
|
description,
|
|
111
111
|
projectRoot,
|
|
112
|
-
projectSourceRoot,
|
|
112
|
+
projectSourceRoot: projectSourceRoot ?? (0, path_1.join)(projectRoot, 'src'),
|
|
113
113
|
isTsSolutionSetup: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree),
|
|
114
114
|
};
|
|
115
115
|
}
|
|
@@ -36,7 +36,7 @@ async function normalizeOptions(tree, options) {
|
|
|
36
36
|
propertyName,
|
|
37
37
|
description,
|
|
38
38
|
projectRoot,
|
|
39
|
-
projectSourceRoot,
|
|
39
|
+
projectSourceRoot: projectSourceRoot ?? (0, node_path_1.join)(projectRoot, 'src'),
|
|
40
40
|
isTsSolutionSetup: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree),
|
|
41
41
|
};
|
|
42
42
|
}
|
|
@@ -26,7 +26,7 @@ async function normalizeOptions(tree, options) {
|
|
|
26
26
|
name,
|
|
27
27
|
description,
|
|
28
28
|
projectRoot,
|
|
29
|
-
projectSourceRoot,
|
|
29
|
+
projectSourceRoot: projectSourceRoot ?? (0, node_path_1.join)(projectRoot, 'src'),
|
|
30
30
|
isTsSolutionSetup: (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree),
|
|
31
31
|
};
|
|
32
32
|
return normalized;
|
|
@@ -23,7 +23,8 @@ function updatePluginConfig(host, options) {
|
|
|
23
23
|
const project = (0, devkit_1.readProjectConfiguration)(host, options.projectName);
|
|
24
24
|
if (project.targets.build) {
|
|
25
25
|
if (options.isTsSolutionSetup && options.bundler === 'tsc') {
|
|
26
|
-
project.targets.build.options.rootDir =
|
|
26
|
+
project.targets.build.options.rootDir =
|
|
27
|
+
project.sourceRoot ?? (0, devkit_1.joinPathFragments)(project.root, 'src');
|
|
27
28
|
project.targets.build.options.generatePackageJson = false;
|
|
28
29
|
}
|
|
29
30
|
project.targets.build.options.assets = [
|
|
@@ -64,6 +65,12 @@ async function pluginGeneratorInternal(host, schema) {
|
|
|
64
65
|
skipFormat: true,
|
|
65
66
|
useTscExecutor: true,
|
|
66
67
|
}));
|
|
68
|
+
if (options.isTsSolutionSetup) {
|
|
69
|
+
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'), (json) => {
|
|
70
|
+
delete json.type;
|
|
71
|
+
return json;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
67
74
|
if (options.bundler === 'tsc') {
|
|
68
75
|
tasks.push((0, add_tslib_dependencies_1.addTsLibDependencies)(host));
|
|
69
76
|
}
|