Skip to content

Fix the README examples that no longer run, and the app file behind them - #22

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/repo-analysis-structure-0wpt5q
Aug 18, 2026
Merged

Fix the README examples that no longer run, and the app file behind them#22
oblomov-dev merged 1 commit into
mainfrom
claude/repo-analysis-structure-0wpt5q

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

Part of an ecosystem-wide audit of the abap2UI5 and cap2UI5 repositories.

Every front-page example threw

src/README.md — the source of the published cap2UI5/README.md — used require("abap2UI5/z2ui5_cl_xml_view") in six examples, including the headline Hello World. That subpath is not in core/package.json's exports map; the current builder is z2ui5_cl_ui5_view_builder. Every copy-pasteable example on the project's front page raised ERR_PACKAGE_PATH_NOT_EXPORTED.

The shipped app was broken too, not only its documentation. src/srv/app/z2ui5_cl_app_read_odata.js used the same dead subpath and threw at load. Fixing only the README would have left the app broken and made the documentation describe a file that does not match it. Both are migrated.

Since the builder writes raw XML with no property mapping, the ported examples use UI5's real attribute spelling (showIcon, not the old builder's showicon, which would have silently no-op'd).

Verification

Each README block was executed, not just inspected: a harness symlinked abap2UI5 → the assembled core and ran every example under --preserve-symlinks, asserting the require paths resolve and the rendered XML is well-formed. npm run lint clean, npm run test:builder 30 tests, npm run test:app 23 tests.

Also in this PR: the dead link to test/z2ui5_cl_xml_view.test.js (the file is test/view-builder-namespaces.test.js), the LICENSE holder (oblomov-ai where the rest of the organisation says cap2UI5), the three-versus-six repository count, and a link to cap2UI5/docs, which no README in the organisation pointed at.


🤖 Generated with Claude Code

https://claude.ai/code/session_01PLDFPfAK1MGq6qHeC6KKWH


Generated by Claude Code

`require("abap2UI5/z2ui5_cl_xml_view")` is not in the core package's
exports map any more, so every use throws
ERR_PACKAGE_PATH_NOT_EXPORTED at load time. That hit the shipped custom
app srv/app/z2ui5_cl_app_read_odata.js — not just the docs — plus the six
code examples in the app README and the one in srv/app/README.md.

All of them now build views with z2ui5_cl_ui5_view_builder. The builder
writes raw XML, so the ports also spell namespaces (mvc, and sap.ui.layout
.form for SimpleForm) and attribute names (`showIcon`, not `showicon`)
the way UI5 resolves them. Verified by loading each README example and the
app class against the real core and asserting the rendered XML is
well-formed, both against a standalone harness and against the assembled
app's vendored core.

Also fixes the dead link to test/z2ui5_cl_xml_view.test.js (the suite is
test/view-builder-namespaces.test.js), unifies the LICENSE copyright on
"cap2UI5", lists the actual six ecosystem repos instead of three, links
the docs site, and records in AGENTS.md why mirror-core.js may resolve the
UPSTREAM_HEAD pin (ordering arbitration only, newer-than-HEAD only, with a
fallback).

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 08:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@oblomov-dev
oblomov-dev merged commit cd978ed into main Aug 18, 2026
1 check passed
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.

3 participants