-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING: disallow static import of local modules from remote modules (…
…#5050) This commit changes module loading logic to disallow statically import local module (file:// scheme) from remote modules (http://, https:// schemes).
- Loading branch information
1 parent
de2c042
commit 2872b36
Showing
7 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "file:///some/dir/file.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[WILDCARD] | ||
Remote module are not allowed to statically import local modules. Use dynamic import instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import "file:///some/dir/file.ts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[WILDCARD] | ||
error: Uncaught PermissionDenied: Remote module are not allowed to statically import local modules. Use dynamic import instead. | ||
at unwrapResponse ($deno$/ops/dispatch_json.ts:[WILDCARD]) | ||
at Object.sendAsync ($deno$/ops/dispatch_json.ts:[WILDCARD]) | ||
at async processImports ($deno$/compiler/imports.ts:[WILDCARD]) | ||
at async Object.processImports ($deno$/compiler/imports.ts:[WILDCARD]) | ||
at async compile ([WILDCARD]compiler.ts:[WILDCARD]) | ||
at async tsCompilerOnMessage ([WILDCARD]compiler.ts:[WILDCARD]) | ||
at async workerMessageRecvCallback ($deno$/runtime_worker.ts:[WILDCARD]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters