Skip to content

Commit

Permalink
Merge pull request #945 from Pauan/fix/examples
Browse files Browse the repository at this point in the history
Fixing #941
  • Loading branch information
iamalwaysuncomfortable authored Dec 5, 2024
2 parents 733b3c7 + 610c16c commit 105266b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
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

0 comments on commit 105266b

Please sign in to comment.