Skip to content
Merged
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
5 changes: 2 additions & 3 deletions packages/angular/cli/src/commands/update/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -607,8 +607,7 @@ export default class UpdateCommandModule extends CommandModule<UpdateCommandArgs
await tasks.run();
// Clear Node's module resolution path cache to prevent stale lookups
// when resolving migration package paths.
const Module = require('node:module');
if (Module && Module._pathCache) {
if ('_pathCache' in Module) {
Module._pathCache = Object.create(null);
}
Comment thread
clydin marked this conversation as resolved.
} catch (e) {
Expand Down
Loading