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 mut package_json = fs::read_to_string(&package_json_path).unwrap();
let start_marker = " \"$generated-start\": false,\n";
let end_marker = " \"$generated-end\": false\n";
let start_marker = " \"$generated-start\": {},\n";
let end_marker = " \"$generated-end\": {}\n";
let start = package_json.find(start_marker).unwrap() + start_marker.len();
let end = package_json.find(end_marker).unwrap();

View File

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

View File

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