From 0bbe347c45c427a822efbc12529e59bcc75ebe33 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Fri, 18 Sep 2026 10:50:36 -0400 Subject: [PATCH] refactor(@angular/cli): use static import for Module in update command Replace the inline dynamic require('node:module') call with a top-level static import of Module in UpdateCommandModule. Also update the _pathCache check to use the 'in' operator for safer property access and cleaner type narrowing. --- packages/angular/cli/src/commands/update/cli.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/angular/cli/src/commands/update/cli.ts b/packages/angular/cli/src/commands/update/cli.ts index 6418bfc13ce4..45a4468e0c85 100644 --- a/packages/angular/cli/src/commands/update/cli.ts +++ b/packages/angular/cli/src/commands/update/cli.ts @@ -9,7 +9,7 @@ import { NodeWorkflow } from '@angular-devkit/schematics/tools'; import { Listr } from 'listr2'; import { existsSync, promises as fs } from 'node:fs'; -import { createRequire } from 'node:module'; +import { Module, createRequire } from 'node:module'; import * as path from 'node:path'; import npa from 'npm-package-arg'; import { Argv } from 'yargs'; @@ -607,8 +607,7 @@ export default class UpdateCommandModule extends CommandModule