summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/cached_only
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-08-22 17:35:04 +0200
committerGitHub <noreply@github.com>2022-08-22 17:35:04 +0200
commitc66386dbd20b735161017a239c6af013da1f1718 (patch)
tree312e4cc304901212c9d6fb95521e3e3799598531 /cli/tests/testdata/npm/cached_only
parent57d48134d168cc128f075cb7381d773ea028c81e (diff)
feat(unstable): Respect --cached-only flags for npm: specifiers (#15512)
This commit changes "npm:" specifier handling to respect "--cached-only" flags and adds "Download" messages for npm registry api calls. Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/tests/testdata/npm/cached_only')
-rw-r--r--cli/tests/testdata/npm/cached_only/main.out4
-rw-r--r--cli/tests/testdata/npm/cached_only/main.ts3
2 files changed, 7 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/cached_only/main.out b/cli/tests/testdata/npm/cached_only/main.out
new file mode 100644
index 000000000..e902bff49
--- /dev/null
+++ b/cli/tests/testdata/npm/cached_only/main.out
@@ -0,0 +1,4 @@
+error: Error getting response at http://localhost:4545/npm/registry/chalk
+
+Caused by:
+ An npm specifier not found in cache: "chalk", --cached-only is specified.
diff --git a/cli/tests/testdata/npm/cached_only/main.ts b/cli/tests/testdata/npm/cached_only/main.ts
new file mode 100644
index 000000000..1ccc441a1
--- /dev/null
+++ b/cli/tests/testdata/npm/cached_only/main.ts
@@ -0,0 +1,3 @@
+import chalk from "npm:chalk@5";
+
+console.log(chalk);