mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
fix(info): move "version" field to top of json output (#25890)
This commit is contained in:
parent
543c687c34
commit
7cccb7422b
16 changed files with 20 additions and 16 deletions
|
@ -82,7 +82,11 @@ pub async fn info(
|
|||
if info_flags.json {
|
||||
let mut json_graph = serde_json::json!(graph);
|
||||
if let Some(output) = json_graph.as_object_mut() {
|
||||
output.insert("version".to_string(), JSON_SCHEMA_VERSION.into());
|
||||
output.shift_insert(
|
||||
0,
|
||||
"version".to_string(),
|
||||
JSON_SCHEMA_VERSION.into(),
|
||||
);
|
||||
}
|
||||
add_npm_packages_to_json(&mut json_graph, npm_resolver.as_ref());
|
||||
display::write_json_to_stdout(&json_graph)?;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file://[WILDCARD]/076_info_json_deps_order.ts"
|
||||
],
|
||||
|
@ -160,6 +161,5 @@
|
|||
}
|
||||
],
|
||||
"redirects": {},
|
||||
"version": 1,
|
||||
"npmPackages": {}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file://[WILDCARD]/json_output/main.ts"
|
||||
],
|
||||
|
@ -87,6 +88,5 @@
|
|||
}
|
||||
],
|
||||
"redirects": {},
|
||||
"version": 1,
|
||||
"npmPackages": {}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ Download http://localhost:4548/subdir/redirects/redirect1.js
|
|||
Download http://localhost:4546/subdir/redirects/redirect1.js
|
||||
Download http://localhost:4545/subdir/redirects/redirect1.js
|
||||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file:///[WILDLINE]/multiple_redirects/main.ts"
|
||||
],
|
||||
|
@ -43,6 +44,5 @@ Download http://localhost:4545/subdir/redirects/redirect1.js
|
|||
"http://localhost:4546/subdir/redirects/redirect1.js": "http://localhost:4545/subdir/redirects/redirect1.js",
|
||||
"http://localhost:4548/subdir/redirects/redirect1.js": "http://localhost:4546/subdir/redirects/redirect1.js"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file://[WILDCARD]/main.js"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:chai@4.3": "npm:/chai@4.3.6",
|
||||
"npm:chalk@4": "npm:/chalk@4.1.2"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"ansi-styles@4.3.0": {
|
||||
"name": "ansi-styles",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file://[WILDCARD]/main.js"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:chai@4.3": "npm:/chai@4.3.6",
|
||||
"npm:chalk@4": "npm:/chalk@4.1.2"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"ansi-styles@4.3.0": {
|
||||
"name": "ansi-styles",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file://[WILDCARD]/main.js"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:chai@4.3": "npm:/chai@4.3.6",
|
||||
"npm:chalk@4": "npm:/chalk@4.1.2"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"ansi-styles@4.3.0": {
|
||||
"name": "ansi-styles",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file://[WILDCARD]/main.js"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:chai@4.3": "npm:/chai@4.3.6",
|
||||
"npm:chalk@4": "npm:/chalk@4.1.2"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"ansi-styles@4.3.0": {
|
||||
"name": "ansi-styles",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file://[WILDCARD]/main.js"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:chai@4.3": "npm:/chai@4.3.6",
|
||||
"npm:chalk@4": "npm:/chalk@4.1.2"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"ansi-styles@4.3.0": {
|
||||
"name": "ansi-styles",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"npm:chalk@4"
|
||||
],
|
||||
|
@ -12,7 +13,6 @@
|
|||
"redirects": {
|
||||
"npm:chalk@4": "npm:/chalk@4.1.2"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"ansi-styles@4.3.0": {
|
||||
"name": "ansi-styles",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"npm:chalk@4"
|
||||
],
|
||||
|
@ -12,7 +13,6 @@
|
|||
"redirects": {
|
||||
"npm:chalk@4": "npm:/chalk@4.1.2"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"ansi-styles@4.3.0": {
|
||||
"name": "ansi-styles",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"[WILDCARD]/peer_deps_with_copied_folders/main.ts"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0",
|
||||
"npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": {
|
||||
"name": "@denotest/peer-dep-test-child",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"[WILDCARD]/peer_deps_with_copied_folders/main.ts"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0",
|
||||
"npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": {
|
||||
"name": "@denotest/peer-dep-test-child",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file://[WILDCARD]/main.js"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:chai@4.3": "npm:/chai@4.3.6",
|
||||
"npm:chalk@4": "npm:/chalk@4.1.2"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"ansi-styles@4.3.0": {
|
||||
"name": "ansi-styles",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"file://[WILDCARD]/main.js"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:chai@4.3": "npm:/chai@4.3.6",
|
||||
"npm:chalk@4": "npm:/chalk@4.1.2"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"ansi-styles@4.3.0": {
|
||||
"name": "ansi-styles",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"version": 1,
|
||||
"roots": [
|
||||
"[WILDCARD]/npm/peer_deps_with_copied_folders/main.ts"
|
||||
],
|
||||
|
@ -51,7 +52,6 @@
|
|||
"npm:@denotest/peer-dep-test-child@1": "npm:/@denotest/peer-dep-test-child@1.0.0",
|
||||
"npm:@denotest/peer-dep-test-child@2": "npm:/@denotest/peer-dep-test-child@2.0.0"
|
||||
},
|
||||
"version": 1,
|
||||
"npmPackages": {
|
||||
"@denotest/peer-dep-test-child@1.0.0_@denotest+peer-dep-test-peer@1.0.0": {
|
||||
"name": "@denotest/peer-dep-test-child",
|
||||
|
|
Loading…
Reference in a new issue