github-issue-tower-defence-management 1.174.1 → 1.174.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/bin/domain/usecases/normalizeReportBody.js +1 -1
- package/bin/domain/usecases/normalizeReportBody.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/usecases/extractNextStepAgent.test.ts +8 -0
- package/src/domain/usecases/normalizeReportBody.test.ts +24 -0
- package/src/domain/usecases/normalizeReportBody.ts +1 -1
- package/types/domain/usecases/normalizeReportBody.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.174.2](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.174.1...v1.174.2) (2026-08-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **preparation:** read a report whose code fences use CRLF line endings ([#1720](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1720)) ([6871315](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/commit/6871315075593fc2c6a78a28bd7195c82b9299e9)), closes [#1719](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/issues/1719)
|
|
7
|
+
|
|
1
8
|
## [1.174.1](https://github.com/HiromiShikata/npm-cli-github-issue-tower-defence-management/compare/v1.174.0...v1.174.1) (2026-08-24)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.normalizeReportBody = void 0;
|
|
4
|
-
const normalizeReportBody = (body) => body.replace(/\\`/g, '`');
|
|
4
|
+
const normalizeReportBody = (body) => body.replace(/\\`/g, '`').replace(/\r\n/g, '\n');
|
|
5
5
|
exports.normalizeReportBody = normalizeReportBody;
|
|
6
6
|
//# sourceMappingURL=normalizeReportBody.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeReportBody.js","sourceRoot":"","sources":["../../../src/domain/usecases/normalizeReportBody.ts"],"names":[],"mappings":";;;AAAO,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAU,EAAE,CAC1D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"normalizeReportBody.js","sourceRoot":"","sources":["../../../src/domain/usecases/normalizeReportBody.ts"],"names":[],"mappings":";;;AAAO,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAU,EAAE,CAC1D,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AADtC,QAAA,mBAAmB,uBACmB"}
|
package/package.json
CHANGED
|
@@ -17,6 +17,14 @@ describe('extractNextStepAgent', () => {
|
|
|
17
17
|
).toBe('developer');
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
+
it('returns the declared agent when the report body uses CRLF line endings', () => {
|
|
21
|
+
expect(
|
|
22
|
+
extractNextStepAgent(
|
|
23
|
+
'From: :robot: agent (model)\r\n\r\n```json\r\n{ "pullRequestRequired": false, "nextStepAgent": "developer" }\r\n```\r\n\r\nbody text\r\n',
|
|
24
|
+
),
|
|
25
|
+
).toBe('developer');
|
|
26
|
+
});
|
|
27
|
+
|
|
20
28
|
it('returns null when the report declares no agent', () => {
|
|
21
29
|
expect(
|
|
22
30
|
extractNextStepAgent(
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { normalizeReportBody } from './normalizeReportBody';
|
|
2
|
+
|
|
3
|
+
describe('normalizeReportBody', () => {
|
|
4
|
+
it('unescapes backslash escaped code fence backticks', () => {
|
|
5
|
+
expect(normalizeReportBody('\\`\\`\\`json\n{}\n\\`\\`\\`')).toBe(
|
|
6
|
+
'```json\n{}\n```',
|
|
7
|
+
);
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('rewrites CRLF line endings to LF so fence matching is line ending agnostic', () => {
|
|
11
|
+
expect(normalizeReportBody('```json\r\n{}\r\n```')).toBe(
|
|
12
|
+
'```json\n{}\n```',
|
|
13
|
+
);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('leaves a body that uses LF and unescaped fences unchanged', () => {
|
|
17
|
+
const body = 'From: :robot: agent (model)\n\n```json\n{}\n```\n';
|
|
18
|
+
expect(normalizeReportBody(body)).toBe(body);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('leaves a lone carriage return that is not part of a line ending in place', () => {
|
|
22
|
+
expect(normalizeReportBody('a\rb')).toBe('a\rb');
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const normalizeReportBody = (body: string): string =>
|
|
2
|
-
body.replace(/\\`/g, '`');
|
|
2
|
+
body.replace(/\\`/g, '`').replace(/\r\n/g, '\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizeReportBody.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/normalizeReportBody.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"normalizeReportBody.d.ts","sourceRoot":"","sources":["../../../src/domain/usecases/normalizeReportBody.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,MACD,CAAC"}
|