From 87f80ff6be5e2a132b583a9c380fff5db3cb2b07 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Sat, 20 Aug 2022 11:31:33 -0400 Subject: feat(unstable): initial support for npm specifiers (#15484) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartek IwaƄczuk --- cli/tests/testdata/npm/import_map/import_map.json | 5 +++++ cli/tests/testdata/npm/import_map/main.js | 7 +++++++ cli/tests/testdata/npm/import_map/main.out | 2 ++ 3 files changed, 14 insertions(+) create mode 100644 cli/tests/testdata/npm/import_map/import_map.json create mode 100644 cli/tests/testdata/npm/import_map/main.js create mode 100644 cli/tests/testdata/npm/import_map/main.out (limited to 'cli/tests/testdata/npm/import_map') diff --git a/cli/tests/testdata/npm/import_map/import_map.json b/cli/tests/testdata/npm/import_map/import_map.json new file mode 100644 index 000000000..a7ed13b82 --- /dev/null +++ b/cli/tests/testdata/npm/import_map/import_map.json @@ -0,0 +1,5 @@ +{ + "imports": { + "chalk": "npm:chalk@5" + } +} diff --git a/cli/tests/testdata/npm/import_map/main.js b/cli/tests/testdata/npm/import_map/main.js new file mode 100644 index 000000000..fe7ef549a --- /dev/null +++ b/cli/tests/testdata/npm/import_map/main.js @@ -0,0 +1,7 @@ +import chalk from "chalk"; + +console.log(chalk.green("chalk import map loads")); + +export function test(value) { + return chalk.red(value); +} diff --git a/cli/tests/testdata/npm/import_map/main.out b/cli/tests/testdata/npm/import_map/main.out new file mode 100644 index 000000000..755eb7338 --- /dev/null +++ b/cli/tests/testdata/npm/import_map/main.out @@ -0,0 +1,2 @@ +Download http://localhost:4545/npm/registry/chalk/chalk-5.0.1.tgz +chalk import map loads -- cgit v1.2.3