diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-10-31 10:25:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 10:25:46 -0400 |
commit | cb08b4683fc3a8feadc4a7590dc2db922ca3a6ed (patch) | |
tree | f5a7d63d351a22742e485da6e8726c58ed88c1eb /cli/tests/testdata | |
parent | c962cd424190d094b79eb7697a1453d6d87c37a9 (diff) |
feat(unstable/npm): `deno info --json` support for npm specifiers (#16472)
Diffstat (limited to 'cli/tests/testdata')
-rw-r--r-- | cli/tests/testdata/info/076_info_json_deps_order.out | 3 | ||||
-rw-r--r-- | cli/tests/testdata/info/json_output/main.out | 3 | ||||
-rw-r--r-- | cli/tests/testdata/npm/cjs_with_deps/main_info.out (renamed from cli/tests/testdata/npm/cjs_with_deps/main.info.out) | 0 | ||||
-rw-r--r-- | cli/tests/testdata/npm/cjs_with_deps/main_info_json.out | 146 | ||||
-rw-r--r-- | cli/tests/testdata/npm/info/chalk.out (renamed from cli/tests/testdata/npm/deno_info_chalk.out) | 0 | ||||
-rw-r--r-- | cli/tests/testdata/npm/info/chalk_json.out | 54 |
6 files changed, 204 insertions, 2 deletions
diff --git a/cli/tests/testdata/info/076_info_json_deps_order.out b/cli/tests/testdata/info/076_info_json_deps_order.out index db890ef02..98b5d5d50 100644 --- a/cli/tests/testdata/info/076_info_json_deps_order.out +++ b/cli/tests/testdata/info/076_info_json_deps_order.out @@ -159,5 +159,6 @@ "specifier": "file://[WILDCARD]/recursive_imports/common.ts" } ], - "redirects": {} + "redirects": {}, + "npmPackages": {} } diff --git a/cli/tests/testdata/info/json_output/main.out b/cli/tests/testdata/info/json_output/main.out index 124fc7351..aaef028c0 100644 --- a/cli/tests/testdata/info/json_output/main.out +++ b/cli/tests/testdata/info/json_output/main.out @@ -86,5 +86,6 @@ "specifier": "file://[WILDCARD]/subdir/subdir2/mod2.ts" } ], - "redirects": {} + "redirects": {}, + "npmPackages": {} } 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..345583a90 100644 --- a/cli/tests/testdata/npm/cjs_with_deps/main.info.out +++ b/cli/tests/testdata/npm/cjs_with_deps/main_info.out 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 new file mode 100644 index 000000000..bc7b9e162 --- /dev/null +++ b/cli/tests/testdata/npm/cjs_with_deps/main_info_json.out @@ -0,0 +1,146 @@ +{ + "roots": [ + "file://[WILDCARD]/main.js" + ], + "modules": [ + { + "dependencies": [ + { + "specifier": "npm:chai@4.3", + "code": { + "specifier": "npm:chai@4.3", + "span": { + "start": { + "line": 1, + "character": 23 + }, + "end": { + "line": 1, + "character": 37 + } + } + }, + "npmPackage": "chai@4.3.6" + }, + { + "specifier": "npm:chalk@4", + "code": { + "specifier": "npm:chalk@4", + "span": { + "start": { + "line": 0, + "character": 18 + }, + "end": { + "line": 0, + "character": 31 + } + } + }, + "npmPackage": "chalk@4.1.2" + } + ], + "kind": "esm", + "local": "[WILDCARD]main.js", + "emit": null, + "map": null, + "size": 325, + "mediaType": "JavaScript", + "specifier": "[WILDCARD]/main.js" + } + ], + "redirects": {}, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ] + }, + "assertion-error@1.1.0": { + "name": "assertion-error", + "version": "1.1.0", + "dependencies": [] + }, + "chai@4.3.6": { + "name": "chai", + "version": "4.3.6", + "dependencies": [ + "assertion-error@1.1.0", + "check-error@1.0.2", + "deep-eql@3.0.1", + "get-func-name@2.0.0", + "loupe@2.3.4", + "pathval@1.1.1", + "type-detect@4.0.8" + ] + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ] + }, + "check-error@1.0.2": { + "name": "check-error", + "version": "1.0.2", + "dependencies": [] + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ] + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [] + }, + "deep-eql@3.0.1": { + "name": "deep-eql", + "version": "3.0.1", + "dependencies": [ + "type-detect@4.0.8" + ] + }, + "get-func-name@2.0.0": { + "name": "get-func-name", + "version": "2.0.0", + "dependencies": [] + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [] + }, + "loupe@2.3.4": { + "name": "loupe", + "version": "2.3.4", + "dependencies": [ + "get-func-name@2.0.0" + ] + }, + "pathval@1.1.1": { + "name": "pathval", + "version": "1.1.1", + "dependencies": [] + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ] + }, + "type-detect@4.0.8": { + "name": "type-detect", + "version": "4.0.8", + "dependencies": [] + } + } +} diff --git a/cli/tests/testdata/npm/deno_info_chalk.out b/cli/tests/testdata/npm/info/chalk.out index 89ea05e71..89ea05e71 100644 --- a/cli/tests/testdata/npm/deno_info_chalk.out +++ b/cli/tests/testdata/npm/info/chalk.out diff --git a/cli/tests/testdata/npm/info/chalk_json.out b/cli/tests/testdata/npm/info/chalk_json.out new file mode 100644 index 000000000..f6673d032 --- /dev/null +++ b/cli/tests/testdata/npm/info/chalk_json.out @@ -0,0 +1,54 @@ +{ + "roots": [ + "npm:chalk@4" + ], + "modules": [ + { + "kind": "npm", + "specifier": "npm:chalk@4", + "npmPackage": "chalk@4.1.2" + } + ], + "redirects": {}, + "npmPackages": { + "ansi-styles@4.3.0": { + "name": "ansi-styles", + "version": "4.3.0", + "dependencies": [ + "color-convert@2.0.1" + ] + }, + "chalk@4.1.2": { + "name": "chalk", + "version": "4.1.2", + "dependencies": [ + "ansi-styles@4.3.0", + "supports-color@7.2.0" + ] + }, + "color-convert@2.0.1": { + "name": "color-convert", + "version": "2.0.1", + "dependencies": [ + "color-name@1.1.4" + ] + }, + "color-name@1.1.4": { + "name": "color-name", + "version": "1.1.4", + "dependencies": [] + }, + "has-flag@4.0.0": { + "name": "has-flag", + "version": "4.0.0", + "dependencies": [] + }, + "supports-color@7.2.0": { + "name": "supports-color", + "version": "7.2.0", + "dependencies": [ + "has-flag@4.0.0" + ] + } + } +} |