Repository navigation
fix: switch to named imports for @sap/ux-specification 1.144.13 ESM compatibility - #5419
Draft
fionan-SAP wants to merge 7 commits into
Draft
fionan-SAP wants to merge 7 commits into
fionan-SAP wants to merge 7 commits into
Conversation
…ompatibility
@sap/ux-specification 1.144.13 ships as pure ESM (main: dist/index-min.mjs).
Default imports via `import uxSpec from '@sap/ux-specification'` fail because
ESM modules with no default export cannot be used that way.
- Replace all `import uxSpec from '@sap/ux-specification'; const { X } = uxSpec`
patterns with direct named imports across fiori-mcp-server src
- Update ui5-test-writer type imports to use the public Parser namespace
instead of deep dist/ subpaths removed in 1.144.13
- Remove 1.120 OPA template bucket from ui5-test-writer (ux-specification
1.144.13 no longer returns spec data for that version range)
- Fix writeFPM to skip minUI5Version for FPMFragment union member
- Fix bundle post-processing regex to match $-prefixed require vars on Linux
- Remove duplicate CJS manual mocks (.cjs + .mjs) to fix jest-haste-map errors
- Update ux-specification ESM mock to use await import() with absolute path
- Regenerate affected test snapshots and functionality counts
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 12:03 — with
GitHub Actions
Failure
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 12:03 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 12:03 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 12:03 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 12:03 — with
GitHub Actions
Failure
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 12:03 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 12:03 — with
GitHub Actions
Error
🦋 Changeset detectedLatest commit: 26b2f29 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
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 |
Contributor
SummaryThe following content is AI-generated and provides a summary of the pull request: DescriptionTitle: Fix ux-specification ESM compatibility and OPA generation Aligns consumers with
Type of change
How have you tested?Execution results were not provided for this PR. Pending verification:
Checklist:
Supersedes #5280.
PR Bot InformationVersion:
|
…pecification types @sap/ux-specification has no exports map, so the shortened '@sap/ux-specification/dist/types/src' path is not resolvable by TypeScript. Revert to the explicit file paths that worked before.
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 13:10 — with
GitHub Actions
Failure
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 13:10 — with
GitHub Actions
Failure
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 13:10 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 13:10 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 13:10 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 13:10 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 13:10 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 13:13 — with
GitHub Actions
Failure
…tput on all platforms
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:13 — with
GitHub Actions
Failure
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:13 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:13 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:13 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:13 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:13 — with
GitHub Actions
Failure
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:13 — with
GitHub Actions
Error
…specification 1.144.5
The lz-string Step 1c block was added for @sap/ux-specification 1.144.13 which
uses createRequire to load lz-string at runtime. This branch uses 1.144.5 which
has no lz-string dependency, so the step always threw "No createRequire-based
require("lz-string") found in bundle".
fionan-SAP
temporarily deployed
to
ci-secrets
November 16, 2026 14:34 — with
GitHub Actions
Inactive
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:34 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:34 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:34 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:34 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:34 — with
GitHub Actions
Failure
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 14:34 — with
GitHub Actions
Error
Update OPA journey template expected outputs and Jest snapshots in fiori-elements-writer and fiori-app-sub-generator to reflect the new ui5-test-writer OPA journey templates (FirstJourney.js replacing the old per-entity *Journey.gen.js files for lrop_v4, worklist_v4, fpm_v4, lrop_v4_ui5_1_120_4).
fionan-SAP
temporarily deployed
to
ci-secrets
November 16, 2026 15:10 — with
GitHub Actions
Inactive
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 15:10 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 15:10 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 15:10 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 15:10 — with
GitHub Actions
Error
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 15:10 — with
GitHub Actions
Failure
fionan-SAP
had a problem deploying
to
ci-secrets
November 16, 2026 15:10 — with
GitHub Actions
Error
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch was successfully deployed
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.
Summary
@sap/ux-specification1.144.13 ships as pure ESM (main: dist/index-min.mjs) with no CJS fallback. The previous pattern ofimport uxSpec from '@sap/ux-specification'; const { X } = uxSpecfails at runtime because ESM modules without adefaultexport cannot be imported that way.Supersedes #5280 (closed — branch was contaminated with stale merge commits and unrelated changes across 150+ files).
Changes:
fiori-mcp-server/src— Replace all default import + destructure patterns with direct named imports across 8 source filesfiori-mcp-server/src/page-editor-api/sapuxFtfsFileIO.ts— FixwriteFPMto skipminUI5Versionfor theFPMFragmentunion member (which has no such property in the 1.144.13 types)fiori-mcp-server/scripts/bundle.mjs— Fix post-processing regex to match$-prefixed require vars on Linuxfiori-mcp-server/jest.config.mjs— Exclude@sap/ux-specificationfrommodulePathIgnorePatternsto prevent OOM; update mock routingfiori-mcp-server/eslint.config.mjs— Add@sap/ux-specificationtoimport/no-unresolvedignore list (1.144.13 dropped roottypesfield)fiori-mcp-server/test/__mocks__/@sap/ux-specification.mjs— Update mock to useawait import()with absolute path (1.144.13 is ESM-only)fiori-mcp-server/test/__mocks__— Remove duplicate.cjsstubs for@sap-devx/yeoman-ui-typesand@sap-ux/adp-tooling(jest-haste-map duplicate mock error)ui5-test-writer/src— Replace deepdist/types/src/parser/index.jssubpaths with publicParsernamespace from@sap/ux-specification/dist/types/src(subpaths removed in 1.144.13)ui5-test-writer— Remove1.120OPA template bucket (spec no longer returns data for that version range in 1.144.13); delete 25 template files, update snapshots and testsfiori-mcp-server,ui5-test-writer,generator-odata-downloader; cascade forfiori-tools-pluginType of change
Test plan
pnpm --filter @sap-ux/fiori-mcp-server testpnpm --filter @sap-ux/ui5-test-writer testpnpm --filter @sap-ux/generator-odata-downloader testpnpm lintpnpm validate:changesets