File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed
Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,6 @@ export function isNonNullable<T>(value: T): value is NonNullable<T> {
2828 return value !== null && value !== undefined
2929}
3030
31- export const structuredClonePolyfill : < T > ( value : T ) => T = typeof structuredClone === 'function'
32- ? structuredClone
33- : function < T > ( value : T ) : T {
34- /* eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- ack */
35- return JSON . parse ( JSON . stringify ( value ) ) as T
36- }
37-
3831export interface ValidPackageJSON {
3932 name : string
4033 version : string
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ import {
2727 isNonNullable ,
2828 normalizePackageManifest ,
2929 type PackageDescription ,
30- structuredClonePolyfill
3130} from './_helpers'
3231
3332type WebpackLogger = Compilation [ 'logger' ]
@@ -95,7 +94,7 @@ export class Extractor {
9594 try {
9695 // work with a deep copy, because `normalizePackageManifest()` might modify the data
9796 /* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- ach */
98- const _packageJson = structuredClonePolyfill ( pkg . packageJson )
97+ const _packageJson = structuredClone ( pkg . packageJson )
9998 normalizePackageManifest ( _packageJson )
10099 pkg . packageJson = _packageJson /* eslint-disable-line no-param-reassign -- intended */
101100 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments