Skip to content

npm backend: transpile the dev apps WITH the framework on a release that can - #59

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/tender-turing-zjlfxy
Oct 14, 2026
Merged

oblomov-dev merged 1 commit into
mainfrom
claude/tender-turing-zjlfxy

Conversation

@oblomov-dev

Copy link
Copy Markdown
Member

From the @abap2ui5/node-runtime release after 1.147.0 on, the package transpiles a host's classes together with the framework and writes an entry point into the host's own output (abap2UI5/abap2UI5#2916). That is what the transpiler's maintainer asked for on abaplint/transpiler#1999 (closed), instead of an option that leaves a library out of the output. This PR builds the dev apps that way on such a release. Older releases build exactly as before.

What changes

  • fullTranspileOf recognises a release that can do this: it records abap2ui5.expressIcfShim and carries setup/transpile.mjs and srv/framework.mjs.
  • buildFull transpiles everything in one run:
    • inputs: the sandbox and the package's downport/;
    • libraries: open-abap-core and express-icf-shim, given by url (the url names each library's folder in the output). Both are fetched at the recorded commits by ensureGitLibrary, generalised from ensureOpenAbapCore;
    • output: a staging folder that becomes the new apps/, a complete runtime. Its init.mjs creates every table and its runner is left exactly as the transpiler wrote it.
  • Entry point: the package's own writeEntry( ) writes host.mjs and claim.mjs into apps/. It runs as a child with the output as argv[1], so the module does not start its CLI. The build adds boot.mjs.
  • Nothing is rewritten.
  • npm-host: a full build is booted through apps/boot.mjs, and the exports come from apps/host.mjs. The package's own entry point is never imported; it would load a second runtime, which the package refuses.
  • app_list: on a full build, apps/ also holds the framework, so dev and framework apps are told apart by the sandbox's names, as on a checkout.
  • Additive result fields: the build result gains full and expressIcfShim, and the build record gains layout: "full". CHANGELOG and AGENTS.md describe it.

Tests

  • Fixture: a new layout: 'full' release whose package entry point throws when it is imported.
    • npm-runtime.test.mjs checks:
      • apps/ is a complete runtime, and the transpiler's imports are left untouched;
      • boot.mjs and the build record are correct;
      • the runner runs from apps/;
      • an unchanged build is skipped.
    • npm-host.test.mjs checks that the full build is served through apps/host.mjs.
    • npm-backend.test.mjs covers the pure helpers.
  • Real package: I ran the server against the release packed from abap2UI5#2916, with the real transpiler and real git fetches:
    • a changed build took 16 s including both fetches (8 s on the old path);
    • an unchanged build took 0 s;
    • the unit test passed;
    • z2ui5_cl_ui5_app_hi_world and the own app started, and the framework caught the app's own exception (500 naming ZCX_E2E_ERROR);
    • app_list labelled the apps correctly.
  • Suites: npm run check gives 554 passed and 17 skipped. With A2UI5_MCP_NETWORK_TESTS=1, npm-integration.test.mjs against the published 1.147.0 (old path) passes.

Lands safely before the release: on 1.147.0 and earlier nothing changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GPMAtn6BycCF2mKRUHGpek


Generated by Claude Code

…hat can

From the @abap2ui5/node-runtime release after 1.147.0 on, the package
transpiles a host's classes together with the framework and writes an
entry point into the host's own output (abap2UI5/abap2UI5#2916) - what
the transpiler's maintainer asked for on abaplint/transpiler#1999 instead
of a library left out of the output.

- fullTranspileOf: such a release records abap2ui5.expressIcfShim and
  carries setup/transpile.mjs and srv/framework.mjs.
- buildFull: the sandbox and the package's downport/ in one transpile,
  open-abap-core and express-icf-shim (ensureGitLibrary, generalised from
  ensureOpenAbapCore) by url as the libraries, into a staging that is the
  new apps/ - a complete runtime, its init.mjs and runner as written. The
  package's own writeEntry( ) writes host.mjs and claim.mjs into it (a
  child, the output as argv[1] so the module does not run as its bin);
  the build adds boot.mjs. Nothing rewritten.
- npm-host: a full build is booted through apps/boot.mjs, the exports
  taken from apps/host.mjs - the package's entry point is never imported.
- app_list names dev and framework apps by the sandbox on a full build.
- Releases up to 1.147.0 build exactly as before.

Measured against the release packed from abap2UI5#2916: a changed build
16 s with both fetches (8 s before), an unchanged one 0 s; unit run, app
start and the framework catching the app's own exception all work. The
fixture gains a 'full' release whose entry point throws when imported;
npm test 554 pass, the network integration test against the published
release passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPMAtn6BycCF2mKRUHGpek
@oblomov-dev
oblomov-dev merged commit dcadb48 into main Oct 14, 2026
3 checks passed
@oblomov-dev
oblomov-dev deleted the claude/tender-turing-zjlfxy branch October 14, 2026 09: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