@angular-devkit/schematics 14.0.0-rc.2 → 14.0.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/schematics",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.1",
|
|
4
4
|
"description": "Angular Schematics - Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"schematics"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@angular-devkit/core": "14.0.
|
|
21
|
+
"@angular-devkit/core": "14.0.1",
|
|
22
22
|
"jsonc-parser": "3.0.0",
|
|
23
23
|
"magic-string": "0.26.1",
|
|
24
24
|
"ora": "5.4.1",
|
|
@@ -42,7 +42,6 @@ const rxjs_1 = require("rxjs");
|
|
|
42
42
|
const src_1 = require("../../src");
|
|
43
43
|
const packageManagers = {
|
|
44
44
|
'npm': {
|
|
45
|
-
quietArgument: '--quiet',
|
|
46
45
|
commands: {
|
|
47
46
|
installAll: 'install',
|
|
48
47
|
installPackage: 'install',
|
|
@@ -55,13 +54,11 @@ const packageManagers = {
|
|
|
55
54
|
},
|
|
56
55
|
},
|
|
57
56
|
'yarn': {
|
|
58
|
-
quietArgument: '--silent',
|
|
59
57
|
commands: {
|
|
60
58
|
installPackage: 'add',
|
|
61
59
|
},
|
|
62
60
|
},
|
|
63
61
|
'pnpm': {
|
|
64
|
-
quietArgument: '--silent',
|
|
65
62
|
commands: {
|
|
66
63
|
installAll: 'install',
|
|
67
64
|
installPackage: 'install',
|
|
@@ -93,10 +90,15 @@ function default_1(factoryOptions = {}) {
|
|
|
93
90
|
}
|
|
94
91
|
const bufferedOutput = [];
|
|
95
92
|
const spawnOptions = {
|
|
96
|
-
stdio: options.hideOutput ? 'pipe' : 'inherit',
|
|
97
93
|
shell: true,
|
|
98
94
|
cwd: path.join(rootDirectory, options.workingDirectory || ''),
|
|
99
95
|
};
|
|
96
|
+
if (options.hideOutput) {
|
|
97
|
+
spawnOptions.stdio = options.quiet ? ['ignore', 'ignore', 'pipe'] : 'pipe';
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
spawnOptions.stdio = options.quiet ? ['ignore', 'ignore', 'inherit'] : 'inherit';
|
|
101
|
+
}
|
|
100
102
|
const args = [];
|
|
101
103
|
if (options.packageName) {
|
|
102
104
|
if (options.command === 'install') {
|
|
@@ -107,11 +109,20 @@ function default_1(factoryOptions = {}) {
|
|
|
107
109
|
else if (options.command === 'install' && taskPackageManagerProfile.commands.installAll) {
|
|
108
110
|
args.push(taskPackageManagerProfile.commands.installAll);
|
|
109
111
|
}
|
|
110
|
-
if (options.quiet && taskPackageManagerProfile.quietArgument) {
|
|
111
|
-
args.push(taskPackageManagerProfile.quietArgument);
|
|
112
|
-
}
|
|
113
112
|
if (!options.allowScripts) {
|
|
114
|
-
|
|
113
|
+
// Yarn requires special handling since Yarn 2+ no longer has the `--ignore-scripts` flag
|
|
114
|
+
if (taskPackageManagerName === 'yarn') {
|
|
115
|
+
spawnOptions.env = {
|
|
116
|
+
...process.env,
|
|
117
|
+
// Supported with yarn 1
|
|
118
|
+
'npm_config_ignore_scripts': 'true',
|
|
119
|
+
// Supported with yarn 2+
|
|
120
|
+
'YARN_ENABLE_SCRIPTS': 'false',
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
args.push('--ignore-scripts');
|
|
125
|
+
}
|
|
115
126
|
}
|
|
116
127
|
if (factoryOptions.registry) {
|
|
117
128
|
args.push(`--registry="${factoryOptions.registry}"`);
|