summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out52
-rw-r--r--tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out52
-rw-r--r--tests/specs/npm/info_cli_chalk_json/info/chalk_json.out18
-rw-r--r--tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out30
-rw-r--r--tests/specs/npm/npmrc/__test__.jsonc4
-rw-r--r--tests/specs/npm/npmrc/info.out87
6 files changed, 202 insertions, 41 deletions
diff --git a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out
index 137b9f8ce..2f7dde2d9 100644
--- a/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out
+++ b/tests/specs/npm/info_chalk_json/cjs_with_deps/main_info_json.out
@@ -46,6 +46,16 @@
"size": 325,
"mediaType": "JavaScript",
"specifier": "[WILDCARD]/main.js"
+ },
+ {
+ "kind": "npm",
+ "specifier": "npm:/chai@4.3.6",
+ "npmPackage": "chai@4.3.6"
+ },
+ {
+ "kind": "npm",
+ "specifier": "npm:/chalk@4.1.2",
+ "npmPackage": "chalk@4.1.2"
}
],
"redirects": {
@@ -58,12 +68,14 @@
"version": "4.3.0",
"dependencies": [
"color-convert@2.0.1"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"assertion-error@1.1.0": {
"name": "assertion-error",
"version": "1.1.0",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"chai@4.3.6": {
"name": "chai",
@@ -76,7 +88,8 @@
"loupe@2.3.4",
"pathval@1.1.1",
"type-detect@4.0.8"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"chalk@4.1.2": {
"name": "chalk",
@@ -84,65 +97,76 @@
"dependencies": [
"ansi-styles@4.3.0",
"supports-color@7.2.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"check-error@1.0.2": {
"name": "check-error",
"version": "1.0.2",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"color-convert@2.0.1": {
"name": "color-convert",
"version": "2.0.1",
"dependencies": [
"color-name@1.1.4"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"color-name@1.1.4": {
"name": "color-name",
"version": "1.1.4",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"deep-eql@3.0.1": {
"name": "deep-eql",
"version": "3.0.1",
"dependencies": [
"type-detect@4.0.8"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"get-func-name@2.0.0": {
"name": "get-func-name",
"version": "2.0.0",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"has-flag@4.0.0": {
"name": "has-flag",
"version": "4.0.0",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"loupe@2.3.4": {
"name": "loupe",
"version": "2.3.4",
"dependencies": [
"get-func-name@2.0.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"pathval@1.1.1": {
"name": "pathval",
"version": "1.1.1",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"supports-color@7.2.0": {
"name": "supports-color",
"version": "7.2.0",
"dependencies": [
"has-flag@4.0.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"type-detect@4.0.8": {
"name": "type-detect",
"version": "4.0.8",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
}
}
}
diff --git a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out
index 137b9f8ce..2f7dde2d9 100644
--- a/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out
+++ b/tests/specs/npm/info_chalk_json_node_modules_dir/cjs_with_deps/main_info_json.out
@@ -46,6 +46,16 @@
"size": 325,
"mediaType": "JavaScript",
"specifier": "[WILDCARD]/main.js"
+ },
+ {
+ "kind": "npm",
+ "specifier": "npm:/chai@4.3.6",
+ "npmPackage": "chai@4.3.6"
+ },
+ {
+ "kind": "npm",
+ "specifier": "npm:/chalk@4.1.2",
+ "npmPackage": "chalk@4.1.2"
}
],
"redirects": {
@@ -58,12 +68,14 @@
"version": "4.3.0",
"dependencies": [
"color-convert@2.0.1"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"assertion-error@1.1.0": {
"name": "assertion-error",
"version": "1.1.0",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"chai@4.3.6": {
"name": "chai",
@@ -76,7 +88,8 @@
"loupe@2.3.4",
"pathval@1.1.1",
"type-detect@4.0.8"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"chalk@4.1.2": {
"name": "chalk",
@@ -84,65 +97,76 @@
"dependencies": [
"ansi-styles@4.3.0",
"supports-color@7.2.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"check-error@1.0.2": {
"name": "check-error",
"version": "1.0.2",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"color-convert@2.0.1": {
"name": "color-convert",
"version": "2.0.1",
"dependencies": [
"color-name@1.1.4"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"color-name@1.1.4": {
"name": "color-name",
"version": "1.1.4",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"deep-eql@3.0.1": {
"name": "deep-eql",
"version": "3.0.1",
"dependencies": [
"type-detect@4.0.8"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"get-func-name@2.0.0": {
"name": "get-func-name",
"version": "2.0.0",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"has-flag@4.0.0": {
"name": "has-flag",
"version": "4.0.0",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"loupe@2.3.4": {
"name": "loupe",
"version": "2.3.4",
"dependencies": [
"get-func-name@2.0.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"pathval@1.1.1": {
"name": "pathval",
"version": "1.1.1",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"supports-color@7.2.0": {
"name": "supports-color",
"version": "7.2.0",
"dependencies": [
"has-flag@4.0.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"type-detect@4.0.8": {
"name": "type-detect",
"version": "4.0.8",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
}
}
}
diff --git a/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out b/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out
index 21fc7edf1..fd2aa9ab0 100644
--- a/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out
+++ b/tests/specs/npm/info_cli_chalk_json/info/chalk_json.out
@@ -19,7 +19,8 @@
"version": "4.3.0",
"dependencies": [
"color-convert@2.0.1"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"chalk@4.1.2": {
"name": "chalk",
@@ -27,31 +28,36 @@
"dependencies": [
"ansi-styles@4.3.0",
"supports-color@7.2.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"color-convert@2.0.1": {
"name": "color-convert",
"version": "2.0.1",
"dependencies": [
"color-name@1.1.4"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"color-name@1.1.4": {
"name": "color-name",
"version": "1.1.4",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"has-flag@4.0.0": {
"name": "has-flag",
"version": "4.0.0",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"supports-color@7.2.0": {
"name": "supports-color",
"version": "7.2.0",
"dependencies": [
"has-flag@4.0.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
}
}
}
diff --git a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out
index 46cc35c65..2ee6268f5 100644
--- a/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out
+++ b/tests/specs/npm/info_peer_deps_json/peer_deps_with_copied_folders/main_info_json.out
@@ -1,7 +1,7 @@
{
"version": 1,
"roots": [
- "[WILDCARD]/peer_deps_with_copied_folders/main.ts"
+ "file://[WILDCARD]/main.ts"
],
"modules": [
{
@@ -46,6 +46,16 @@
"size": 171,
"mediaType": "TypeScript",
"specifier": "file://[WILDCARD]/main.ts"
+ },
+ {
+ "kind": "npm",
+ "specifier": "npm:/@denotest/peer-dep-test-child@1.0.0",
+ "npmPackage": "@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0"
+ },
+ {
+ "kind": "npm",
+ "specifier": "npm:/@denotest/peer-dep-test-child@2.0.0",
+ "npmPackage": "@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0"
}
],
"redirects": {
@@ -59,7 +69,8 @@
"dependencies": [
"@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0",
"@denotest/peer-dep-test-peer@1.0.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"@denotest/peer-dep-test-child@2.0.0_@denotest+peer-dep-test-peer@2.0.0": {
"name": "@denotest/peer-dep-test-child",
@@ -67,31 +78,36 @@
"dependencies": [
"@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0",
"@denotest/peer-dep-test-peer@2.0.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@1.0.0": {
"name": "@denotest/peer-dep-test-grandchild",
"version": "1.0.0",
"dependencies": [
"@denotest/peer-dep-test-peer@1.0.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"@denotest/peer-dep-test-grandchild@1.0.0_@denotest+peer-dep-test-peer@2.0.0": {
"name": "@denotest/peer-dep-test-grandchild",
"version": "1.0.0",
"dependencies": [
"@denotest/peer-dep-test-peer@2.0.0"
- ]
+ ],
+ "registryUrl": "http://localhost:4260/"
},
"@denotest/peer-dep-test-peer@1.0.0": {
"name": "@denotest/peer-dep-test-peer",
"version": "1.0.0",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
},
"@denotest/peer-dep-test-peer@2.0.0": {
"name": "@denotest/peer-dep-test-peer",
"version": "2.0.0",
- "dependencies": []
+ "dependencies": [],
+ "registryUrl": "http://localhost:4260/"
}
}
}
diff --git a/tests/specs/npm/npmrc/__test__.jsonc b/tests/specs/npm/npmrc/__test__.jsonc
index e7588a779..88ef2d810 100644
--- a/tests/specs/npm/npmrc/__test__.jsonc
+++ b/tests/specs/npm/npmrc/__test__.jsonc
@@ -13,6 +13,10 @@
"run_node_modules_dir": {
"args": "run --node-modules-dir=auto -A --quiet main.js",
"output": "main.out"
+ },
+ "info": {
+ "args": "info --node-modules-dir=auto --json main.js",
+ "output": "info.out"
}
}
}
diff --git a/tests/specs/npm/npmrc/info.out b/tests/specs/npm/npmrc/info.out
new file mode 100644
index 000000000..8f82b10c9
--- /dev/null
+++ b/tests/specs/npm/npmrc/info.out
@@ -0,0 +1,87 @@
+[UNORDERED_START]
+Download http://localhost:4262/@denotest2/basic
+Download http://localhost:4261/@denotest/basic
+Download http://localhost:4261/@denotest/basic/1.0.0.tgz
+Download http://localhost:4262/@denotest2/basic/1.0.0.tgz
+[UNORDERED_END]
+[UNORDERED_START]
+Initialize @denotest/basic@1.0.0
+Initialize @denotest2/basic@1.0.0
+[UNORDERED_END]
+{
+ "version": 1,
+ "roots": [
+ "file://[WILDCARD]/main.js"
+ ],
+ "modules": [
+ {
+ "kind": "esm",
+ "dependencies": [
+ {
+ "specifier": "@denotest/basic",
+ "code": {
+ "specifier": "npm:@denotest/basic@1.0.0",
+ "span": {
+ "start": {
+ "line": 0,
+ "character": 35
+ },
+ "end": {
+ "line": 0,
+ "character": 52
+ }
+ }
+ }
+ },
+ {
+ "specifier": "@denotest2/basic",
+ "code": {
+ "specifier": "npm:@denotest2/basic@1.0.0",
+ "span": {
+ "start": {
+ "line": 1,
+ "character": 22
+ },
+ "end": {
+ "line": 1,
+ "character": 40
+ }
+ }
+ }
+ }
+ ],
+ "local": "[WILDCARD]main.js",
+ "size": 192,
+ "mediaType": "JavaScript",
+ "specifier": "file://[WILDCARD]/main.js"
+ },
+ {
+ "kind": "npm",
+ "specifier": "npm:/@denotest/basic@1.0.0",
+ "npmPackage": "@denotest/basic@1.0.0"
+ },
+ {
+ "kind": "npm",
+ "specifier": "npm:/@denotest2/basic@1.0.0",
+ "npmPackage": "@denotest2/basic@1.0.0"
+ }
+ ],
+ "redirects": {
+ "npm:@denotest/basic@1.0.0": "npm:/@denotest/basic@1.0.0",
+ "npm:@denotest2/basic@1.0.0": "npm:/@denotest2/basic@1.0.0"
+ },
+ "npmPackages": {
+ "@denotest/basic@1.0.0": {
+ "name": "@denotest/basic",
+ "version": "1.0.0",
+ "dependencies": [],
+ "registryUrl": "http://localhost:4261/"
+ },
+ "@denotest2/basic@1.0.0": {
+ "name": "@denotest2/basic",
+ "version": "1.0.0",
+ "dependencies": [],
+ "registryUrl": "http://localhost:4262/"
+ }
+ }
+}