Skip to content

Commit d5879a7

Browse files
committed
Relaxed URL validation for chrome-extension or other cases
1 parent a32b002 commit d5879a7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/index.js

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

docs/index.js.map

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

esm/interpreters.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const interpreter = new Proxy(new Map(), {
2020
if (!map.has(id)) {
2121
const [type, ...rest] = id.split('@');
2222
const interpreter = registry.get(type);
23-
const url = /^(?:\.?\.?\/|https?:\/\/)/i.test(rest)
23+
const url = /^(?:\.?\.?\/|[a-z0-9-]+:\/\/)/i.test(rest)
2424
? rest.join('@')
2525
: interpreter.module(...rest);
2626
map.set(id, {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@
8686
"to-json-callback": "^0.1.1"
8787
},
8888
"worker": {
89-
"blob": "sha256-kIUd8EpaWWugXT2ElkC2z84Kt6HeWIlmGgMtjZWpTCs="
89+
"blob": "sha256-SYp37rM5lEJb2jwMKsu7YFF3j5ggR1eZxAP4eW06tqY="
9090
}
9191
}

0 commit comments

Comments
 (0)