summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/cjs_with_deps
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-02-22 14:15:25 -0500
committerGitHub <noreply@github.com>2023-02-22 14:15:25 -0500
commita6ca4d0d61c95b9f7fa79ecce81a31a6d1f6cc5d (patch)
tree278a915d7722a8a3d1fffbfa1f3a12752f44d13f /cli/tests/testdata/npm/cjs_with_deps
parent0f9daaeacb402a7199e58b14ad01ec0091ac2c8d (diff)
refactor: use deno_graph for npm specifiers (#17858)
This changes npm specifiers to be handled by deno_graph and resolved to an npm package name and version when the specifier is encountered. It also slightly changes how npm specifier resolution occurs—previously it would collect all the npm specifiers and resolve them all at once, but now it resolves them on the fly as they are encountered in the module graph. https://github.com/denoland/deno_graph/pull/232 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Diffstat (limited to 'cli/tests/testdata/npm/cjs_with_deps')
-rw-r--r--cli/tests/testdata/npm/cjs_with_deps/main.out6
-rw-r--r--cli/tests/testdata/npm/cjs_with_deps/main_info.out32
-rw-r--r--cli/tests/testdata/npm/cjs_with_deps/main_info_json.out35
3 files changed, 38 insertions, 35 deletions
diff --git a/cli/tests/testdata/npm/cjs_with_deps/main.out b/cli/tests/testdata/npm/cjs_with_deps/main.out
index 23c217f7a..3a16ff467 100644
--- a/cli/tests/testdata/npm/cjs_with_deps/main.out
+++ b/cli/tests/testdata/npm/cjs_with_deps/main.out
@@ -1,5 +1,7 @@
-Download http://localhost:4545/npm/registry/chai
Download http://localhost:4545/npm/registry/chalk
+Download http://localhost:4545/npm/registry/chai
+Download http://localhost:4545/npm/registry/ansi-styles
+Download http://localhost:4545/npm/registry/supports-color
Download http://localhost:4545/npm/registry/assertion-error
Download http://localhost:4545/npm/registry/check-error
Download http://localhost:4545/npm/registry/deep-eql
@@ -7,8 +9,6 @@ Download http://localhost:4545/npm/registry/get-func-name
Download http://localhost:4545/npm/registry/loupe
Download http://localhost:4545/npm/registry/pathval
Download http://localhost:4545/npm/registry/type-detect
-Download http://localhost:4545/npm/registry/ansi-styles
-Download http://localhost:4545/npm/registry/supports-color
Download http://localhost:4545/npm/registry/color-convert
Download http://localhost:4545/npm/registry/has-flag
Download http://localhost:4545/npm/registry/color-name
diff --git a/cli/tests/testdata/npm/cjs_with_deps/main_info.out b/cli/tests/testdata/npm/cjs_with_deps/main_info.out
index 345583a90..cf84197e1 100644
--- a/cli/tests/testdata/npm/cjs_with_deps/main_info.out
+++ b/cli/tests/testdata/npm/cjs_with_deps/main_info.out
@@ -4,19 +4,19 @@ dependencies: 14 unique
size: [WILDCARD]
file:///[WILDCARD]/npm/cjs_with_deps/main.js ([WILDCARD])
-├─┬ npm:chai@4.3 - 4.3.6 ([WILDCARD])
-│ ├── npm:assertion-error@1.1.0 ([WILDCARD])
-│ ├── npm:check-error@1.0.2 ([WILDCARD])
-│ ├─┬ npm:deep-eql@3.0.1 ([WILDCARD])
-│ │ └── npm:type-detect@4.0.8 ([WILDCARD])
-│ ├── npm:get-func-name@2.0.0 ([WILDCARD])
-│ ├─┬ npm:loupe@2.3.4 ([WILDCARD])
-│ │ └── npm:get-func-name@2.0.0 ([WILDCARD])
-│ ├── npm:pathval@1.1.1 ([WILDCARD])
-│ └── npm:type-detect@4.0.8 ([WILDCARD])
-└─┬ npm:chalk@4 - 4.1.2 ([WILDCARD])
- ├─┬ npm:ansi-styles@4.3.0 ([WILDCARD])
- │ └─┬ npm:color-convert@2.0.1 ([WILDCARD])
- │ └── npm:color-name@1.1.4 ([WILDCARD])
- └─┬ npm:supports-color@7.2.0 ([WILDCARD])
- └── npm:has-flag@4.0.0 ([WILDCARD])
+├─┬ npm:chalk@4.1.2 ([WILDCARD])
+│ ├─┬ npm:ansi-styles@4.3.0 ([WILDCARD])
+│ │ └─┬ npm:color-convert@2.0.1 ([WILDCARD])
+│ │ └── npm:color-name@1.1.4 ([WILDCARD])
+│ └─┬ npm:supports-color@7.2.0 ([WILDCARD])
+│ └── npm:has-flag@4.0.0 ([WILDCARD])
+└─┬ npm:chai@4.3.6 ([WILDCARD])
+ ├── npm:assertion-error@1.1.0 ([WILDCARD])
+ ├── npm:check-error@1.0.2 ([WILDCARD])
+ ├─┬ npm:deep-eql@3.0.1 ([WILDCARD])
+ │ └── npm:type-detect@4.0.8 ([WILDCARD])
+ ├── npm:get-func-name@2.0.0 ([WILDCARD])
+ ├─┬ npm:loupe@2.3.4 ([WILDCARD])
+ │ └── npm:get-func-name@2.0.0 ([WILDCARD])
+ ├── npm:pathval@1.1.1 ([WILDCARD])
+ └── npm:type-detect@4.0.8 ([WILDCARD])
diff --git a/cli/tests/testdata/npm/cjs_with_deps/main_info_json.out b/cli/tests/testdata/npm/cjs_with_deps/main_info_json.out
index bc7b9e162..e2a659a42 100644
--- a/cli/tests/testdata/npm/cjs_with_deps/main_info_json.out
+++ b/cli/tests/testdata/npm/cjs_with_deps/main_info_json.out
@@ -4,43 +4,43 @@
],
"modules": [
{
+ "kind": "esm",
"dependencies": [
{
- "specifier": "npm:chai@4.3",
+ "specifier": "npm:chalk@4",
"code": {
- "specifier": "npm:chai@4.3",
+ "specifier": "npm:chalk@4",
"span": {
"start": {
- "line": 1,
- "character": 23
+ "line": 0,
+ "character": 18
},
"end": {
- "line": 1,
- "character": 37
+ "line": 0,
+ "character": 31
}
}
},
- "npmPackage": "chai@4.3.6"
+ "npmPackage": "chalk@4.1.2"
},
{
- "specifier": "npm:chalk@4",
+ "specifier": "npm:chai@4.3",
"code": {
- "specifier": "npm:chalk@4",
+ "specifier": "npm:chai@4.3",
"span": {
"start": {
- "line": 0,
- "character": 18
+ "line": 1,
+ "character": 23
},
"end": {
- "line": 0,
- "character": 31
+ "line": 1,
+ "character": 37
}
}
},
- "npmPackage": "chalk@4.1.2"
+ "npmPackage": "chai@4.3.6"
}
],
- "kind": "esm",
"local": "[WILDCARD]main.js",
"emit": null,
"map": null,
@@ -49,7 +49,10 @@
"specifier": "[WILDCARD]/main.js"
}
],
- "redirects": {},
+ "redirects": {
+ "npm:chai@4.3": "npm:chai@4.3.6",
+ "npm:chalk@4": "npm:chalk@4.1.2"
+ },
"npmPackages": {
"ansi-styles@4.3.0": {
"name": "ansi-styles",