pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/angular/angular-cli/commit/fe6a5d2dbef2e6070e094a603fc6fefc5586e54f

rossorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-5efd63e783ac04bb.css" /> refactor(@angular-devkit/core): remove usage of custom deepCopy and d… · angular/angular-cli@fe6a5d2 · GitHub
Skip to content

Commit fe6a5d2

Browse files
clydindgp1130
authored andcommitted
refactor(@angular-devkit/core): remove usage of custom deepCopy and deprecate it (#33051)
The custom deepCopy function in @angular-devkit/core is no longer used internally in this package after replacing its usage in registry.ts with the native structuredClone. The function is now marked as deprecated to encourage consumers to migrate to structuredClone, which is supported in modern Node.js versions. PR Close #33051
1 parent ba7dd2f commit fe6a5d2

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

packages/angular_devkit/core/src/json/schema/registry.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import * as https from 'node:https';
1313
import * as Url from 'node:url';
1414
import { Observable, from, isObservable, lastValueFrom } from 'rxjs';
1515
import { BaseException } from '../../exception';
16-
import { PartiallyOrderedSet, deepCopy } from '../../utils';
16+
import { PartiallyOrderedSet } from '../../utils';
1717
import { JsonArray, JsonObject, JsonValue, isJsonObject } from '../utils';
1818
import {
1919
JsonPointer,
@@ -257,7 +257,7 @@ export class CoreSchemaRegistry implements SchemaRegistry {
257257
}
258258
}
259259

260-
const schemaCopy = deepCopy(validate.schema as JsonObject);
260+
const schemaCopy = structuredClone(validate.schema as JsonObject);
261261
visitJsonSchema(schemaCopy, visitor);
262262

263263
return schemaCopy;

packages/angular_devkit/core/src/utils/object.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
const copySymbol = Symbol();
1010

11+
/**
12+
* @deprecated Use `structuredClone` instead.
13+
*/
1114
export function deepCopy<T>(value: T): T {
1215
if (Array.isArray(value)) {
1316
return value.map((o) => deepCopy(o)) as unknown as T;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy