Skip to content

Commit 9635082

Browse files
committed
fix(@angular/cli): update yarn berry package manager configuration
This commit updates the package manager descriptor for modern Yarn (Berry) to align with its current CLI options and configuration mechanisms: - Removes `noLockfileFlag` as Yarn Berry does not support a direct `--no-lockfile` flag for adding packages. - Updates `ignoreScriptsFlag` to use `--mode=skip-build`, which is the modern equivalent for skipping build scripts during installation. - Changes `getRegistryOptions` to use `YARN_NPM_REGISTRY_SERVER` environment variable, which is the correct way to configure the registry in Yarn Berry.
1 parent cb24c24 commit 9635082

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/angular/cli/src/package-managers/package-manager-descriptor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ export const SUPPORTED_PACKAGE_MANAGERS = {
162162
saveExactFlag: '--exact',
163163
saveTildeFlag: '--tilde',
164164
saveDevFlag: '--dev',
165-
noLockfileFlag: '--no-lockfile',
166-
ignoreScriptsFlag: '--ignore-scripts',
167-
getRegistryOptions: (registry: string) => ({ env: { NPM_CONFIG_REGISTRY: registry } }),
165+
noLockfileFlag: '',
166+
ignoreScriptsFlag: '--mode=skip-build',
167+
getRegistryOptions: (registry: string) => ({ env: { YARN_NPM_REGISTRY_SERVER: registry } }),
168168
versionCommand: ['--version'],
169169
listDependenciesCommand: ['list', '--depth=0', '--json', '--recursive=false'],
170170
getManifestCommand: ['npm', 'info', '--json'],

0 commit comments

Comments
 (0)