mirror of
https://github.com/denoland/deno.git
synced 2024-11-15 16:43:44 -05:00
f1d3a17043
This commit adds "--compat" flag. When the flag is passed a set of mappings for built-in Node modules is injected into the import map. If user doesn't explicitly provide an import map (using "--import-map" flag) then a map is created on the fly. If there are already existing mappings in import map that would clash with built-in Node modules a set of diagnostics is printed to the terminal with suggestions how to proceed.
14 lines
401 B
Rust
14 lines
401 B
Rust
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
|
|
|
use crate::itest;
|
|
|
|
itest!(fs_promises {
|
|
args: "run --compat --unstable -A compat/fs_promises.js",
|
|
output: "compat/fs_promises.out",
|
|
});
|
|
|
|
itest!(existing_import_map {
|
|
args: "run --compat --import-map compat/existing_import_map.json compat/fs_promises.js",
|
|
output: "compat/existing_import_map.out",
|
|
exit_code: 1,
|
|
});
|