-
Notifications
You must be signed in to change notification settings - Fork 83
refactor: Support of referencing legacy middlewares in UI5 CLI middleware configuration #1367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
d3xter666
merged 8 commits into
feat/incremental-build-4
from
remove-legacy-middlewares
May 18, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9c34836
refactor: Add fallback mechanism for removed middlewares
d3xter666 4bd8e92
refactor: Remove serveThemes and cleanup after it
d3xter666 6c27ed3
refactor: Cleanup redundant check
d3xter666 422db51
test: Add test cases
d3xter666 14c18e6
docs: Provide migration information
d3xter666 2cbfbb3
test: Stabilize tests for serving css
d3xter666 117f789
fix(server): Fix lint errors in test/lib/server/main.js
d3xter666 15326c7
fix(server): Improve error message and align tests with base branch
d3xter666 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -198,6 +198,27 @@ Delete the custom `test/Test.qunit.html` file from your test directory. This fil | |||||
| Depending on your project setup, you might need to update additional paths in configuration files or test runners to reflect the new structure. | ||||||
| The test suite is now served under the standard `/test-resources/` path with the component's full namespace (e.g. `/test-resources/sap/ui/demo/todo/testsuite.qunit.html`). | ||||||
|
|
||||||
| ## Removal of Standard Server Middleware | ||||||
|
|
||||||
| The following middleware has been removed from the [standard middlewares list](../pages/Server.md#standard-middleware): | ||||||
|
|
||||||
| * `serveThemes` — Theme compilation (LESS to CSS) is now handled by the `buildThemes` build task during the incremental build, rather than on-demand during runtime. The resulting CSS files are served via the `serveResources` middleware. This change improves performance through build-time compilation and caching while maintaining the same functionality. | ||||||
|
|
||||||
| **Backward Compatibility:** | ||||||
| If your project or any custom middleware references a removed middleware via `beforeMiddleware` or `afterMiddleware`, UI5 CLI will automatically remap the reference to the nearest remaining middleware and log a deprecation warning. Your custom middleware will still be executed in the expected order. | ||||||
|
|
||||||
| **What Changed:** | ||||||
| - Theme CSS files (`library.css`, `library-RTL.css`, etc.) are now **pre-built** during the incremental build | ||||||
| - Files are served via `serveResources` instead of being compiled on-demand | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||||||
| - The same CSS files are available at the same URLs as before | ||||||
|
|
||||||
| **Recommended Action:** | ||||||
| Update your `ui5.yaml` configuration to reference an existing middleware instead. | ||||||
|
|
||||||
| | Removed Middleware | Replacement Behavior | Recommended `afterMiddleware` | | ||||||
| | ------------------ | -------------------- | ----------------------------- | | ||||||
| | `serveThemes` | CSS files pre-built by `buildThemes` task and served via `serveResources` | `testRunner` | | ||||||
|
|
||||||
| ## Learn More | ||||||
|
|
||||||
| - [Project: Type `component`](../pages/Project#component) | ||||||
|
|
||||||
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @KlattG ,
Thank you for your review!
As the change is already merged, I have prepared a separate change to address this: #1393