From 070d99645f4849cfc4479382d756bd40379594d0 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 20 Oct 2020 13:30:59 +0100 Subject: chore: Rename --importmap to --import-map (#7032) --importmap still works as an alias to --import-map but is not visible in CLI help output. --- cli/tests/doc/import_map.json | 5 +++++ cli/tests/doc/importmap.json | 5 ----- cli/tests/doc/use_import_map.js | 1 + cli/tests/doc/use_import_map.out | 5 +++++ cli/tests/doc/use_importmap.js | 1 - cli/tests/doc/use_importmap.out | 5 ----- cli/tests/import_map_no_unstable.out | 1 + cli/tests/import_maps/import_map.json | 14 ++++++++++++++ cli/tests/import_maps/lodash/lodash.ts | 1 + cli/tests/import_maps/lodash/other_file.ts | 1 + cli/tests/import_maps/moment/moment.ts | 1 + cli/tests/import_maps/moment/other_file.ts | 1 + cli/tests/import_maps/scope/scoped.ts | 2 ++ cli/tests/import_maps/scoped_moment.ts | 1 + cli/tests/import_maps/test.ts | 6 ++++++ cli/tests/import_maps/vue.ts | 1 + cli/tests/importmaps/import_map.json | 14 -------------- cli/tests/importmaps/lodash/lodash.ts | 1 - cli/tests/importmaps/lodash/other_file.ts | 1 - cli/tests/importmaps/moment/moment.ts | 1 - cli/tests/importmaps/moment/other_file.ts | 1 - cli/tests/importmaps/scope/scoped.ts | 2 -- cli/tests/importmaps/scoped_moment.ts | 1 - cli/tests/importmaps/test.ts | 6 ------ cli/tests/importmaps/vue.ts | 1 - cli/tests/integration_tests.rs | 14 +++++++------- 26 files changed, 47 insertions(+), 46 deletions(-) create mode 100644 cli/tests/doc/import_map.json delete mode 100644 cli/tests/doc/importmap.json create mode 100644 cli/tests/doc/use_import_map.js create mode 100644 cli/tests/doc/use_import_map.out delete mode 100644 cli/tests/doc/use_importmap.js delete mode 100644 cli/tests/doc/use_importmap.out create mode 100644 cli/tests/import_map_no_unstable.out create mode 100644 cli/tests/import_maps/import_map.json create mode 100644 cli/tests/import_maps/lodash/lodash.ts create mode 100644 cli/tests/import_maps/lodash/other_file.ts create mode 100644 cli/tests/import_maps/moment/moment.ts create mode 100644 cli/tests/import_maps/moment/other_file.ts create mode 100644 cli/tests/import_maps/scope/scoped.ts create mode 100644 cli/tests/import_maps/scoped_moment.ts create mode 100644 cli/tests/import_maps/test.ts create mode 100644 cli/tests/import_maps/vue.ts delete mode 100644 cli/tests/importmaps/import_map.json delete mode 100644 cli/tests/importmaps/lodash/lodash.ts delete mode 100644 cli/tests/importmaps/lodash/other_file.ts delete mode 100644 cli/tests/importmaps/moment/moment.ts delete mode 100644 cli/tests/importmaps/moment/other_file.ts delete mode 100644 cli/tests/importmaps/scope/scoped.ts delete mode 100644 cli/tests/importmaps/scoped_moment.ts delete mode 100644 cli/tests/importmaps/test.ts delete mode 100644 cli/tests/importmaps/vue.ts (limited to 'cli/tests') diff --git a/cli/tests/doc/import_map.json b/cli/tests/doc/import_map.json new file mode 100644 index 000000000..244a30296 --- /dev/null +++ b/cli/tests/doc/import_map.json @@ -0,0 +1,5 @@ +{ + "imports": { + "rex/": "./module/" + } +} diff --git a/cli/tests/doc/importmap.json b/cli/tests/doc/importmap.json deleted file mode 100644 index 244a30296..000000000 --- a/cli/tests/doc/importmap.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "imports": { - "rex/": "./module/" - } -} diff --git a/cli/tests/doc/use_import_map.js b/cli/tests/doc/use_import_map.js new file mode 100644 index 000000000..672a7a7bd --- /dev/null +++ b/cli/tests/doc/use_import_map.js @@ -0,0 +1 @@ +export { fun } from "rex/fun.js"; diff --git a/cli/tests/doc/use_import_map.out b/cli/tests/doc/use_import_map.out new file mode 100644 index 000000000..0b27ccf18 --- /dev/null +++ b/cli/tests/doc/use_import_map.out @@ -0,0 +1,5 @@ +Defined in [WILDCARD]/doc/module/fun.js:2:0 + +function fun(_a, _b) + This is some documentation + diff --git a/cli/tests/doc/use_importmap.js b/cli/tests/doc/use_importmap.js deleted file mode 100644 index 672a7a7bd..000000000 --- a/cli/tests/doc/use_importmap.js +++ /dev/null @@ -1 +0,0 @@ -export { fun } from "rex/fun.js"; diff --git a/cli/tests/doc/use_importmap.out b/cli/tests/doc/use_importmap.out deleted file mode 100644 index 0b27ccf18..000000000 --- a/cli/tests/doc/use_importmap.out +++ /dev/null @@ -1,5 +0,0 @@ -Defined in [WILDCARD]/doc/module/fun.js:2:0 - -function fun(_a, _b) - This is some documentation - diff --git a/cli/tests/import_map_no_unstable.out b/cli/tests/import_map_no_unstable.out new file mode 100644 index 000000000..4f202613e --- /dev/null +++ b/cli/tests/import_map_no_unstable.out @@ -0,0 +1 @@ +Unstable API '--import-map'. The --unstable flag must be provided. diff --git a/cli/tests/import_maps/import_map.json b/cli/tests/import_maps/import_map.json new file mode 100644 index 000000000..601874aab --- /dev/null +++ b/cli/tests/import_maps/import_map.json @@ -0,0 +1,14 @@ +{ + "imports": { + "moment": "./moment/moment.ts", + "moment/": "./moment/", + "lodash": "./lodash/lodash.ts", + "lodash/": "./lodash/", + "https://www.unpkg.com/vue/dist/vue.runtime.esm.js": "./vue.ts" + }, + "scopes": { + "scope/": { + "moment": "./scoped_moment.ts" + } + } +} diff --git a/cli/tests/import_maps/lodash/lodash.ts b/cli/tests/import_maps/lodash/lodash.ts new file mode 100644 index 000000000..2ec04ed3c --- /dev/null +++ b/cli/tests/import_maps/lodash/lodash.ts @@ -0,0 +1 @@ +console.log("Hello from remapped lodash!"); diff --git a/cli/tests/import_maps/lodash/other_file.ts b/cli/tests/import_maps/lodash/other_file.ts new file mode 100644 index 000000000..714adae3f --- /dev/null +++ b/cli/tests/import_maps/lodash/other_file.ts @@ -0,0 +1 @@ +console.log("Hello from remapped lodash dir!"); diff --git a/cli/tests/import_maps/moment/moment.ts b/cli/tests/import_maps/moment/moment.ts new file mode 100644 index 000000000..2b54a431e --- /dev/null +++ b/cli/tests/import_maps/moment/moment.ts @@ -0,0 +1 @@ +console.log("Hello from remapped moment!"); diff --git a/cli/tests/import_maps/moment/other_file.ts b/cli/tests/import_maps/moment/other_file.ts new file mode 100644 index 000000000..24f3a0226 --- /dev/null +++ b/cli/tests/import_maps/moment/other_file.ts @@ -0,0 +1 @@ +console.log("Hello from remapped moment dir!"); diff --git a/cli/tests/import_maps/scope/scoped.ts b/cli/tests/import_maps/scope/scoped.ts new file mode 100644 index 000000000..9a0b5d8e3 --- /dev/null +++ b/cli/tests/import_maps/scope/scoped.ts @@ -0,0 +1,2 @@ +import "moment"; +console.log("Hello from scoped!"); diff --git a/cli/tests/import_maps/scoped_moment.ts b/cli/tests/import_maps/scoped_moment.ts new file mode 100644 index 000000000..9f67f88d4 --- /dev/null +++ b/cli/tests/import_maps/scoped_moment.ts @@ -0,0 +1 @@ +console.log("Hello from scoped moment!"); diff --git a/cli/tests/import_maps/test.ts b/cli/tests/import_maps/test.ts new file mode 100644 index 000000000..9b09e9953 --- /dev/null +++ b/cli/tests/import_maps/test.ts @@ -0,0 +1,6 @@ +import "moment"; +import "moment/other_file.ts"; +import "lodash"; +import "lodash/other_file.ts"; +import "https://www.unpkg.com/vue/dist/vue.runtime.esm.js"; +import "./scope/scoped.ts"; diff --git a/cli/tests/import_maps/vue.ts b/cli/tests/import_maps/vue.ts new file mode 100644 index 000000000..76dbe1917 --- /dev/null +++ b/cli/tests/import_maps/vue.ts @@ -0,0 +1 @@ +console.log("Hello from remapped Vue!"); diff --git a/cli/tests/importmaps/import_map.json b/cli/tests/importmaps/import_map.json deleted file mode 100644 index 601874aab..000000000 --- a/cli/tests/importmaps/import_map.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "imports": { - "moment": "./moment/moment.ts", - "moment/": "./moment/", - "lodash": "./lodash/lodash.ts", - "lodash/": "./lodash/", - "https://www.unpkg.com/vue/dist/vue.runtime.esm.js": "./vue.ts" - }, - "scopes": { - "scope/": { - "moment": "./scoped_moment.ts" - } - } -} diff --git a/cli/tests/importmaps/lodash/lodash.ts b/cli/tests/importmaps/lodash/lodash.ts deleted file mode 100644 index 2ec04ed3c..000000000 --- a/cli/tests/importmaps/lodash/lodash.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello from remapped lodash!"); diff --git a/cli/tests/importmaps/lodash/other_file.ts b/cli/tests/importmaps/lodash/other_file.ts deleted file mode 100644 index 714adae3f..000000000 --- a/cli/tests/importmaps/lodash/other_file.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello from remapped lodash dir!"); diff --git a/cli/tests/importmaps/moment/moment.ts b/cli/tests/importmaps/moment/moment.ts deleted file mode 100644 index 2b54a431e..000000000 --- a/cli/tests/importmaps/moment/moment.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello from remapped moment!"); diff --git a/cli/tests/importmaps/moment/other_file.ts b/cli/tests/importmaps/moment/other_file.ts deleted file mode 100644 index 24f3a0226..000000000 --- a/cli/tests/importmaps/moment/other_file.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello from remapped moment dir!"); diff --git a/cli/tests/importmaps/scope/scoped.ts b/cli/tests/importmaps/scope/scoped.ts deleted file mode 100644 index 9a0b5d8e3..000000000 --- a/cli/tests/importmaps/scope/scoped.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "moment"; -console.log("Hello from scoped!"); diff --git a/cli/tests/importmaps/scoped_moment.ts b/cli/tests/importmaps/scoped_moment.ts deleted file mode 100644 index 9f67f88d4..000000000 --- a/cli/tests/importmaps/scoped_moment.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello from scoped moment!"); diff --git a/cli/tests/importmaps/test.ts b/cli/tests/importmaps/test.ts deleted file mode 100644 index 9b09e9953..000000000 --- a/cli/tests/importmaps/test.ts +++ /dev/null @@ -1,6 +0,0 @@ -import "moment"; -import "moment/other_file.ts"; -import "lodash"; -import "lodash/other_file.ts"; -import "https://www.unpkg.com/vue/dist/vue.runtime.esm.js"; -import "./scope/scoped.ts"; diff --git a/cli/tests/importmaps/vue.ts b/cli/tests/importmaps/vue.ts deleted file mode 100644 index 76dbe1917..000000000 --- a/cli/tests/importmaps/vue.ts +++ /dev/null @@ -1 +0,0 @@ -console.log("Hello from remapped Vue!"); diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 0c11ea75e..f7edf5a42 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -1059,7 +1059,7 @@ fn bundle_import_map() { let mut deno = util::deno_cmd() .current_dir(util::root_path()) .arg("bundle") - .arg("--importmap") + .arg("--import-map") .arg(import_map_path) .arg("--unstable") .arg(import) @@ -1957,7 +1957,7 @@ itest!(_031_info_ts_error { itest!(_033_import_map { args: - "run --quiet --reload --importmap=importmaps/import_map.json --unstable importmaps/test.ts", + "run --quiet --reload --import-map=import_maps/import_map.json --unstable import_maps/test.ts", output: "033_import_map.out", }); @@ -1976,7 +1976,7 @@ itest!(_035_cached_only_flag { itest!(_036_import_map_fetch { args: - "cache --quiet --reload --importmap=importmaps/import_map.json --unstable importmaps/test.ts", + "cache --quiet --reload --import-map=import_maps/import_map.json --unstable import_maps/test.ts", output: "036_import_map_fetch.out", }); @@ -2121,7 +2121,7 @@ itest!(_064_permissions_revoke_global { itest!(_065_import_map_info { args: - "info --quiet --importmap=importmaps/import_map.json --unstable importmaps/test.ts", + "info --quiet --import-map=import_maps/import_map.json --unstable import_maps/test.ts", output: "065_import_map_info.out", }); @@ -2886,9 +2886,9 @@ itest!(deno_doc { output: "deno_doc.out", }); -itest!(deno_doc_importmap { - args: "doc --unstable --importmap=doc/importmap.json doc/use_importmap.js", - output: "doc/use_importmap.out", +itest!(deno_doc_import_map { + args: "doc --unstable --import-map=doc/import_map.json doc/use_import_map.js", + output: "doc/use_import_map.out", }); itest!(compiler_js_error { -- cgit v1.2.3