Use objects instead of bools for markers in package.json

This commit is contained in:
Laurențiu Nicola 2021-06-15 09:32:53 +03:00
parent 447d849c9e
commit 41949748a6
3 changed files with 6 additions and 6 deletions

View File

@ -1062,8 +1062,8 @@ fn generate_package_json_config() {
let package_json_path = project_root().join("editors/code/package.json"); let package_json_path = project_root().join("editors/code/package.json");
let mut package_json = fs::read_to_string(&package_json_path).unwrap(); let mut package_json = fs::read_to_string(&package_json_path).unwrap();
let start_marker = " \"$generated-start\": false,\n"; let start_marker = " \"$generated-start\": {},\n";
let end_marker = " \"$generated-end\": false\n"; let end_marker = " \"$generated-end\": {}\n";
let start = package_json.find(start_marker).unwrap() + start_marker.len(); let start = package_json.find(start_marker).unwrap() + start_marker.len();
let end = package_json.find(end_marker).unwrap(); let end = package_json.find(end_marker).unwrap();

View File

@ -389,7 +389,7 @@
"default": {}, "default": {},
"markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`" "markdownDescription": "Optional settings passed to the debug engine. Example: `{ \"lldb\": { \"terminal\":\"external\"} }`"
}, },
"$generated-start": false, "$generated-start": {},
"rust-analyzer.assist.importGranularity": { "rust-analyzer.assist.importGranularity": {
"markdownDescription": "How imports should be grouped into use statements.", "markdownDescription": "How imports should be grouped into use statements.",
"default": "crate", "default": "crate",
@ -841,7 +841,7 @@
"Search for all symbols kinds" "Search for all symbols kinds"
] ]
}, },
"$generated-end": false "$generated-end": {}
} }
}, },
"problemPatterns": [ "problemPatterns": [

View File

@ -45,8 +45,8 @@ fn dist_client(version: &str, release_tag: &str) -> Result<()> {
patch patch
.replace(r#""version": "0.4.0-dev""#, &format!(r#""version": "{}""#, version)) .replace(r#""version": "0.4.0-dev""#, &format!(r#""version": "{}""#, version))
.replace(r#""releaseTag": null"#, &format!(r#""releaseTag": "{}""#, release_tag)) .replace(r#""releaseTag": null"#, &format!(r#""releaseTag": "{}""#, release_tag))
.replace(r#""$generated-start": false,"#, "") .replace(r#""$generated-start": {},"#, "")
.replace(",\n \"$generated-end\": false", ""); .replace(",\n \"$generated-end\": {}", "");
if nightly { if nightly {
patch.replace( patch.replace(