@angular/cli 18.1.1 → 18.2.0-next.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/cli",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0-next.1",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,35 +25,35 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/architect": "0.
|
|
29
|
-
"@angular-devkit/core": "18.
|
|
30
|
-
"@angular-devkit/schematics": "18.
|
|
31
|
-
"@inquirer/prompts": "5.
|
|
28
|
+
"@angular-devkit/architect": "0.1802.0-next.1",
|
|
29
|
+
"@angular-devkit/core": "18.2.0-next.1",
|
|
30
|
+
"@angular-devkit/schematics": "18.2.0-next.1",
|
|
31
|
+
"@inquirer/prompts": "5.1.3",
|
|
32
32
|
"@listr2/prompt-adapter-inquirer": "2.0.13",
|
|
33
|
-
"@schematics/angular": "18.
|
|
33
|
+
"@schematics/angular": "18.2.0-next.1",
|
|
34
34
|
"@yarnpkg/lockfile": "1.1.0",
|
|
35
35
|
"ini": "4.1.3",
|
|
36
36
|
"jsonc-parser": "3.3.1",
|
|
37
37
|
"listr2": "8.2.3",
|
|
38
38
|
"npm-package-arg": "11.0.2",
|
|
39
|
-
"npm-pick-manifest": "9.0
|
|
39
|
+
"npm-pick-manifest": "9.1.0",
|
|
40
40
|
"pacote": "18.0.6",
|
|
41
41
|
"resolve": "1.22.8",
|
|
42
|
-
"semver": "7.6.
|
|
42
|
+
"semver": "7.6.3",
|
|
43
43
|
"symbol-observable": "4.0.0",
|
|
44
44
|
"yargs": "17.7.2"
|
|
45
45
|
},
|
|
46
46
|
"ng-update": {
|
|
47
47
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
48
48
|
"packageGroup": {
|
|
49
|
-
"@angular/cli": "18.
|
|
50
|
-
"@angular/build": "18.
|
|
51
|
-
"@angular/ssr": "18.
|
|
52
|
-
"@angular-devkit/architect": "0.
|
|
53
|
-
"@angular-devkit/build-angular": "18.
|
|
54
|
-
"@angular-devkit/build-webpack": "0.
|
|
55
|
-
"@angular-devkit/core": "18.
|
|
56
|
-
"@angular-devkit/schematics": "18.
|
|
49
|
+
"@angular/cli": "18.2.0-next.1",
|
|
50
|
+
"@angular/build": "18.2.0-next.1",
|
|
51
|
+
"@angular/ssr": "18.2.0-next.1",
|
|
52
|
+
"@angular-devkit/architect": "0.1802.0-next.1",
|
|
53
|
+
"@angular-devkit/build-angular": "18.2.0-next.1",
|
|
54
|
+
"@angular-devkit/build-webpack": "0.1802.0-next.1",
|
|
55
|
+
"@angular-devkit/core": "18.2.0-next.1",
|
|
56
|
+
"@angular-devkit/schematics": "18.2.0-next.1"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"packageManager": "yarn@4.3.0",
|
|
@@ -206,8 +206,10 @@ let SchematicsCommandModule = (() => {
|
|
|
206
206
|
if (!definition.items?.length) {
|
|
207
207
|
continue;
|
|
208
208
|
}
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
answers[definition.id] = await (definition.multiselect ? prompts.checkbox : prompts.select)({
|
|
210
|
+
message: definition.message,
|
|
211
|
+
default: definition.default,
|
|
212
|
+
choices: definition.items?.map((item) => typeof item == 'string'
|
|
211
213
|
? {
|
|
212
214
|
name: item,
|
|
213
215
|
value: item,
|
|
@@ -215,15 +217,10 @@ let SchematicsCommandModule = (() => {
|
|
|
215
217
|
: {
|
|
216
218
|
name: item.label,
|
|
217
219
|
value: item.value,
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
answers[definition.id] = await (definition.multiselect ? prompts.checkbox : prompts.select)({
|
|
221
|
-
message: definition.message,
|
|
222
|
-
default: definition.default,
|
|
223
|
-
choices,
|
|
220
|
+
}),
|
|
224
221
|
});
|
|
225
222
|
break;
|
|
226
|
-
case 'input':
|
|
223
|
+
case 'input': {
|
|
227
224
|
let finalValue;
|
|
228
225
|
answers[definition.id] = await prompts.input({
|
|
229
226
|
message: definition.message,
|
|
@@ -263,6 +260,7 @@ let SchematicsCommandModule = (() => {
|
|
|
263
260
|
answers[definition.id] = finalValue;
|
|
264
261
|
}
|
|
265
262
|
break;
|
|
263
|
+
}
|
|
266
264
|
}
|
|
267
265
|
}
|
|
268
266
|
return answers;
|
|
@@ -14,7 +14,6 @@ const fs_1 = require("fs");
|
|
|
14
14
|
const jsonc_parser_1 = require("jsonc-parser");
|
|
15
15
|
const module_1 = require("module");
|
|
16
16
|
const path_1 = require("path");
|
|
17
|
-
const util_1 = require("util");
|
|
18
17
|
const vm_1 = require("vm");
|
|
19
18
|
const error_1 = require("../../utilities/error");
|
|
20
19
|
/**
|
|
@@ -165,34 +164,16 @@ function wrap(schematicFile, schematicDirectory, moduleCache, exportName) {
|
|
|
165
164
|
};
|
|
166
165
|
// Setup a wrapper function to capture the module's exports
|
|
167
166
|
const schematicCode = (0, fs_1.readFileSync)(schematicFile, 'utf8');
|
|
168
|
-
|
|
169
|
-
const headerCode = '(function() {\nvar exports = {};\nvar module = { exports };\n';
|
|
170
|
-
const footerCode = exportName
|
|
171
|
-
? `\nreturn module.exports['${exportName}'];});`
|
|
172
|
-
: '\nreturn module.exports;});';
|
|
173
|
-
const script = new vm_1.Script(headerCode + schematicCode + footerCode, {
|
|
167
|
+
const script = new vm_1.Script(module_1.Module.wrap(schematicCode), {
|
|
174
168
|
filename: schematicFile,
|
|
175
|
-
lineOffset:
|
|
169
|
+
lineOffset: 1,
|
|
176
170
|
});
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
// https://github.com/angular/angular/blob/main/packages/compiler/src/i18n/digest.ts#L17
|
|
183
|
-
// It is referenced globally, because it may be run either on the browser or the server.
|
|
184
|
-
// Usually Node exposes it globally, but in order for it to work, our custom context
|
|
185
|
-
// has to expose it too. Issue context: https://github.com/angular/angular/issues/48940.
|
|
186
|
-
TextEncoder: util_1.TextEncoder,
|
|
187
|
-
console,
|
|
188
|
-
process,
|
|
189
|
-
get global() {
|
|
190
|
-
return this;
|
|
191
|
-
},
|
|
192
|
-
require: customRequire,
|
|
171
|
+
const schematicModule = new module_1.Module(schematicFile);
|
|
172
|
+
const moduleFactory = script.runInThisContext();
|
|
173
|
+
return () => {
|
|
174
|
+
moduleFactory(schematicModule.exports, customRequire, schematicModule, schematicFile, schematicDirectory);
|
|
175
|
+
return exportName ? schematicModule.exports[exportName] : schematicModule.exports;
|
|
193
176
|
};
|
|
194
|
-
const exportsFactory = script.runInNewContext(context);
|
|
195
|
-
return exportsFactory;
|
|
196
177
|
}
|
|
197
178
|
function loadBuiltinModule(id) {
|
|
198
179
|
return undefined;
|
|
@@ -9,18 +9,20 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.subscribeToWorkflow = subscribeToWorkflow;
|
|
11
11
|
const color_1 = require("../../utilities/color");
|
|
12
|
+
function removeLeadingSlash(value) {
|
|
13
|
+
return value[0] === '/' ? value.slice(1) : value;
|
|
14
|
+
}
|
|
12
15
|
function subscribeToWorkflow(workflow, logger) {
|
|
13
16
|
const files = new Set();
|
|
14
17
|
let error = false;
|
|
15
18
|
let logs = [];
|
|
16
19
|
const reporterSubscription = workflow.reporter.subscribe((event) => {
|
|
17
20
|
// Strip leading slash to prevent confusion.
|
|
18
|
-
const eventPath =
|
|
21
|
+
const eventPath = removeLeadingSlash(event.path);
|
|
19
22
|
switch (event.kind) {
|
|
20
23
|
case 'error':
|
|
21
24
|
error = true;
|
|
22
|
-
|
|
23
|
-
logger.error(`ERROR! ${eventPath} ${desc}.`);
|
|
25
|
+
logger.error(`ERROR! ${eventPath} ${event.description == 'alreadyExist' ? 'already exists' : 'does not exist'}.`);
|
|
24
26
|
break;
|
|
25
27
|
case 'update':
|
|
26
28
|
logs.push(`${color_1.colors.cyan('UPDATE')} ${eventPath} (${event.content.length} bytes)`);
|
|
@@ -35,8 +37,7 @@ function subscribeToWorkflow(workflow, logger) {
|
|
|
35
37
|
files.add(eventPath);
|
|
36
38
|
break;
|
|
37
39
|
case 'rename':
|
|
38
|
-
|
|
39
|
-
logs.push(`${color_1.colors.blue('RENAME')} ${eventPath} => ${eventToPath}`);
|
|
40
|
+
logs.push(`${color_1.colors.blue('RENAME')} ${eventPath} => ${removeLeadingSlash(event.to)}`);
|
|
40
41
|
files.add(eventPath);
|
|
41
42
|
break;
|
|
42
43
|
}
|
package/src/utilities/version.js
CHANGED
|
@@ -25,5 +25,5 @@ class Version {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
// TODO(bazel): Convert this to use build-time version stamping after flipping the build script to use bazel
|
|
28
|
-
// export const VERSION = new Version('18.
|
|
28
|
+
// export const VERSION = new Version('18.2.0-next.1');
|
|
29
29
|
exports.VERSION = new Version(JSON.parse((0, fs_1.readFileSync)((0, path_1.resolve)(__dirname, '../../package.json'), 'utf-8')).version);
|