Skip to content

Offer CLI option to exclude/include tasks in UI5 server#1447

Open
RandomByte wants to merge 4 commits into
mainfrom
refactor/share-task-filter-options
Open

Offer CLI option to exclude/include tasks in UI5 server#1447
RandomByte wants to merge 4 commits into
mainfrom
refactor/share-task-filter-options

Conversation

@RandomByte

@RandomByte RandomByte commented Jul 6, 2026

Copy link
Copy Markdown
Member
  • refactor(project): Own the dev-server default task exclusions
  • refactor(server): Forward includedTasks/excludedTasks to graph.serve()
  • refactor(cli): Share --include-task / --exclude-task with 'ui5 serve'

JIRA: CPOUI5FOUNDATION-1276

@RandomByte RandomByte force-pushed the refactor/share-task-filter-options branch from 9c94ab3 to e701002 Compare July 6, 2026 09:39
@RandomByte RandomByte marked this pull request as ready for review July 6, 2026 14:22
@RandomByte RandomByte requested a review from a team July 6, 2026 14:22
@RandomByte RandomByte changed the title refactor/share task filter options Offer CLI option to exclude/include tasks in UI5 server Jul 6, 2026
Accept 'includedTasks' and 'excludedTasks' on serve()'s options and pass
them through to graph.serve() as-is. The hardcoded exclusion list that
used to live here (minify, generateLibraryPreload,
generateComponentPreload, generateBundle) is dropped: the dev server now
runs the same task set as a regular build unless the caller opts out via
'excludedTasks'.

Enables the follow-up 'ui5 serve --include-task' / '--exclude-task'
plumbing in @ui5/cli.
Both 'ui5 build' and 'ui5 serve' trigger a build internally and honour
the same task filters, but until now only 'build' exposed the CLI flags.
Add an 'applyBuildOptions(cli)' helper to lib/cli/options.js — same
pattern as the existing 'applyProjectConfigOptions' /
'applyWorkspaceOptions' — and call it from both commands.

'serve.handler' forwards the values into the server config under the API
names 'includedTasks' / 'excludedTasks' (mirroring 'build.handler').
Combined with the sibling refactor in @ui5/server, this means 'ui5 serve
--exclude-task buildThemes' or 'ui5 serve --include-task minify' now Do
The Right Thing.

Existing serve-command tests asserted deepEqual on the full config bag
passed to @ui5/server.serve — those blocks now include
'includedTasks: undefined, excludedTasks: undefined'. A new test covers
the flags flowing through the handler.
@RandomByte RandomByte force-pushed the refactor/share-task-filter-options branch 3 times, most recently from 4987642 to bc590b1 Compare July 8, 2026 09:09
@RandomByte RandomByte marked this pull request as draft July 8, 2026 09:38
The dev server no longer skips 'minify', 'generateLibraryPreload',
'generateComponentPreload', or 'generateBundle', so two main.js
assertions on application.a's built output need adjusting:

- /versionTest.js now carries the //# sourceMappingURL trailer appended
  by 'minify'.
- The root index of application.a lists 15 entries instead of 9: the
  extra six come from 'minify' (test-dbg.js, test.js.map,
  versionTest-dbg.js, versionTest.js.map) and 'generateComponentPreload'
  (Component-preload.js, Component-preload.js.map).
@RandomByte RandomByte force-pushed the refactor/share-task-filter-options branch from ccdeedb to 5290d1e Compare July 8, 2026 09:46
@RandomByte RandomByte marked this pull request as ready for review July 8, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant