Repository navigation
feat(middleware-code-coverage)!: Support UI5 CLI v5, Input Source Maps and TypeScript - #619
Merged
Merged
Conversation
devtomtom
force-pushed
the
poc-rework-middleware-code-coverage
branch
2 times, most recently
from
October 19, 2026 09:46
31b4e2f to
596ac88
Compare
devtomtom
force-pushed
the
poc-rework-middleware-code-coverage
branch
from
October 19, 2026 11:20
bd97294 to
aff646c
Compare
d3xter666
reviewed
Oct 20, 2026
d3xter666
left a comment
Member
There was a problem hiding this comment.
The solution works as expected and I have tested the scenarios in the fixtures and whether they provide coverage and correct paths to the files.
As this is a breaking change it's worth mentioning why is it breaking.
For exmaple: specVersion 5 is not available in @ui5/cli version 4 as well as builtResources
matz3
reviewed
Oct 22, 2026
matz3
left a comment
Member
There was a problem hiding this comment.
Just a first review, but looks very good so far 👍🏻
I have tested it locally on macOS and want to test on Windows.
devtomtom
force-pushed
the
poc-rework-middleware-code-coverage
branch
from
October 23, 2026 13:50
f1943e6 to
c2fc717
Compare
Member
I also tested on Windows, incl. TypeScript and it works as expected. Rewriting the paths to strip the drive (e.g. |
devtomtom
force-pushed
the
poc-rework-middleware-code-coverage
branch
3 times, most recently
from
October 27, 2026 07:58
ff08257 to
97a718e
Compare
devtomtom
force-pushed
the
poc-rework-middleware-code-coverage
branch
from
October 27, 2026 15:31
890745c to
ec6cc28
Compare
…dle handling and source maps BREAKING CHANGE: The middleware uses specVersion 5.0 which requires UI5 CLI v5 or higher. - Coverage against the build output. Instead of instrumenting source resources, the middleware reads from builtResources (root project + dependencies). The UI5 runtime loads each covered module individually as its unminified -dbg variant; the middleware instruments that -dbg source for faithful per-line coverage, falling back to the runtime file when no -dbg exists (minify disabled, or -dbg requested directly), and reports everything under the runtime path so coverage keys line up with what the client selects. - Bundle handling. Preload bundles (*-preload.js, etc.) are never instrumented — a concatenated bundle corrupts coverage and its indexed source map crashes istanbul. They are served verbatim by the middleware. - Source maps / TypeScript. When a module carries a sourceMappingURL (inline data- URI or a sibling .map), the middleware feeds istanbul the input source map so coverage is attributed to the original source — e.g. a TypeScript project's -dbg output maps back to the .ts. Related UI5 runtime change: UI5/openui5@8baf315. JIRA: CPOUI5FOUNDATION-1350 JIRA: CPOUI5FOUNDATION-1203
devtomtom
force-pushed
the
poc-rework-middleware-code-coverage
branch
from
October 27, 2026 15:40
ec6cc28 to
22be0d5
Compare
matz3
approved these changes
Oct 27, 2026
devtomtom
pushed a commit
that referenced
this pull request
Oct 29, 2026
🚜 New release prepared --- ## [3.0.0-alpha.1](middleware-code-coverage-v3.0.0-alpha.0...middleware-code-coverage-v3.0.0-alpha.1) (2026-10-29) ### ⚠ BREAKING CHANGES * **middleware-code-coverage:** The middleware uses specVersion 5.0 and requires UI5 CLI v5 or higher. * **middleware-code-coverage:** UI5 Middleware Code Coverage supports now "^22.22.3 || ^24.15.0 || >=26.0.0". - ci: Align workflow test node version - ci: Use Node 22.22.3 to avoid registerHooks load-hook bug, fixed in 22.22.3 * Support for older Node.js has been dropped. Only Node.js 20.11.x and >=22.0.0 as well as npm v8 or higher are supported. ### Features * **middleware-code-coverage:** Set minimal required Node version "22.22.3" ([292fc66](292fc66)) * **middleware-code-coverage:** Support UI5 CLI v5, Input Source Maps and TypeScript ([#619](#619)) ([5cf6dfe](5cf6dfe)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Reworks @ui5/middleware-code-coverage to support UI5 CLI v5. The middleware now instruments the build output exposed through the new builtResources reader (Specification Version 5.0+), handles preload bundles and source maps.
What changed
Coverage against the build output. Instead of instrumenting source resources, the middleware reads from builtResources (root project + dependencies). The UI5 runtime loads each covered module individually as its unminified -dbg variant; the middleware instruments that -dbg source for faithful per-line coverage, falling back to the runtime file when no -dbg exists (minify disabled, or -dbg requested directly), and reports everything under the runtime path so coverage keys line up with what the client selects.
Bundle handling. Preload bundles (*-preload.js, etc.) are never instrumented — a concatenated bundle corrupts coverage and its indexed source map crashes istanbul. They are served verbatim by the middleware.
Source maps / TypeScript. When a module carries a sourceMappingURL (inline data-URI or a sibling .map), the middleware feeds istanbul the input source map so coverage is attributed to the original source — e.g. a TypeScript project's -dbg output maps back to the .ts.
Fixes: #189
Related UI5 runtime change:
UI5/openui5@8baf315
JIRA: CPOUI5FOUNDATION-1350
JIRA: CPOUI5FOUNDATION-1203