diff options
| author | Andreu Botella <abb@randomunok.com> | 2022-01-16 16:48:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-16 16:48:32 +0100 |
| commit | 9def44979a0c3a03a7ada09f8359ea6b1d795d03 (patch) | |
| tree | 57f7c71de64a8484871d163fc60e9c31bfbb8949 /.dprint.json | |
| parent | ad224f53c798e8417a63d98daeaf3cadc199666c (diff) | |
fix(cli): Don't strip shebangs from modules (#13220)
Deno's module loader currently strips a shebang if a module file
starts with one. However, this is no longer necessary, since there is
a stage-3 TC39 that adds support for shebangs (or "hashbangs") to the
language (https://github.com/tc39/proposal-hashbang), and V8, `tsc`
and `swc` all support it.
Furthermore, stripping shebangs causes a correctness bug with JSON
modules, since a JSON file with a shebang should not parse as a JSON
module, yet it does with this stripping. This change fixes this.
Diffstat (limited to '.dprint.json')
| -rw-r--r-- | .dprint.json | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.dprint.json b/.dprint.json index dfaed6314..73204979a 100644 --- a/.dprint.json +++ b/.dprint.json @@ -27,6 +27,7 @@ "cli/tests/testdata/badly_formatted.json", "cli/tests/testdata/byte_order_mark.ts", "cli/tests/testdata/fmt/*", + "cli/tests/testdata/import_assertions/json_with_shebang.json", "cli/tests/testdata/test/markdown_windows.md", "cli/tsc/*typescript.js", "test_util/std", |
