Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@
"path": "packages/cortex-rmcp/package.json",
"jsonpath": "$.binaryVersion"
},
"packages/cortex-rmcp/package.json"
{
"type": "json",
"path": "packages/cortex-rmcp/package.json",
"jsonpath": "$.version"
}
]
}
},
Expand Down
22 changes: 22 additions & 0 deletions tests/workflow_shapes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,28 @@ fn release_please_config_and_manifest_agree_with_components_toml() {
"release-please-config.json must declare an extra-files entry for {extra_file}"
);
}
let config_json: serde_json::Value =
serde_json::from_str(config).expect("release-please config must be valid JSON");
let extra_files = config_json["packages"]["."]["extra-files"]
.as_array()
.expect("root package must declare extra-files");
for jsonpath in ["$.version", "$.binaryVersion"] {
assert!(
extra_files.iter().any(|entry| {
entry["type"] == "json"
&& entry["path"] == "packages/cortex-rmcp/package.json"
&& entry["jsonpath"] == jsonpath
}),
"npm launcher {jsonpath} must use an explicit JSON updater"
);
}
assert!(
!extra_files
.iter()
.any(|entry| entry.as_str() == Some("packages/cortex-rmcp/package.json")),
"package.json must not use the implicit extra-file updater"
);

assert!(
manifest.contains("\".\""),
".release-please-manifest.json must track the root package"
Expand Down
Loading