Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"@types/pacote": "^11.1.3",
"@types/picomatch": "^4.0.0",
"@types/progress": "^2.0.3",
"@types/resolve": "^1.17.1",
"@types/semver": "^7.3.12",
"@types/watchpack": "^2.4.4",
"@types/yargs": "^17.0.20",
Expand Down
2 changes: 0 additions & 2 deletions packages/angular/cli/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,13 @@ ts_project(
":node_modules/npm-package-arg",
":node_modules/pacote",
":node_modules/parse5-html-rewriting-stream",
":node_modules/resolve",
":node_modules/yargs",
":node_modules/zod",
"//:node_modules/@angular/core",
"//:node_modules/@types/ini",
"//:node_modules/@types/node",
"//:node_modules/@types/npm-package-arg",
"//:node_modules/@types/pacote",
"//:node_modules/@types/resolve",
"//:node_modules/@types/semver",
"//:node_modules/@types/yargs",
"//:node_modules/@types/yarnpkg__lockfile",
Expand Down
1 change: 0 additions & 1 deletion packages/angular/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"npm-package-arg": "13.0.2",
"pacote": "21.0.4",
"parse5-html-rewriting-stream": "8.0.0",
"resolve": "1.22.11",
"semver": "7.7.3",
"yargs": "18.0.0",
"zod": "4.3.5"
Expand Down
12 changes: 11 additions & 1 deletion packages/angular/cli/src/commands/update/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
import { colors } from '../../utilities/color';
import { disableVersionCheck } from '../../utilities/environment-options';
import { assertIsError } from '../../utilities/error';
import { findPackageJson } from '../../utilities/package-tree';
import {
checkCLIVersion,
coerceVersionNumber,
Expand Down Expand Up @@ -697,3 +696,14 @@ async function readPackageManifest(manifestPath: string): Promise<PackageManifes
return undefined;
}
}

function findPackageJson(workspaceDir: string, packageName: string): string | undefined {
try {
const projectRequire = createRequire(path.join(workspaceDir, 'package.json'));
const packageJsonPath = projectRequire.resolve(`${packageName}/package.json`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a small gotcha for this which is that exports fields can mess with resolving package.json. But 99.9% of the time, an Angular app shouldn't have an exports field (and 90% of the remaining time, people should've added package.json to their exports).


return packageJsonPath;
} catch {
return undefined;
}
}
86 changes: 0 additions & 86 deletions packages/angular/cli/src/utilities/package-tree.ts

This file was deleted.

11 changes: 0 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.