Skip to content

Commit 0c2bd0c

Browse files
authored
fix: replace native structuredClone() with a polyfill (#183)
1 parent 012dcb2 commit 0c2bd0c

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

package-lock.json

+9-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"@apidevtools/json-schema-ref-parser": "^11.5.4",
4242
"@asyncapi/parser": "^3.1.0",
4343
"@types/json-schema": "^7.0.11",
44+
"@ungap/structured-clone": "^1.2.0",
4445
"js-yaml": "^4.1.0",
4546
"jsonpath-plus": "^6.0.1",
4647
"lodash": "^4.17.21"
@@ -56,6 +57,7 @@
5657
"@types/js-yaml": "^4.0.5",
5758
"@types/lodash": "^4.14.186",
5859
"@types/node": "^18.8.2",
60+
"@types/ungap__structured-clone": "^1.2.0",
5961
"@typescript-eslint/eslint-plugin": "^5.39.0",
6062
"@typescript-eslint/parser": "^5.39.0",
6163
"eslint": "^8.24.0",

src/util.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { readFileSync } from 'fs';
22
import path from 'path';
33
import yaml from 'js-yaml';
44
import { merge } from 'lodash';
5+
import structuredClone from '@ungap/structured-clone';
56
import { parse } from './parser';
67
import { ParserError } from './errors';
78

0 commit comments

Comments
 (0)