mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 21:23:45 +00:00
fix(artifacts): apply XML end-of-line handling to nuspec and POM text (#11846)
The .nuspec, its OPC relationships and the Maven POM now parse with lineEndings normalize, as XML 1.0 section 2.11 and the NuGet and Maven readers do. Text from CRLF files no longer keeps carriage returns.
This commit is contained in:
6 files changed
+42
-5
No files matched your search
@@ -415,6 +415,19 @@ it("removes credentials from POM property values", () => {
|
||||
expect(JSON.stringify(report)).not.toContain("password");
|
||||
});
|
||||
|
||||
it("applies XML end-of-line handling to POM text", () => {
|
||||
const report = parse(
|
||||
"<project>\r\n <modelVersion>4.0.0</modelVersion>\r\n <artifactId>demo</artifactId>\r\n <properties>\r\n <banner>first\r\nsecond\rthird</banner>\r\n </properties>\r\n</project>\r\n",
|
||||
);
|
||||
expect(report.properties).toEqual([
|
||||
{
|
||||
name: "banner",
|
||||
value: "first\nsecond\nthird",
|
||||
value_credentials_redacted: false,
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("lists properties in packaging, scope, type and classifier", () => {
|
||||
const report = parse(`<project>
|
||||
<groupId>com.example</groupId>
|
||||
|
||||
Reference in new issue
Block a user