mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 08:09:08 -05:00
9def44979a
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. |
||
---|---|---|
.. | ||
data.json | ||
dynamic_error.out | ||
dynamic_error.ts | ||
dynamic_import.out | ||
dynamic_import.ts | ||
json_with_shebang.json | ||
json_with_shebang.ts | ||
json_with_shebang.ts.out | ||
static_error.out | ||
static_error.ts | ||
static_export.out | ||
static_export.ts | ||
static_import.out | ||
static_import.ts | ||
static_reexport.ts | ||
type_check.out | ||
type_check.ts |