Skip to content

Commit ea1f2ce

Browse files
committed
refactor(@angular/cli): remove deprecated rmdirSync usage
`rmdirSync` usage can be directly replaced with `rmSync`. For additional Node.js deprecation details, see https://nodejs.org/docs/latest-v16.x/api/deprecations.html#dep0147-fsrmdirpath--recursive-true-
1 parent 7ddc3fe commit ea1f2ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/angular/cli/src/utilities/package-manager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import { isJsonObject, json } from '@angular-devkit/core';
1010
import { execSync, spawn } from 'child_process';
11-
import { existsSync, promises as fs, realpathSync, rmdirSync } from 'fs';
11+
import { existsSync, promises as fs, realpathSync, rmSync } from 'fs';
1212
import { tmpdir } from 'os';
1313
import { join } from 'path';
1414
import { satisfies, valid } from 'semver';
@@ -111,7 +111,7 @@ export class PackageManagerUtils {
111111
// clean up temp directory on process exit
112112
process.on('exit', () => {
113113
try {
114-
rmdirSync(tempPath, { recursive: true, maxRetries: 3 });
114+
rmSync(tempPath, { recursive: true, maxRetries: 3 });
115115
} catch {}
116116
});
117117

0 commit comments

Comments
 (0)