1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 09:39:08 -05:00
denoland-deno/tools/wpt
Bartek Iwańczuk a1f0796fcc
feat: Add support for import assertions and JSON modules (#12866)
This commit adds proper support for import assertions and JSON modules.

Implementation of "core/modules.rs" was changed to account for multiple possible
module types, instead of always assuming that the code is an "ES module". In
effect "ModuleMap" now has knowledge about each modules' type (stored via
"ModuleType" enum). Module loading pipeline now stores information about
expected module type for each request and validates that expected type matches
discovered module type based on file's "MediaType".

Relevant tests were added to "core/modules.rs" and integration tests,
additionally multiple WPT tests were enabled.

There are still some rough edges in the implementation and not all WPT were
enabled, due to:
a) unclear BOM handling in source code by "FileFetcher"
b) design limitation of Deno's "FileFetcher" that doesn't download the same
module multiple times in a single run

Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2021-12-15 19:22:36 +01:00
..
certs tests: fix wpt epoch ci job (#10960) 2021-06-14 20:57:02 +02:00
config.json fix(websocket): spec conformance & WPT (#11010) 2021-06-21 12:15:08 +02:00
expectation.json feat: Add support for import assertions and JSON modules (#12866) 2021-12-15 19:22:36 +01:00
runner.ts BREAKING(unstable): Remove Deno.Signals enum, Deno.signals.* (#11909) 2021-09-06 10:05:33 -04:00
testharnessreport.js fix: propagate top level thrown errors in WPT (#10932) 2021-06-11 21:31:53 +02:00
utils.ts chore(tools): use local std in wpt utils (#11644) 2021-08-12 10:09:27 +02:00