Skip to content

refactor(cli): Consolidate UI5 data dir resolution into dataDir module - #1555

Merged
matz3 merged 1 commit into
mainfrom
refactor-datadir-consolidation
Aug 31, 2026
Merged

refactor(cli): Consolidate UI5 data dir resolution into dataDir module#1555
matz3 merged 1 commit into
mainfrom
refactor-datadir-consolidation

Conversation

@matz3

@matz3 matz3 commented Aug 28, 2026

Copy link
Copy Markdown
Member

Introduce lib/dataDir.js exposing getUi5DataDir, getUi5DataDirOrDefault and a formatPath helper that shortens home-directory paths to ~ for display. This consolidates the previously duplicated ui5DataDir resolution logic that framework utils and the cache command each carried their own copy of.

The cache command now resolves the data dir via getUi5DataDirOrDefault and lazily imports FrameworkCache and CacheManager, so the modules are not loaded on every CLI invocation. Displayed cache paths use formatPath.

This only consolidates resolution within the cli package; a general, cross-package cleanup remains tracked in PR #1456.

Introduce lib/dataDir.js exposing getUi5DataDir, getUi5DataDirOrDefault and a
formatPath helper that shortens home-directory paths to ~ for display. This
consolidates the previously duplicated ui5DataDir resolution logic that
framework utils and the cache command each carried their own copy of.

The cache command now resolves the data dir via getUi5DataDirOrDefault and
lazily imports FrameworkCache and CacheManager, so the modules are not
loaded on every CLI invocation. Displayed cache paths use formatPath.

This only consolidates resolution within the cli package; a general,
cross-package cleanup remains tracked in PR #1456.
@matz3
matz3 requested a review from a team August 28, 2026 14:33

@d3xter666 d3xter666 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@d3xter666
d3xter666 requested a review from a team August 31, 2026 10:07
@matz3
matz3 merged commit 0bb061a into main Aug 31, 2026
78 checks passed
@matz3
matz3 deleted the refactor-datadir-consolidation branch August 31, 2026 10:16
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.

2 participants