Fix the README examples that no longer run, and the app file behind them - #22
Merged
Merged
Conversation
`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>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of an ecosystem-wide audit of the abap2UI5 and cap2UI5 repositories.
Every front-page example threw
src/README.md— the source of the publishedcap2UI5/README.md— usedrequire("abap2UI5/z2ui5_cl_xml_view")in six examples, including the headline Hello World. That subpath is not incore/package.json's exports map; the current builder isz2ui5_cl_ui5_view_builder. Every copy-pasteable example on the project's front page raisedERR_PACKAGE_PATH_NOT_EXPORTED.The shipped app was broken too, not only its documentation.
src/srv/app/z2ui5_cl_app_read_odata.jsused 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'sshowicon, 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 lintclean,npm run test:builder30 tests,npm run test:app23 tests.Also in this PR: the dead link to
test/z2ui5_cl_xml_view.test.js(the file istest/view-builder-namespaces.test.js), the LICENSE holder (oblomov-aiwhere the rest of the organisation sayscap2UI5), the three-versus-six repository count, and a link tocap2UI5/docs, which no README in the organisation pointed at.🤖 Generated with Claude Code
https://claude.ai/code/session_01PLDFPfAK1MGq6qHeC6KKWH
Generated by Claude Code