refactor(@angular-devkit/core): remove usage of custom deepCopy and deprecate it#33051
refactor(@angular-devkit/core): remove usage of custom deepCopy and deprecate it#33051clydin wants to merge 6 commits into
Conversation
…eprecate it 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.
There was a problem hiding this comment.
Code Review
This pull request deprecates the isPromise and deepCopy utility functions in favor of native alternatives and marks the deps parameter in schema transformation methods as deprecated. The review feedback identifies a potential regression in schema-option-transform.ts where structuredClone could throw a DataCloneError if options contain non-serializable values like functions. Furthermore, the reviewer recommends providing guidance or alternatives for the deprecated deps parameter and documenting the behavioral differences between deepCopy and structuredClone in the deprecation notices to assist consumers.
649417c to
b7319b1
Compare
The isPromise utility was only used in one place in create-job-handler.ts. It has been replaced with an inline check for thenables. The utility is now marked as deprecated in @angular-devkit/core.
…istry transforms The deps parameter in addPreTransform and addPostTransform is deprecated. Consumers should ensure that transforms are added in the desired execution order instead of relying on the dependency tracking system, which will be removed in a future version.
bc91c63 to
a7eb7c2
Compare
The PartiallyOrderedSet class was only used to handle dependencies in SchemaRegistry transforms. Since that feature is now deprecated, this class is also marked as deprecated.
a7eb7c2 to
b86b9a8
Compare
|
This PR was merged into the repository. The changes were merged into the following branches:
|
…eprecate 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
The isPromise utility was only used in one place in create-job-handler.ts. It has been replaced with an inline check for thenables. The utility is now marked as deprecated in @angular-devkit/core. PR Close #33051
The PartiallyOrderedSet class was only used to handle dependencies in SchemaRegistry transforms. Since that feature is now deprecated, this class is also marked as deprecated. PR Close #33051
|
This pull request has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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.