@angular/cli 20.2.2 → 20.3.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": "@angular/cli",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.3.0",
|
|
4
4
|
"description": "CLI tool for Angular",
|
|
5
5
|
"main": "lib/cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/angular/angular-cli",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@angular-devkit/architect": "0.
|
|
29
|
-
"@angular-devkit/core": "20.
|
|
30
|
-
"@angular-devkit/schematics": "20.
|
|
28
|
+
"@angular-devkit/architect": "0.2003.0",
|
|
29
|
+
"@angular-devkit/core": "20.3.0",
|
|
30
|
+
"@angular-devkit/schematics": "20.3.0",
|
|
31
31
|
"@inquirer/prompts": "7.8.2",
|
|
32
32
|
"@listr2/prompt-adapter-inquirer": "3.0.1",
|
|
33
33
|
"@modelcontextprotocol/sdk": "1.17.3",
|
|
34
|
-
"@schematics/angular": "20.
|
|
34
|
+
"@schematics/angular": "20.3.0",
|
|
35
35
|
"@yarnpkg/lockfile": "1.1.0",
|
|
36
36
|
"algoliasearch": "5.35.0",
|
|
37
37
|
"ini": "5.0.0",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"ng-update": {
|
|
48
48
|
"migrations": "@schematics/angular/migrations/migration-collection.json",
|
|
49
49
|
"packageGroup": {
|
|
50
|
-
"@angular/cli": "20.
|
|
51
|
-
"@angular/build": "20.
|
|
52
|
-
"@angular/ssr": "20.
|
|
53
|
-
"@angular-devkit/architect": "0.
|
|
54
|
-
"@angular-devkit/build-angular": "20.
|
|
55
|
-
"@angular-devkit/build-webpack": "0.
|
|
56
|
-
"@angular-devkit/core": "20.
|
|
57
|
-
"@angular-devkit/schematics": "20.
|
|
50
|
+
"@angular/cli": "20.3.0",
|
|
51
|
+
"@angular/build": "20.3.0",
|
|
52
|
+
"@angular/ssr": "20.3.0",
|
|
53
|
+
"@angular-devkit/architect": "0.2003.0",
|
|
54
|
+
"@angular-devkit/build-angular": "20.3.0",
|
|
55
|
+
"@angular-devkit/build-webpack": "0.2003.0",
|
|
56
|
+
"@angular-devkit/core": "20.3.0",
|
|
57
|
+
"@angular-devkit/schematics": "20.3.0"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"packageManager": "pnpm@10.15.1",
|
|
@@ -12,8 +12,14 @@ export interface PackageManagerUtilsContext {
|
|
|
12
12
|
workspace?: AngularWorkspace;
|
|
13
13
|
root: string;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Utilities for interacting with various package managers.
|
|
17
|
+
*/
|
|
15
18
|
export declare class PackageManagerUtils {
|
|
16
19
|
private readonly context;
|
|
20
|
+
/**
|
|
21
|
+
* @param context The context for the package manager utilities, including workspace and global configuration.
|
|
22
|
+
*/
|
|
17
23
|
constructor(context: PackageManagerUtilsContext);
|
|
18
24
|
/** Get the package manager name. */
|
|
19
25
|
get name(): PackageManager;
|
|
@@ -32,6 +38,12 @@ export declare class PackageManagerUtils {
|
|
|
32
38
|
private run;
|
|
33
39
|
private getVersion;
|
|
34
40
|
private getName;
|
|
41
|
+
/**
|
|
42
|
+
* Checks if a lockfile for a specific package manager exists in the root directory.
|
|
43
|
+
* @param packageManager The package manager to check for.
|
|
44
|
+
* @param filesInRoot An array of file names in the root directory.
|
|
45
|
+
* @returns True if the lockfile exists, false otherwise.
|
|
46
|
+
*/
|
|
35
47
|
private hasLockfile;
|
|
36
48
|
private getConfiguredPackageManager;
|
|
37
49
|
}
|
|
@@ -50,6 +50,18 @@ const node_path_1 = require("node:path");
|
|
|
50
50
|
const workspace_schema_1 = require("../../lib/config/workspace-schema");
|
|
51
51
|
const config_1 = require("./config");
|
|
52
52
|
const memoize_1 = require("./memoize");
|
|
53
|
+
/**
|
|
54
|
+
* A map of package managers to their corresponding lockfile names.
|
|
55
|
+
*/
|
|
56
|
+
const LOCKFILE_NAMES = {
|
|
57
|
+
[workspace_schema_1.PackageManager.Yarn]: 'yarn.lock',
|
|
58
|
+
[workspace_schema_1.PackageManager.Pnpm]: 'pnpm-lock.yaml',
|
|
59
|
+
[workspace_schema_1.PackageManager.Bun]: ['bun.lockb', 'bun.lock'],
|
|
60
|
+
[workspace_schema_1.PackageManager.Npm]: 'package-lock.json',
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Utilities for interacting with various package managers.
|
|
64
|
+
*/
|
|
53
65
|
let PackageManagerUtils = (() => {
|
|
54
66
|
let _instanceExtraInitializers = [];
|
|
55
67
|
let _getVersion_decorators;
|
|
@@ -64,6 +76,9 @@ let PackageManagerUtils = (() => {
|
|
|
64
76
|
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
65
77
|
}
|
|
66
78
|
context = __runInitializers(this, _instanceExtraInitializers);
|
|
79
|
+
/**
|
|
80
|
+
* @param context The context for the package manager utilities, including workspace and global configuration.
|
|
81
|
+
*/
|
|
67
82
|
constructor(context) {
|
|
68
83
|
this.context = context;
|
|
69
84
|
}
|
|
@@ -211,10 +226,11 @@ let PackageManagerUtils = (() => {
|
|
|
211
226
|
if (packageManager) {
|
|
212
227
|
return packageManager;
|
|
213
228
|
}
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
const
|
|
217
|
-
const
|
|
229
|
+
const filesInRoot = (0, node_fs_1.readdirSync)(this.context.root);
|
|
230
|
+
const hasNpmLock = this.hasLockfile(workspace_schema_1.PackageManager.Npm, filesInRoot);
|
|
231
|
+
const hasYarnLock = this.hasLockfile(workspace_schema_1.PackageManager.Yarn, filesInRoot);
|
|
232
|
+
const hasPnpmLock = this.hasLockfile(workspace_schema_1.PackageManager.Pnpm, filesInRoot);
|
|
233
|
+
const hasBunLock = this.hasLockfile(workspace_schema_1.PackageManager.Bun, filesInRoot);
|
|
218
234
|
// PERF NOTE: `this.getVersion` spawns the package a the child_process which can take around ~300ms at times.
|
|
219
235
|
// Therefore, we should only call this method when needed. IE: don't call `this.getVersion(PackageManager.Pnpm)` unless truly needed.
|
|
220
236
|
// The result of this method is not stored in a variable because it's memoized.
|
|
@@ -259,24 +275,17 @@ let PackageManagerUtils = (() => {
|
|
|
259
275
|
// Potentially with a prompt to choose and optionally set as the default.
|
|
260
276
|
return workspace_schema_1.PackageManager.Npm;
|
|
261
277
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
break;
|
|
274
|
-
case workspace_schema_1.PackageManager.Npm:
|
|
275
|
-
default:
|
|
276
|
-
lockfileName = 'package-lock.json';
|
|
277
|
-
break;
|
|
278
|
-
}
|
|
279
|
-
return (0, node_fs_1.existsSync)((0, node_path_1.join)(this.context.root, lockfileName));
|
|
278
|
+
/**
|
|
279
|
+
* Checks if a lockfile for a specific package manager exists in the root directory.
|
|
280
|
+
* @param packageManager The package manager to check for.
|
|
281
|
+
* @param filesInRoot An array of file names in the root directory.
|
|
282
|
+
* @returns True if the lockfile exists, false otherwise.
|
|
283
|
+
*/
|
|
284
|
+
hasLockfile(packageManager, filesInRoot) {
|
|
285
|
+
const lockfiles = LOCKFILE_NAMES[packageManager];
|
|
286
|
+
return typeof lockfiles === 'string'
|
|
287
|
+
? filesInRoot.includes(lockfiles)
|
|
288
|
+
: lockfiles.some((lockfile) => filesInRoot.includes(lockfile));
|
|
280
289
|
}
|
|
281
290
|
getConfiguredPackageManager() {
|
|
282
291
|
const getPackageManager = (source) => {
|
package/src/utilities/version.js
CHANGED