-
Notifications
You must be signed in to change notification settings - Fork 84
Remove compatibility and custom utility code #1479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,35 +88,7 @@ class MessageIntrospector { | |
| const instance = new this.#typeClass(); | ||
| this.#defaultsCache = toPlainObject(instance); | ||
| } | ||
| return this.#deepClone(this.#defaultsCache); | ||
| } | ||
|
|
||
| /** | ||
| * Deep clone an object. | ||
| * @param {any} obj - Object to clone | ||
| * @returns {any} Cloned object | ||
| * @private | ||
| */ | ||
| #deepClone(obj) { | ||
| if (obj === null || typeof obj !== 'object') { | ||
| return obj; | ||
| } | ||
|
|
||
| if (Array.isArray(obj)) { | ||
| return obj.map((item) => this.#deepClone(item)); | ||
| } | ||
|
|
||
| if (ArrayBuffer.isView(obj) && !(obj instanceof DataView)) { | ||
| return obj.slice(); | ||
| } | ||
|
|
||
| const cloned = {}; | ||
| for (const key in obj) { | ||
| if (Object.prototype.hasOwnProperty.call(obj, key)) { | ||
| cloned[key] = this.#deepClone(obj[key]); | ||
| } | ||
| } | ||
| return cloned; | ||
| return structuredClone(this.#defaultsCache); | ||
|
||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the AbortSignal.any() polyfill makes this module rely on a native AbortSignal.any implementation, but the code still calls AbortSignal.any later (e.g., in sendRequestAsync) without a guard. With the current repo metadata/CI still targeting Node 16.x (package.json engines and ARM64 workflow), this will throw at runtime. Either restore a local fallback for AbortSignal.any (only when missing) or update the supported Node.js floor + CI/prebuild targets/docs in the same PR so this file’s runtime requirements are consistent.