[PR #2728] [MERGED] fix(javascript): preserve asterisks in block source-map URLs #5347

Closed
opened 2026-10-31 01:05:54 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2728
Author: @chqcjq
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @morluto

Base: main ← Head: fix/block-source-map-asterisks


📝 Commits (2)

  • b75f56f fix(javascript): preserve asterisks in block source-map URLs
  • be6cb8d chore(ci): merge current main verification fixes

📊 Changes

3 files changed (+131 additions, -6 deletions)

View changed files

📝 src/domain/javascript/javascriptStaticAnalysisCalls.ts (+7 -4)
📝 src/domain/javascript/javascriptStaticAnalysisSourceMaps.test.ts (+25 -2)
➕ tests/acceptance/applications/blockSourceMapCli.test.ts (+99 -0)

📄 Description

Fixes #2662.

Supported block source-map annotations currently truncate URLs at any asterisk, so /*# sourceMappingURL=app*part.js.map */ records app and cannot link the inventoried map. Use the parser's comment boundary to exclude only the closing */, then apply the existing whitespace terminator. This preserves internal, leading and trailing asterisks, declaration ranges, and the existing line-comment behavior.

The regression suite covers modern/legacy blocks, adjacent closing delimiters, code-preceded comments, Unicode whitespace and line-comment controls. Public CLI and stdio MCP tests inspect an owned ASAR containing the exact app*part.js.map name and verify the complete declaration, SHA-256, source range, available map and maps_to edge. The ASAR fixture avoids relying on filesystem support for asterisks on Windows; it never executes target JavaScript.

Validation on Windows x64 / Node 24.18.0:

  • Both public regressions fail before the fix because the complete declaration is absent; parser regressions reproduce truncation and lost leading-asterisk declarations.
  • 42 tests pass after the fix across the parser and public CLI/MCP suites.
  • npm run check:ci, npm run docs:check, and npm run verify:test-discovery pass (1,044 test files).

No Electron/browser process or native analysis engine was exercised. The attempted local Codex review could not start due to a local features configuration type error; no automated local-review pass is claimed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/2728 **Author:** [@chqcjq](https://github.com/chqcjq) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `fix/block-source-map-asterisks` --- ### 📝 Commits (2) - [`b75f56f`](https://github.com/morluto/rea/commit/b75f56f1f8a159f4f4a26528cd5cd1fac5789140) fix(javascript): preserve asterisks in block source-map URLs - [`be6cb8d`](https://github.com/morluto/rea/commit/be6cb8d75ea2dbf586a52a26eb80812d8e64665c) chore(ci): merge current main verification fixes ### 📊 Changes **3 files changed** (+131 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascript/javascriptStaticAnalysisCalls.ts` (+7 -4) 📝 `src/domain/javascript/javascriptStaticAnalysisSourceMaps.test.ts` (+25 -2) ➕ `tests/acceptance/applications/blockSourceMapCli.test.ts` (+99 -0) </details> ### 📄 Description Fixes #2662. Supported block source-map annotations currently truncate URLs at any asterisk, so `/*# sourceMappingURL=app*part.js.map */` records `app` and cannot link the inventoried map. Use the parser's comment boundary to exclude only the closing `*/`, then apply the existing whitespace terminator. This preserves internal, leading and trailing asterisks, declaration ranges, and the existing line-comment behavior. The regression suite covers modern/legacy blocks, adjacent closing delimiters, code-preceded comments, Unicode whitespace and line-comment controls. Public CLI and stdio MCP tests inspect an owned ASAR containing the exact `app*part.js.map` name and verify the complete declaration, SHA-256, source range, available map and `maps_to` edge. The ASAR fixture avoids relying on filesystem support for asterisks on Windows; it never executes target JavaScript. Validation on Windows x64 / Node 24.18.0: - Both public regressions fail before the fix because the complete declaration is absent; parser regressions reproduce truncation and lost leading-asterisk declarations. - 42 tests pass after the fix across the parser and public CLI/MCP suites. - `npm run check:ci`, `npm run docs:check`, and `npm run verify:test-discovery` pass (1,044 test files). No Electron/browser process or native analysis engine was exercised. The attempted local Codex review could not start due to a local `features` configuration type error; no automated local-review pass is claimed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:05:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5347
No description provided.