Skip to content

Feature/code quality improvements#4211

Open
longieirl wants to merge 15 commits intomainfrom
feature/code-quality-improvements-and-branch-protection
Open

Feature/code quality improvements#4211
longieirl wants to merge 15 commits intomainfrom
feature/code-quality-improvements-and-branch-protection

Conversation

@longieirl
Copy link
Contributor

Summary

This PR contains comprehensive code quality improvements for the cf-deploy-config-writer package, including standardized JSDoc documentation, important bug fixes, and test updates to maintain compatibility with implementation changes.

@changeset-bot
Copy link

changeset-bot bot commented Feb 20, 2026

🦋 Changeset detected

Latest commit: 806fc63

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@sap-ux/cf-deploy-config-writer Patch
@sap-ux/cf-deploy-config-sub-generator Patch
@sap-ux/deploy-config-sub-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@longieirl longieirl marked this pull request as ready for review February 23, 2026 13:00
@longieirl longieirl requested a review from a team as a code owner February 23, 2026 13:00
cianmSAP
cianmSAP previously approved these changes Feb 24, 2026
Copy link
Contributor

@cianmSAP cianmSAP left a comment

Choose a reason for hiding this comment

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

Updates look good
Have not tested
Changeset present

longieirl and others added 13 commits March 2, 2026 14:55
- Add comprehensive unit tests for i18n module covering initialization and translation functions
- Simplify i18n initialization error handling by removing verbose async wrapper
- Errors are silently caught as writer still functions with fallback strings

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Replace require() with dynamic import() to comply with @typescript-eslint/no-require-imports rule and remove unnecessary eslint-disable comment.

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Priority 1 - JSDoc Standardization:
- Add comprehensive @throws documentation across all source files
- Enhance parameter descriptions with detailed context
- Standardize capitalization and formatting in JSDoc comments
- Document error conditions for key functions
- Add missing JSDoc for private methods

Priority 2 - Code Quality Improvements:
- Unify toMtaModuleName implementations (use canonical version from utils.ts)
- Fix error message i18n consistency (add error.noUI5AppFound key)
- Document CAPConfig empty interface design rationale
- Fix folder existence check in base-config.ts (use isMTAFound instead of fileExists)
- Remove unused imports

Files modified:
- src/utils.ts: Enhanced JSDoc, improved toMtaModuleName documentation
- src/mta-config/index.ts: Delegate to canonical toMtaModuleName, add @throws docs
- src/mta-config/mta.ts: Standardize JSDoc for public/private methods
- src/cf-writer/app-config.ts: Add @throws docs, use i18n for errors
- src/cf-writer/base-config.ts: Fix validation logic, improve JSDoc
- src/cf-writer/cap-config.ts: Add @throws documentation
- src/types/index.ts: Document CAPConfig interface purpose
- src/translations/cf-deploy-config-writer.i18n.json: Add error.noUI5AppFound key
Update test to match implementation changes where validation now uses
fs.existsSync via isMTAFound() instead of mem-fs editor's exists method.
Also update expected error message to reflect the specific mta.yaml check.
- Fix typos in README.md (ommit->omit, SAB->SAP, genereate->generate, serivce->service)
- Consolidate duplicate example sections in README
- Add comprehensive error handling documentation
- Add CAP project considerations section
- Add MTA module naming conversion documentation
- Fix variable shadowing in code examples
- Update test to use mem-fs-editor's exists() instead of fs.existsSync()
- Restore compatibility with mem-fs virtual file system in base-config.ts
- All tests passing with 100% coverage on modified files
@longieirl longieirl force-pushed the feature/code-quality-improvements-and-branch-protection branch from efc2de4 to c490901 Compare March 2, 2026 14:56
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants