workerboxjs
Advanced tools
Comparing version 5.0.3 to 5.1.0
@@ -43,3 +43,3 @@ import createCallbackStore from './createCallbackStore.js'; | ||
if (options.appendVersion) { | ||
scriptUrl = scriptUrl + '/v5.0.3/'; | ||
scriptUrl = scriptUrl + '/v5.1.0/'; | ||
} | ||
@@ -46,0 +46,0 @@ |
{ | ||
"name": "workerboxjs", | ||
"version": "5.0.3", | ||
"version": "5.1.0", | ||
"type": "module", | ||
@@ -40,8 +40,8 @@ "description": "A secure sandbox to execute untrusted user JavaScript, in a web browser, without any risk to your own domain/site/page.", | ||
"debounce": "^1.2.1", | ||
"esbuild": "^0.15.15", | ||
"just-tap": "^1.5.1", | ||
"minify": "^9.1.0", | ||
"puppeteer": "^19.3.0", | ||
"servatron": "^2.4.2" | ||
"esbuild": "^0.17.10", | ||
"just-tap": "^2.4.0", | ||
"minify": "^9.2.0", | ||
"puppeteer": "^19.7.2", | ||
"servatron": "^2.4.3" | ||
} | ||
} |
@@ -62,2 +62,35 @@ # WorkerBox | ||
## Errors and Stack traces | ||
Runtime errors should have readable stacktraces, for example: | ||
**The following code:** | ||
```javascript | ||
await run(` | ||
const a = 1; | ||
a(); | ||
`); | ||
``` | ||
**Should return the following error:** | ||
```text | ||
TypeError: a is not a function | ||
at sandbox (<sandbox>:2:2) | ||
``` | ||
However syntax errors will not have a stack trace, for example: | ||
**The following code:** | ||
```javascript | ||
await run(` | ||
return 1 + | ||
`); | ||
``` | ||
**Should return the following error:** | ||
```text | ||
Unexpected token '}' | ||
``` | ||
It would be helpful for your users if you ran the script through a linter or ast parser, to ensure the JavaScript is valid, and provide useful errors if not. | ||
## Development | ||
@@ -64,0 +97,0 @@ If you want to check this project out locally, you can do the following: |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11513
133