Skip to content
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

Fixing #941 #945

Merged
merged 4 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
- run:
working_directory: create-leo-app/template-node
command: |
yarn start
yarn dev

template-node-ts:
executor: rust-node
Expand All @@ -108,7 +108,7 @@ jobs:
- run:
working_directory: create-leo-app/template-node-ts
command: |
yarn start
yarn dev

template-extension:
executor: rust-node
Expand Down
2 changes: 1 addition & 1 deletion create-leo-app/template-node-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"build": "rimraf dist/js && rollup --config",
"start": "npm run build && node dist/index.js"
"dev": "npm run build && node dist/index.js"
},
"dependencies": {
"@provablehq/sdk": "^0.7.0"
Expand Down
2 changes: 1 addition & 1 deletion create-leo-app/template-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"start": "node index.js"
"dev": "node index.js"
},
"dependencies": {
"@provablehq/sdk": "^0.7.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"build": "rimraf dist/js && rollup --config",
"start": "npm run build && node dist/index.js"
"dev": "npm run build && node dist/index.js"
},
"dependencies": {
"@provablehq/sdk": "^0.7.0"
Expand Down
4 changes: 2 additions & 2 deletions sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"@provablehq/wasm": "^0.7.0",
"comlink": "^4.4.1",
"mime": "^3.0.0",
"sync-request": "^6.1.0"
"sync-request": "^6.1.0",
"core-js": "^3.38.1"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.5",
Expand All @@ -63,7 +64,6 @@
"better-docs": "^2.7.2",
"chai": "^5.1.1",
"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
9 changes: 5 additions & 4 deletions sdk/src/polyfill/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ globalThis.Worker = class Worker extends EventTarget {
}

const code = `
const { workerData } = require("node:worker_threads");

import(workerData.polyfill)
.then(() => import(workerData.url))
import("node:worker_threads")
.then(({ workerData }) => {
return import(workerData.polyfill)
.then(() => import(workerData.url))
})
.catch((e) => {
// TODO maybe it should send a message to the parent?
console.error(e.stack);
Expand Down
Loading