@nx/plugin 19.7.4 → 19.8.0-beta.0
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": "19.
|
|
3
|
+
"version": "19.8.0-beta.0",
|
|
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": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"fs-extra": "^11.1.0",
|
|
31
31
|
"tslib": "^2.3.0",
|
|
32
|
-
"@nx/devkit": "19.
|
|
33
|
-
"@nx/jest": "19.
|
|
34
|
-
"@nx/js": "19.
|
|
35
|
-
"@nx/eslint": "19.
|
|
36
|
-
"@nrwl/nx-plugin": "19.
|
|
32
|
+
"@nx/devkit": "19.8.0-beta.0",
|
|
33
|
+
"@nx/jest": "19.8.0-beta.0",
|
|
34
|
+
"@nx/js": "19.8.0-beta.0",
|
|
35
|
+
"@nx/eslint": "19.8.0-beta.0",
|
|
36
|
+
"@nrwl/nx-plugin": "19.8.0-beta.0"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
@@ -55,10 +55,20 @@ function addMigrationJsonChecks(host, options, packageJson) {
|
|
|
55
55
|
fileSet.add(relativeMigrationsJsonPath);
|
|
56
56
|
return {
|
|
57
57
|
...o,
|
|
58
|
-
files: Array.from(fileSet),
|
|
58
|
+
files: formatFilesEntries(host, Array.from(fileSet)),
|
|
59
59
|
};
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
+
function formatFilesEntries(tree, files) {
|
|
63
|
+
if (!(0, flat_config_1.useFlatConfig)(tree)) {
|
|
64
|
+
return files;
|
|
65
|
+
}
|
|
66
|
+
const filesAfter = files.map((f) => {
|
|
67
|
+
const after = f.startsWith('./') ? f.replace('./', '**/') : f;
|
|
68
|
+
return after;
|
|
69
|
+
});
|
|
70
|
+
return filesAfter;
|
|
71
|
+
}
|
|
62
72
|
function updateProjectTarget(host, options, packageJson) {
|
|
63
73
|
const project = (0, devkit_1.readProjectConfiguration)(host, options.projectName);
|
|
64
74
|
if (!project.targets) {
|
|
@@ -110,12 +120,12 @@ function updateProjectEslintConfig(host, options, packageJson) {
|
|
|
110
120
|
// update it
|
|
111
121
|
(0, eslint_file_1.updateOverrideInLintConfig)(host, options.root, lookup, (o) => ({
|
|
112
122
|
...o,
|
|
113
|
-
files: [
|
|
123
|
+
files: formatFilesEntries(host, [
|
|
114
124
|
...new Set([
|
|
115
125
|
...(Array.isArray(o.files) ? o.files : [o.files]),
|
|
116
126
|
...files,
|
|
117
127
|
]),
|
|
118
|
-
],
|
|
128
|
+
]),
|
|
119
129
|
...parser,
|
|
120
130
|
rules: {
|
|
121
131
|
...o.rules,
|
|
@@ -126,7 +136,7 @@ function updateProjectEslintConfig(host, options, packageJson) {
|
|
|
126
136
|
else {
|
|
127
137
|
// add it
|
|
128
138
|
(0, eslint_file_1.addOverrideToLintConfig)(host, options.root, {
|
|
129
|
-
files,
|
|
139
|
+
files: formatFilesEntries(host, files),
|
|
130
140
|
...parser,
|
|
131
141
|
rules: {
|
|
132
142
|
'@nx/nx-plugin-checks': 'error',
|