Skip to content

Commit

Permalink
Adding in JSON.parse polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
Pauan committed Sep 19, 2024
1 parent 8011135 commit cf50d76
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"@typescript-eslint/parser": "^5.41.0",
"better-docs": "^2.7.2",
"clean-jsdoc-theme": "^4.1.8",
"core-js": "^3.38.1",
"cpr": "^3.0.1",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
Expand Down
1 change: 1 addition & 0 deletions sdk/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "./polyfill/shared";
import {VerifyingKey, Metadata} from "@provablehq/wasm";

const KEY_STORE = Metadata.baseUrl();
Expand Down
1 change: 1 addition & 0 deletions sdk/src/node-polyfill.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "./polyfill/shared";
import "./polyfill/crypto";
import "./polyfill/fetch";
import "./polyfill/xmlhttprequest";
Expand Down
2 changes: 2 additions & 0 deletions sdk/src/polyfill/shared.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// These polyfills are shared by everything, both the browser and Node
import "core-js/proposals/json-parse-with-source";
1 change: 1 addition & 0 deletions sdk/src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "./polyfill/shared";
import {initThreadPool, ProgramManager, PrivateKey, verifyFunctionExecution, FunctionKeyPair} from "./index";
import { AleoKeyProvider, AleoKeyProviderParams} from "./function-key-provider";
import { expose } from "comlink";
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4110,6 +4110,11 @@ core-js@^2.4.0:
resolved "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz"
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==

core-js@^3.38.1:
version "3.38.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.38.1.tgz#aa375b79a286a670388a1a363363d53677c0383e"
integrity sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==

core-util-is@~1.0.0:
version "1.0.3"
resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz"
Expand Down

0 comments on commit cf50d76

Please sign in to comment.