From acaad0b8986b87cacfd77e12a475eef52e00e2c3 Mon Sep 17 00:00:00 2001 From: D048415 Date: Thu, 18 Dec 2025 22:59:10 +0100 Subject: [PATCH 01/13] fix sonar issues --- packages/control-property-editor/src/App.tsx | 2 +- .../src/panels/outline/utils.ts | 8 +++---- .../src/panels/properties/Funnel.tsx | 4 ++-- .../src/panels/properties/PropertiesList.tsx | 4 ++-- .../src/panels/properties/StringEditor.tsx | 4 ++-- .../quick-actions/NestedQuickAction.tsx | 2 +- packages/deploy-tooling/src/base/validate.ts | 2 +- packages/deploy-tooling/src/cli/archive.ts | 21 ++++++++----------- .../src/checks/environment.ts | 2 +- packages/environment-check/src/command.ts | 4 ++-- packages/fe-fpm-writer/src/common/defaults.ts | 2 +- packages/fe-fpm-writer/src/common/file.ts | 6 +++--- packages/fe-fpm-writer/src/page/common.ts | 5 +++-- .../jest-environment-ui5/src/env/mockXHR.js | 2 +- .../src/env/ui5Environment.js | 2 +- .../src/utils/ui5MappingStrategy.js | 2 +- .../src/utils/metadata.ts | 4 ++-- .../src/prompts/connectionValidator.ts | 8 +++---- .../preview-middleware-client/src/flp/init.ts | 2 +- .../src/components/UITooltip/UITooltip.tsx | 2 +- 20 files changed, 43 insertions(+), 45 deletions(-) diff --git a/packages/control-property-editor/src/App.tsx b/packages/control-property-editor/src/App.tsx index 88abe00af9c..1e48ac4e193 100644 --- a/packages/control-property-editor/src/App.tsx +++ b/packages/control-property-editor/src/App.tsx @@ -66,7 +66,7 @@ export default function App(appProps: AppProps): ReactElement { const paddingWidth = 40; const width = node.clientWidth; const availableWidth = width - paddingWidth; - const requiredWidth = parseInt(previewWidth, 10); + const requiredWidth = Number.parseInt(previewWidth, 10); if (availableWidth < requiredWidth) { const scale = availableWidth / requiredWidth; dispatch(changePreviewScale(scale)); diff --git a/packages/control-property-editor/src/panels/outline/utils.ts b/packages/control-property-editor/src/panels/outline/utils.ts index c8d89126f1c..cd036740573 100644 --- a/packages/control-property-editor/src/panels/outline/utils.ts +++ b/packages/control-property-editor/src/panels/outline/utils.ts @@ -3,7 +3,7 @@ import type { FilterOptions } from '../../slice'; import { FilterName } from '../../slice'; import type { IGroup } from '@fluentui/react'; -const commonVisibleControls = [ +const commonVisibleControls = new Set([ 'sap.ui.comp.smarttable.SmartTable', 'sap.m.Column', 'sap.ui.comp.smartfilterbar.SmartFilterBar', @@ -26,7 +26,7 @@ const commonVisibleControls = [ 'sap.ovp.ui.Card', 'sap.ui.extensionpoint', 'sap.ui.extensionpoint.child' -]; +]); /** * Filter model. If none of filter conditions meet, model without filter is returned. @@ -113,7 +113,7 @@ function filterByCommonlyUsedControls(model: OutlineNode[], filterOption: Filter for (const item of model) { let parentMatch = false; const controlType = item.controlType; - if (commonVisibleControls.includes(controlType)) { + if (commonVisibleControls.has(controlType)) { parentMatch = true; // add node without its children filteredModel.push({ ...item, children: [] }); @@ -145,7 +145,7 @@ export const adaptExpandCollapsed = (groups: IGroup[], collapsed: IGroup[]) => { return; } for (const group of groups) { - const [collapsedResult] = collapsed.filter((data) => isSame(group.data.path, data.data.path)); + const collapsedResult = collapsed.find((data) => isSame(group.data.path, data.data.path)); if (collapsedResult) { group.isCollapsed = true; } diff --git a/packages/control-property-editor/src/panels/properties/Funnel.tsx b/packages/control-property-editor/src/panels/properties/Funnel.tsx index b7da331d692..e9829ff921b 100644 --- a/packages/control-property-editor/src/panels/properties/Funnel.tsx +++ b/packages/control-property-editor/src/panels/properties/Funnel.tsx @@ -23,9 +23,9 @@ const Funnel = (): ReactElement => { const action = filterNodes([{ name, value: isChecked }]); dispatch(action); }; - const showEditablePropertiesChecked = filterQuery.filter( + const showEditablePropertiesChecked = filterQuery.find( (item) => item.name === FilterName.showEditableProperties - )[0].value as boolean; + )?.value as boolean | undefined; const checked = showEditablePropertiesChecked; return ( <> diff --git a/packages/control-property-editor/src/panels/properties/PropertiesList.tsx b/packages/control-property-editor/src/panels/properties/PropertiesList.tsx index 77387385512..0c5f5ac53c3 100644 --- a/packages/control-property-editor/src/panels/properties/PropertiesList.tsx +++ b/packages/control-property-editor/src/panels/properties/PropertiesList.tsx @@ -37,9 +37,9 @@ export function PropertiesList(): ReactElement { const controlChanges = useSelector( (state) => state.changes.controls[control?.id ?? ''] ); - const isEditableOnly = useSelector((state) => state.filterQuery).filter( + const isEditableOnly = useSelector((state) => state.filterQuery).find( (item) => item.name === FilterName.showEditableProperties - )[0].value as boolean; + )?.value as boolean | undefined; const [filterValue, setFilterValue] = useState(''); if (!control) { // Nothing selected, show message diff --git a/packages/control-property-editor/src/panels/properties/StringEditor.tsx b/packages/control-property-editor/src/panels/properties/StringEditor.tsx index f51bd527998..2bafe486d22 100644 --- a/packages/control-property-editor/src/panels/properties/StringEditor.tsx +++ b/packages/control-property-editor/src/panels/properties/StringEditor.tsx @@ -66,7 +66,7 @@ export function StringEditor(propertyInputProps: PropertyInputProps): ReactEleme if (type === FLOAT_VALUE_TYPE) { let newValue: string | number = String(e.currentTarget.value); if (type === FLOAT_VALUE_TYPE && !isExpression(newValue)) { - newValue = parseFloat(String(newValue?.trim())); + newValue = Number.parseFloat(String(newValue?.trim())); } setCachedValue(controlId, name, InputType.number, newValue); setValue(newValue); @@ -119,7 +119,7 @@ export function StringEditor(propertyInputProps: PropertyInputProps): ReactEleme } else { if (type === INTEGER_VALUE_TYPE && !isExpression(value)) { value = value.trim().replace(/(^-)|(\D+)/g, '$1'); - value = parseInt(String(value), 10); + value = Number.parseInt(String(value), 10); } const inputType = type === INTEGER_VALUE_TYPE ? InputType.number : InputType.string; setCachedValue(controlId, name, inputType, value); diff --git a/packages/control-property-editor/src/panels/quick-actions/NestedQuickAction.tsx b/packages/control-property-editor/src/panels/quick-actions/NestedQuickAction.tsx index c18c1a8bf3c..79dd3fb9921 100644 --- a/packages/control-property-editor/src/panels/quick-actions/NestedQuickAction.tsx +++ b/packages/control-property-editor/src/panels/quick-actions/NestedQuickAction.tsx @@ -211,7 +211,7 @@ function mergeNodes( continue; } endNode.label = `${startNode.label}-${endNode.label}`; - const index = parentNode.children.findIndex((parentChild) => parentChild === startNode); + const index = parentNode.children.indexOf(startNode); if (index !== -1) { parentNode.children[index] = endNode; } diff --git a/packages/deploy-tooling/src/base/validate.ts b/packages/deploy-tooling/src/base/validate.ts index a703edea900..5a7ca59f473 100644 --- a/packages/deploy-tooling/src/base/validate.ts +++ b/packages/deploy-tooling/src/base/validate.ts @@ -303,7 +303,7 @@ async function validatePackageWithAdt( return; } const packages = await adtService.listPackages({ phrase: inputPackage }); - const isValidPackage = packages.findIndex((packageName: string) => packageName === inputPackage) >= 0; + const isValidPackage = packages.indexOf(inputPackage) >= 0; if (isValidPackage) { output.summary.push({ diff --git a/packages/deploy-tooling/src/cli/archive.ts b/packages/deploy-tooling/src/cli/archive.ts index 710b2c8578a..e34358ca950 100644 --- a/packages/deploy-tooling/src/cli/archive.ts +++ b/packages/deploy-tooling/src/cli/archive.ts @@ -1,5 +1,5 @@ import axios from 'axios'; -import { readFile } from 'node:fs'; +import { readFile } from 'node:fs/promises'; import ZipFile from 'adm-zip'; import type { CliOptions } from '../types'; import type { Logger } from '@sap-ux/logger'; @@ -12,18 +12,15 @@ import { Agent } from 'node:https'; * @param path - path to the zip file * @returns Buffer containing the zip file */ -function getArchiveFromPath(logger: Logger, path: string): Promise { +async function getArchiveFromPath(logger: Logger, path: string): Promise { logger.info(`Loading archive from ${path}`); - return new Promise((resolve, reject) => { - readFile(path, (err, data) => { - if (err) { - reject(`Loading archive has failed. Please ensure ${path} is valid and accessible.`); - } else { - logger.info(`Archive loaded from ${path}`); - resolve(data); - } - }); - }); + try { + const data = await readFile(path); + logger.info(`Archive loaded from ${path}`); + return data; + } catch (err) { + throw new Error(`Loading archive has failed. Please ensure ${path} is valid and accessible.`); + } } /** diff --git a/packages/environment-check/src/checks/environment.ts b/packages/environment-check/src/checks/environment.ts index 738365c2981..f8963b238fe 100644 --- a/packages/environment-check/src/checks/environment.ts +++ b/packages/environment-check/src/checks/environment.ts @@ -152,7 +152,7 @@ async function getEndpointResults( if (needsUsernamePassword(endpoint)) { if (typeof credentialCallback === 'function') { const credentials = await credentialCallback(endpoint); - if (credentials && credentials.username && credentials.password) { + if (credentials?.username && credentials?.password) { username = credentials.username; password = credentials.password; } diff --git a/packages/environment-check/src/command.ts b/packages/environment-check/src/command.ts index fa6fcaa45e5..dd3343ba55d 100644 --- a/packages/environment-check/src/command.ts +++ b/packages/environment-check/src/command.ts @@ -3,12 +3,12 @@ import os from 'node:os'; /** * npm command is platform depending: Winows 'npm.cmd', Mac 'npm' */ -export const npmCommand = /^win/.test(process.platform) ? 'npm.cmd' : 'npm'; +export const npmCommand = process.platform.startsWith('win') ? 'npm.cmd' : 'npm'; /** * Platform specific config for spawn to execute commands */ -const spawnOptions = /^win/.test(process.platform) +const spawnOptions = process.platform.startsWith('win') ? { windowsVerbatimArguments: true, shell: true, cwd: os.homedir() } : { cwd: os.homedir() }; diff --git a/packages/fe-fpm-writer/src/common/defaults.ts b/packages/fe-fpm-writer/src/common/defaults.ts index 81913b24e8f..0bc842d5ea7 100644 --- a/packages/fe-fpm-writer/src/common/defaults.ts +++ b/packages/fe-fpm-writer/src/common/defaults.ts @@ -20,7 +20,7 @@ export function setCommonDefaults { - return tabSymbols.includes(line[0]); + return tabSymbols.has(line[0]); }); if (lineWithSpacing) { tabSize = getLineTabInfo(lineWithSpacing); diff --git a/packages/fe-fpm-writer/src/page/common.ts b/packages/fe-fpm-writer/src/page/common.ts index e30596d105d..282d132c8ff 100644 --- a/packages/fe-fpm-writer/src/page/common.ts +++ b/packages/fe-fpm-writer/src/page/common.ts @@ -115,9 +115,9 @@ export function getManifestJsonExtensionHelper( return (key, value) => { switch (key) { case 'routing': - value.routes = value.routes ?? []; + value.routes ??= []; break; - case 'routes': + case 'routes': { const routes = value as ManifestNamespace.Route[]; routes.push({ name: config.id ?? `${config.entity}${config.name}`, @@ -130,6 +130,7 @@ export function getManifestJsonExtensionHelper( ) }); break; + } default: break; } diff --git a/packages/jest-environment-ui5/src/env/mockXHR.js b/packages/jest-environment-ui5/src/env/mockXHR.js index 2cb18b0ff7c..a1d69d7c9ba 100644 --- a/packages/jest-environment-ui5/src/env/mockXHR.js +++ b/packages/jest-environment-ui5/src/env/mockXHR.js @@ -1,4 +1,4 @@ -const fs = require('fs'); +const fs = require('node:fs'); /** * Returns a mock class for XMLHttpRequest. diff --git a/packages/jest-environment-ui5/src/env/ui5Environment.js b/packages/jest-environment-ui5/src/env/ui5Environment.js index 5e36c10faa4..b82bd082d8c 100644 --- a/packages/jest-environment-ui5/src/env/ui5Environment.js +++ b/packages/jest-environment-ui5/src/env/ui5Environment.js @@ -1,4 +1,4 @@ -const fs = require('fs'); +const fs = require('node:fs'); const mockXHR = require('./mockXHR'); /** * Initializes the UI5 environment for the Jest tests. diff --git a/packages/jest-environment-ui5/src/utils/ui5MappingStrategy.js b/packages/jest-environment-ui5/src/utils/ui5MappingStrategy.js index 77f84998c0b..24639bd7719 100644 --- a/packages/jest-environment-ui5/src/utils/ui5MappingStrategy.js +++ b/packages/jest-environment-ui5/src/utils/ui5MappingStrategy.js @@ -1,4 +1,4 @@ -const path = require('path'); +const path = require('node:path'); let pathMappingFn = null; let ui5VersionCache = null; diff --git a/packages/odata-annotation-core/src/utils/metadata.ts b/packages/odata-annotation-core/src/utils/metadata.ts index 447ec8834ef..cb469d54162 100644 --- a/packages/odata-annotation-core/src/utils/metadata.ts +++ b/packages/odata-annotation-core/src/utils/metadata.ts @@ -72,8 +72,8 @@ function isEntityOrComplexOrStructuredType(currentMetadataElement: MetadataEleme */ function isPathPointingToActionKindElement(metadata: IMetadataService, path: string): boolean { const edmxTypes = metadata.getEdmTargetKinds(path); - const actionKinds = [ACTION_KIND, FUNCTION_KIND, ACTION_IMPORT_KIND, FUNCTION_IMPORT_KIND]; - return edmxTypes.findIndex((edmxType: string) => actionKinds.includes(edmxType)) >= 0; + const actionKinds = new Set([ACTION_KIND, FUNCTION_KIND, ACTION_IMPORT_KIND, FUNCTION_IMPORT_KIND]); + return edmxTypes.findIndex((edmxType: string) => actionKinds.has(edmxType)) >= 0; } /** diff --git a/packages/odata-service-inquirer/src/prompts/connectionValidator.ts b/packages/odata-service-inquirer/src/prompts/connectionValidator.ts index 38f849dc8ed..8e94205fbc5 100644 --- a/packages/odata-service-inquirer/src/prompts/connectionValidator.ts +++ b/packages/odata-service-inquirer/src/prompts/connectionValidator.ts @@ -50,13 +50,13 @@ interface Validity { } // Cert errors that may be ignored by the ignore cert errors prompt and NODE_TLS_REJECT_UNAUTHORIZED=0 setting -const ignorableCertErrors = [ +const ignorableCertErrors = new Set([ ERROR_TYPE.CERT_SELF_SIGNED, ERROR_TYPE.CERT_SELF_SIGNED_CERT_IN_CHAIN, ERROR_TYPE.CERT_EXPIRED, ERROR_TYPE.CERT_UKNOWN_OR_INVALID, ERROR_TYPE.INVALID_SSL_CERTIFICATE -]; +]); // Makes AxiosRequestConfig url properties required interface AxiosExtensionRequestConfig extends AxiosRequestConfig { @@ -469,7 +469,7 @@ export class ConnectionValidator { await abapProvider.catalog(odataVerCatalog).listServices(); } catch (error) { const errorType = ErrorHandler.getErrorType(error?.response?.status ?? error?.code); - if (error?.isAxiosError && ignorableCertErrors.includes(errorType)) { + if (error?.isAxiosError && ignorableCertErrors.has(errorType)) { LoggerHelper.logger.warn( t('warnings.certificateErrors', { url: axiosConfig?.baseURL, error: errorType }) ); @@ -883,7 +883,7 @@ export class ConnectionValidator { return ErrorHandler.getErrorMsgFromType(ERROR_TYPE.NOT_FOUND) ?? false; } else if (ErrorHandler.isCertError(status)) { this.validity.reachable = true; - this.validity.canSkipCertError = ignorableCertErrors.includes(ErrorHandler.getErrorType(status)); + this.validity.canSkipCertError = ignorableCertErrors.has(ErrorHandler.getErrorType(status)); this.validity.authenticated = false; return errorHandler.getValidationErrorHelp(status, false) ?? false; } else if (ErrorHandler.getErrorType(status) === ERROR_TYPE.AUTH) { diff --git a/packages/preview-middleware-client/src/flp/init.ts b/packages/preview-middleware-client/src/flp/init.ts index 80cec5fca1c..197015f96bf 100644 --- a/packages/preview-middleware-client/src/flp/init.ts +++ b/packages/preview-middleware-client/src/flp/init.ts @@ -188,7 +188,7 @@ export async function registerComponentDependencyPaths(appUrls: string[], urlPar if (libs && libs.length > 0) { let url = '/sap/bc/ui2/app_index/ui5_app_info?id=' + libs; const sapClient = urlParams.get('sap-client'); - if (sapClient && sapClient.length === 3) { + if (sapClient?.length === 3) { url = url + '&sap-client=' + sapClient; } const response = await fetch(url); diff --git a/packages/ui-components/src/components/UITooltip/UITooltip.tsx b/packages/ui-components/src/components/UITooltip/UITooltip.tsx index 2a00326c3b0..469db9e4488 100644 --- a/packages/ui-components/src/components/UITooltip/UITooltip.tsx +++ b/packages/ui-components/src/components/UITooltip/UITooltip.tsx @@ -92,7 +92,7 @@ export class UITooltip extends React.Component { ) : (
{ - if (event.target.parentElement && event.target.parentElement.classList.contains('ms-TooltipHost')) { + if (event.target.parentElement?.classList.contains('ms-TooltipHost')) { // Stop propagation to avoid display of tooltip on focus event.stopPropagation(); } From d3b6e1011c06635ea480e271988fef39b4abeeaa Mon Sep 17 00:00:00 2001 From: D048415 Date: Thu, 18 Dec 2025 23:02:26 +0100 Subject: [PATCH 02/13] add cset --- .changeset/six-pots-perform.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .changeset/six-pots-perform.md diff --git a/.changeset/six-pots-perform.md b/.changeset/six-pots-perform.md new file mode 100644 index 00000000000..93fe1bf9159 --- /dev/null +++ b/.changeset/six-pots-perform.md @@ -0,0 +1,13 @@ +--- +'@sap-ux-private/preview-middleware-client': patch +'@sap-ux/control-property-editor': patch +'@sap-ux/odata-service-inquirer': patch +'@sap-ux/odata-annotation-core': patch +'@sap-ux/jest-environment-ui5': patch +'@sap-ux/environment-check': patch +'@sap-ux/deploy-tooling': patch +'@sap-ux/fe-fpm-writer': patch +'@sap-ux/ui-components': patch +--- + +fix sonar issues From dbd083ab89029118cd1b0cc7e1d9e7a0792c865b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Dec 2025 22:12:49 +0000 Subject: [PATCH 03/13] Linting auto fix commit --- .../control-property-editor/src/panels/properties/Funnel.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/control-property-editor/src/panels/properties/Funnel.tsx b/packages/control-property-editor/src/panels/properties/Funnel.tsx index e9829ff921b..cd05b822e5a 100644 --- a/packages/control-property-editor/src/panels/properties/Funnel.tsx +++ b/packages/control-property-editor/src/panels/properties/Funnel.tsx @@ -23,9 +23,8 @@ const Funnel = (): ReactElement => { const action = filterNodes([{ name, value: isChecked }]); dispatch(action); }; - const showEditablePropertiesChecked = filterQuery.find( - (item) => item.name === FilterName.showEditableProperties - )?.value as boolean | undefined; + const showEditablePropertiesChecked = filterQuery.find((item) => item.name === FilterName.showEditableProperties) + ?.value as boolean | undefined; const checked = showEditablePropertiesChecked; return ( <> From 0bb5daac6193446ee814923654612f22bcec67fb Mon Sep 17 00:00:00 2001 From: D048415 Date: Thu, 18 Dec 2025 23:37:51 +0100 Subject: [PATCH 04/13] fix sonar issues --- packages/deploy-tooling/src/base/validate.ts | 2 +- packages/deploy-tooling/src/cli/archive.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/deploy-tooling/src/base/validate.ts b/packages/deploy-tooling/src/base/validate.ts index 5a7ca59f473..07c5391c88e 100644 --- a/packages/deploy-tooling/src/base/validate.ts +++ b/packages/deploy-tooling/src/base/validate.ts @@ -303,7 +303,7 @@ async function validatePackageWithAdt( return; } const packages = await adtService.listPackages({ phrase: inputPackage }); - const isValidPackage = packages.indexOf(inputPackage) >= 0; + const isValidPackage = packages.includes(inputPackage); if (isValidPackage) { output.summary.push({ diff --git a/packages/deploy-tooling/src/cli/archive.ts b/packages/deploy-tooling/src/cli/archive.ts index e34358ca950..000d41bce7a 100644 --- a/packages/deploy-tooling/src/cli/archive.ts +++ b/packages/deploy-tooling/src/cli/archive.ts @@ -18,7 +18,7 @@ async function getArchiveFromPath(logger: Logger, path: string): Promise const data = await readFile(path); logger.info(`Archive loaded from ${path}`); return data; - } catch (err) { + } catch { throw new Error(`Loading archive has failed. Please ensure ${path} is valid and accessible.`); } } From 8515e164bed33de945361a7378c6fcb1fa3c74ee Mon Sep 17 00:00:00 2001 From: D048415 Date: Fri, 19 Dec 2025 11:05:38 +0100 Subject: [PATCH 05/13] fix issues (Prefer `Array#flat()` over `Array#reduce()`) --- .../src/transformer/ast.ts | 66 ++++++++----------- 1 file changed, 26 insertions(+), 40 deletions(-) diff --git a/packages/cds-annotation-parser/src/transformer/ast.ts b/packages/cds-annotation-parser/src/transformer/ast.ts index 0b841c39873..7c9f09b4884 100644 --- a/packages/cds-annotation-parser/src/transformer/ast.ts +++ b/packages/cds-annotation-parser/src/transformer/ast.ts @@ -1070,7 +1070,7 @@ class CstToAstVisitor extends Visitor { */ path(context: PathChildren, location: CstNodeLocation): Path { const segments: Identifier[] = (context.pathSegment ?? []) - .map((segment, i) => { + .flatMap((segment, i) => { const quotedIdentifiers = segment.children.quotedIdentifier?.reduce( (acc: { token: IToken; delimiter: Delimiter }[], quotedIdentifier) => { @@ -1126,52 +1126,38 @@ class CstToAstVisitor extends Visitor { const identifiers = this.getIdentifierToken(segment); return [...identifiers, ...quotedIdentifiers, ...delimitedIdentifiers, ...fromErrorRecovery]; }) - .reduce((acc, allSegments) => [...acc, ...allSegments], []) .sort((a, b) => compareTokensByPosition(a.token, b.token)) .map(({ token, delimiter }) => this.tokenToIdentifier(token, delimiter)); const separators: Separator[] = [ - ...(context.pathSegment ?? []).map((segment) => { + ...(context.pathSegment ?? []).flatMap((segment) => { const quotedIdentifiers = - segment.children.quotedIdentifier?.reduce( - (acc: { token: IToken; delimiter: Delimiter }[], quotedIdentifier) => { - const childrenSeparators = quotedIdentifier.children.PathSegmentSeparator ?? []; - return [ - ...acc, - ...childrenSeparators.map((token) => ({ - token, - delimiter: Delimiter.quoted - })) - ]; - }, - [] - ) ?? []; + segment.children.quotedIdentifier?.flatMap((quotedIdentifier) => { + const childrenSeparators = quotedIdentifier.children.PathSegmentSeparator ?? []; + return childrenSeparators.map((token) => ({ + token, + delimiter: Delimiter.quoted + })); + }) ?? []; const delimitedIdentifiers = - segment.children.delimitedIdentifier?.reduce( - (acc: { token: IToken; delimiter: Delimiter }[], delimitedIdentifier) => { - if (!delimitedIdentifier.children.DelimitedIdentifier) { - return [ - ...acc, - { - token: this.createEmptyIdentifier( - delimitedIdentifier.children.IdentifierStart[0], - delimitedIdentifier.children.DelimitedIdentifierExit[0] - ), - delimiter: Delimiter.exclamationSquareBrackets - } - ]; - } - const childrenSeparators = delimitedIdentifier.children.PathSegmentSeparator ?? []; - + segment.children.delimitedIdentifier?.flatMap((delimitedIdentifier) => { + if (!delimitedIdentifier.children.DelimitedIdentifier) { return [ - ...acc, - ...childrenSeparators.map((token) => ({ - token, + { + token: this.createEmptyIdentifier( + delimitedIdentifier.children.IdentifierStart[0], + delimitedIdentifier.children.DelimitedIdentifierExit[0] + ), delimiter: Delimiter.exclamationSquareBrackets - })) + } ]; - }, - [] - ) ?? []; + } + const childrenSeparators = delimitedIdentifier.children.PathSegmentSeparator ?? []; + + return childrenSeparators.map((token) => ({ + token, + delimiter: Delimiter.exclamationSquareBrackets + })); + }) ?? []; return [...quotedIdentifiers, ...delimitedIdentifiers]; }), (context.PathSegmentSeparator ?? []).map((token) => ({ @@ -1179,7 +1165,7 @@ class CstToAstVisitor extends Visitor { delimiter: Delimiter.none })) ] - .reduce((acc, allSegments) => [...acc, ...allSegments], []) + .flat() .sort((a, b) => compareTokensByPosition(a.token, b.token)) .map(({ token, delimiter }) => this.tokenToSeparator(token, delimiter)); From 7b1c69b1c7a78d7d10b94db86a71b5ad98cf4e54 Mon Sep 17 00:00:00 2001 From: D048415 Date: Fri, 19 Dec 2025 11:23:34 +0100 Subject: [PATCH 06/13] fix imports --- packages/fiori-docs-embeddings/src/scripts/build-docs.ts | 2 +- packages/fiori-elements-writer/src/validate.ts | 4 ++-- packages/launch-config/src/launch-config-crud/utils.ts | 2 +- packages/project-access/src/file/file-search.ts | 3 ++- packages/serve-static-middleware/src/base/servestatic.ts | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/fiori-docs-embeddings/src/scripts/build-docs.ts b/packages/fiori-docs-embeddings/src/scripts/build-docs.ts index d87420e8efa..e2e2f7c9766 100644 --- a/packages/fiori-docs-embeddings/src/scripts/build-docs.ts +++ b/packages/fiori-docs-embeddings/src/scripts/build-docs.ts @@ -5,7 +5,7 @@ import { marked } from 'marked'; import * as fs from 'node:fs/promises'; import * as path from 'node:path'; import { spawn, type SpawnOptionsWithoutStdio } from 'node:child_process'; -import { default as matter } from 'gray-matter'; +import matter from 'gray-matter'; import { ToolsLogger, type Logger } from '@sap-ux/logger'; import { setTimeout } from 'node:timers/promises'; diff --git a/packages/fiori-elements-writer/src/validate.ts b/packages/fiori-elements-writer/src/validate.ts index 3a6f6ef89ca..f65c7909109 100644 --- a/packages/fiori-elements-writer/src/validate.ts +++ b/packages/fiori-elements-writer/src/validate.ts @@ -1,5 +1,5 @@ -import type { SemVer } from 'semver'; -import { default as semVer } from 'semver'; +import { SemVer } from 'semver'; +import * as semVer from 'semver'; import { TemplateTypeAttributes } from './data/templateAttributes'; import { t } from './i18n'; import { ValidationError } from './types'; diff --git a/packages/launch-config/src/launch-config-crud/utils.ts b/packages/launch-config/src/launch-config-crud/utils.ts index b9349783a03..ef067076982 100644 --- a/packages/launch-config/src/launch-config-crud/utils.ts +++ b/packages/launch-config/src/launch-config-crud/utils.ts @@ -3,7 +3,7 @@ import type { ODataVersion } from '@sap-ux/project-access'; import { FileName } from '@sap-ux/project-access'; import type { FioriOptions, LaunchConfig, LaunchConfigEnv } from '../types'; import { Arguments, FIORI_TOOLS_LAUNCH_CONFIG_HANDLER_ID } from '../types'; -import { default as yargsParser } from 'yargs-parser'; +import yargsParser from 'yargs-parser'; /** * Returns the string array of 'args' required in the launch config. diff --git a/packages/project-access/src/file/file-search.ts b/packages/project-access/src/file/file-search.ts index fec3b2292bb..0e29865d99b 100644 --- a/packages/project-access/src/file/file-search.ts +++ b/packages/project-access/src/file/file-search.ts @@ -1,6 +1,7 @@ import type { Editor, FileMap } from 'mem-fs-editor'; import { basename, dirname, extname, join, sep, posix } from 'node:path'; -import { default as find, type FindError } from 'findit2'; +import type { FindError } from 'findit2'; +import find from 'findit2'; import { fileExists } from './file-access'; import { promises as fs } from 'node:fs'; diff --git a/packages/serve-static-middleware/src/base/servestatic.ts b/packages/serve-static-middleware/src/base/servestatic.ts index d3a04714eaf..b45ea084e02 100644 --- a/packages/serve-static-middleware/src/base/servestatic.ts +++ b/packages/serve-static-middleware/src/base/servestatic.ts @@ -1,4 +1,4 @@ -import { default as serveStatic } from 'serve-static'; +import serveStatic from 'serve-static'; import type { ServeStaticOptions } from 'serve-static'; import type { ServeStaticConfig } from './types'; import { resolveServeStaticOptions, resolveSrcPath } from './utils'; From 2a0d3c3e9e87dda76664b78dd177f49e2684775e Mon Sep 17 00:00:00 2001 From: D048415 Date: Fri, 19 Dec 2025 11:25:01 +0100 Subject: [PATCH 07/13] fix imports 2 --- packages/fiori-elements-writer/src/validate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori-elements-writer/src/validate.ts b/packages/fiori-elements-writer/src/validate.ts index f65c7909109..2eb33b16862 100644 --- a/packages/fiori-elements-writer/src/validate.ts +++ b/packages/fiori-elements-writer/src/validate.ts @@ -1,4 +1,4 @@ -import { SemVer } from 'semver'; +import type { SemVer } from 'semver'; import * as semVer from 'semver'; import { TemplateTypeAttributes } from './data/templateAttributes'; import { t } from './i18n'; From c22542cef108f4eb42acbf9163c6e2ebb4460fd5 Mon Sep 17 00:00:00 2001 From: D048415 Date: Fri, 19 Dec 2025 11:26:57 +0100 Subject: [PATCH 08/13] fix imports 3 --- packages/fiori-elements-writer/src/validate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fiori-elements-writer/src/validate.ts b/packages/fiori-elements-writer/src/validate.ts index 2eb33b16862..5813bab9b9a 100644 --- a/packages/fiori-elements-writer/src/validate.ts +++ b/packages/fiori-elements-writer/src/validate.ts @@ -1,5 +1,5 @@ import type { SemVer } from 'semver'; -import * as semVer from 'semver'; +import semVer from 'semver'; import { TemplateTypeAttributes } from './data/templateAttributes'; import { t } from './i18n'; import { ValidationError } from './types'; From 40b61b37c0c716b35bc26cf064c9c68afcad41d4 Mon Sep 17 00:00:00 2001 From: D048415 Date: Fri, 19 Dec 2025 11:59:12 +0100 Subject: [PATCH 09/13] fix sonar issues --- .../adp-tooling/src/cf/utils/validation.ts | 2 +- .../annotation-generator/src/generation.ts | 10 +++---- .../adt-catalog/services/generator-service.ts | 2 -- .../src/parser/parser.ts | 2 +- .../src/transformer/ast.ts | 27 +++++++++---------- .../src/printer/indent.ts | 11 ++++---- .../fiori-annotation-api/src/cds/deletion.ts | 6 ++--- .../src/error-handler/error-handler.ts | 2 +- .../src/annotation-file.ts | 2 +- .../src/vocabulary-service.ts | 4 ++- .../preview-middleware-client/src/cpe/init.ts | 17 ++++++------ .../src/components/UITable/UITable-helper.tsx | 6 ++++- .../src/data/validators.ts | 2 +- 13 files changed, 48 insertions(+), 45 deletions(-) diff --git a/packages/adp-tooling/src/cf/utils/validation.ts b/packages/adp-tooling/src/cf/utils/validation.ts index 3848d717d77..c28425908c2 100644 --- a/packages/adp-tooling/src/cf/utils/validation.ts +++ b/packages/adp-tooling/src/cf/utils/validation.ts @@ -30,7 +30,7 @@ export async function validateSmartTemplateApplication(manifest: Manifest): Prom throw new Error(t('error.adpDoesNotSupportSelectedApplication')); } - if (manifest['sap.ui5'] && manifest['sap.ui5'].flexEnabled === false) { + if (manifest['sap.ui5']?.flexEnabled === false) { throw new Error(t('error.appDoesNotSupportFlexibility')); } } diff --git a/packages/annotation-generator/src/generation.ts b/packages/annotation-generator/src/generation.ts index 0bca078c422..1e85a5611ce 100644 --- a/packages/annotation-generator/src/generation.ts +++ b/packages/annotation-generator/src/generation.ts @@ -29,10 +29,10 @@ import { join } from 'node:path'; import { pathToFileURL } from 'node:url'; import { adaptFilePath } from './utils'; -const draftSpecificFields = ['IsActiveEntity', 'HasActiveEntity', 'HasDraftEntity']; +const draftSpecificFields = new Set(['IsActiveEntity', 'HasActiveEntity', 'HasDraftEntity']); const commonNodeModulePath = join('node_modules', '@sap', 'cds', 'common.cds'); -const managedProperties = ['createdAt', 'createdBy', 'modifiedAt', 'modifiedBy']; +const managedProperties = new Set(['createdAt', 'createdBy', 'modifiedAt', 'modifiedBy']); const FACETS_PROP_NAME_LABEL = 'Label'; const FACETS_PROP_NAME_ID = 'ID'; @@ -311,7 +311,7 @@ function generateFieldGroup(context: Context): RawAnnotation { function getDataFieldRecordCollection(context: Context, isListReport = false): AnnotationRecord[] { const { project, metadataService, entityType } = context; - const properties = entityType.entityProperties.filter((property) => !draftSpecificFields.includes(property.name)); + const properties = entityType.entityProperties.filter((property) => !draftSpecificFields.has(property.name)); const keyCount = moveKeysToBeginning(isListReport, entityType, properties); @@ -427,7 +427,7 @@ function isPropertyFromCommonNodeModule(propName: string, locationUri?: string): if (!propName || !locationUri) { return false; } - return managedProperties.includes(propName) && locationUri.endsWith(commonNodeModulePath); + return managedProperties.has(propName) && locationUri.endsWith(commonNodeModulePath); } function isHidden(hiddenAnno: Hidden | undefined): boolean { @@ -629,7 +629,7 @@ function getValueListParameterDisplayOnly( prop.isComplexType || hidden || prop.edmPrimitiveType === 'Edm.Guid' || - draftSpecificFields.includes(prop.name) || + draftSpecificFields.has(prop.name) || isPropertyFromCommonNodeModule(prop.name, prop.location?.uri); return !isOmit; diff --git a/packages/axios-extension/src/abap/adt-catalog/services/generator-service.ts b/packages/axios-extension/src/abap/adt-catalog/services/generator-service.ts index c0f9d49fefc..16396bcb75e 100644 --- a/packages/axios-extension/src/abap/adt-catalog/services/generator-service.ts +++ b/packages/axios-extension/src/abap/adt-catalog/services/generator-service.ts @@ -23,8 +23,6 @@ export class GeneratorService extends AdtService { return GeneratorService.adtCategory; } - private id: string; - /** * Get the UI service generator for the given referenced object. * diff --git a/packages/cds-annotation-parser/src/parser/parser.ts b/packages/cds-annotation-parser/src/parser/parser.ts index 87e004c9fc2..0fd48ae99e7 100644 --- a/packages/cds-annotation-parser/src/parser/parser.ts +++ b/packages/cds-annotation-parser/src/parser/parser.ts @@ -262,7 +262,7 @@ export class AnnotationParser extends CstParser { * https://chevrotain.io/docs/guide/performance.html#caching-arrays-of-alternatives */ v?: IOrAlt[]; - private CST_STACK: AssignmentCstNode[] = []; + private readonly CST_STACK: AssignmentCstNode[] = []; text = ''; constructor() { diff --git a/packages/cds-annotation-parser/src/transformer/ast.ts b/packages/cds-annotation-parser/src/transformer/ast.ts index 7c9f09b4884..3459df96c94 100644 --- a/packages/cds-annotation-parser/src/transformer/ast.ts +++ b/packages/cds-annotation-parser/src/transformer/ast.ts @@ -685,6 +685,17 @@ class CstToAstVisitor extends Visitor { return undefined; } + /** + * Builds operator. + * + * @param operatorToken Operator CST token + * @param range Token range + * @returns Operator node + */ + private buildOperator(operatorToken: IToken, range: Range): Operator { + return { type: OPERATOR_TYPE, value: operatorToken.image, range }; + } + /** * Converts expression children to expression ast node. * @@ -693,17 +704,6 @@ class CstToAstVisitor extends Visitor { * @returns Expression value ast node */ expression(context: ExpressionChildren, location: CstNodeLocation): Expression | Path { - /** - * Builds operator. - * - * @param operatorToken Operator CST token - * @param range Token range - * @returns Operator node - */ - function buildOperator(operatorToken: IToken, range: Range): Operator { - const operator: Operator = { type: OPERATOR_TYPE, value: operatorToken.image, range }; - return operator; - } const openToken = existsAndNotRecovered(context.LParen) ? this.createToken(context.LParen[0]) : undefined; const closeToken = existsAndNotRecovered(context.RParen) ? this.createToken(context.RParen[0]) : undefined; const range = this.locationToRange(location); @@ -713,7 +713,7 @@ class CstToAstVisitor extends Visitor { return node; } } - const operators = (context.Operator ?? []).map((token) => buildOperator(token, this.tokenToRange(token))); + const operators = (context.Operator ?? []).map((token) => this.buildOperator(token, this.tokenToRange(token))); const operands = (context.value ?? []).map((token) => this.visit(token) as AnnotationValue); const expression = { operators, operands, openToken, closeToken, range }; const unsupportedOperator = operators.find((operator) => { @@ -1255,8 +1255,7 @@ class CstToAstVisitor extends Visitor { ) { this.recoverFromMissingValue(assignment.children.Colon[0], property); } else if ( - assignment.children?.value && - assignment.children?.value.length && + assignment.children?.value?.length && assignment.children.value[0]?.children?.path && assignments[assignmentIndex + 1] && !assignments[assignmentIndex + 1].children?.path diff --git a/packages/cds-odata-annotation-converter/src/printer/indent.ts b/packages/cds-odata-annotation-converter/src/printer/indent.ts index e857993b04a..86eff73ae3c 100644 --- a/packages/cds-odata-annotation-converter/src/printer/indent.ts +++ b/packages/cds-odata-annotation-converter/src/printer/indent.ts @@ -14,12 +14,11 @@ const CLOSING_CHARACTERS = new Set([']', '}', ')']); */ export function indent( string: string, - indentInfo = { - level: 0, - skipFirstLine: false - } + { + level = 0, + skipFirstLine = false + } = {} ): string { - let level = indentInfo.level; const parts = string.split('\n'); for (let i = 0; i < parts.length; i++) { const line = parts[i]; @@ -27,7 +26,7 @@ export function indent( if (change < 0) { level += change; } - if (indentInfo.skipFirstLine && i === 0) { + if (skipFirstLine && i === 0) { level += change; continue; } diff --git a/packages/fiori-annotation-api/src/cds/deletion.ts b/packages/fiori-annotation-api/src/cds/deletion.ts index 029e1f0de7d..1be3e65cead 100644 --- a/packages/fiori-annotation-api/src/cds/deletion.ts +++ b/packages/fiori-annotation-api/src/cds/deletion.ts @@ -31,7 +31,7 @@ export const enum DeletionRangeKind { TARGET_FROM_WITH = 'TargetFromWith' // deletion starts from 'with' keyword, i.e. "with @Core.Description: 'description'" } -const cdsKeywords = [ +const cdsKeywords = new Set([ 'ABSTRACT', 'ACTION', 'ANNOTATE', @@ -47,7 +47,7 @@ const cdsKeywords = [ 'TYPE', 'USING', 'VIEW' -]; +]); const separatorForKind: { [kind: string]: string; @@ -819,7 +819,7 @@ function getClosingTokenIndex(tokens: CompilerToken[], startIndex: number): numb // (this is not possible: element/parameter list could be followed by annotations of entity/action) // only include trailing comments if they are followed by a semicolon closingTokenIndex = token.text !== ';' && commentStartIndex > 0 ? commentStartIndex : index; - } else if (cdsKeywords.includes((token.text || '').toUpperCase())) { + } else if (cdsKeywords.has((token.text || '').toUpperCase())) { // start of next CDS statement closingTokenIndex = commentStartIndex > 0 ? commentStartIndex : index; } else if (['(', '{'].includes(token.text)) { diff --git a/packages/inquirer-common/src/error-handler/error-handler.ts b/packages/inquirer-common/src/error-handler/error-handler.ts index 072e14ef4bb..ed52e96fb5b 100644 --- a/packages/inquirer-common/src/error-handler/error-handler.ts +++ b/packages/inquirer-common/src/error-handler/error-handler.ts @@ -406,7 +406,7 @@ export class ErrorHandler { } return Object.keys(ERROR_TYPE).find((errorCodeType) => { return ERROR_MAP[errorCodeType as ERROR_TYPE].find((exp: RegExp) => exp.test(errorValueToFind.toString())); - }, {}) as ERROR_TYPE; + }) as ERROR_TYPE; } /** diff --git a/packages/odata-annotation-core/src/annotation-file.ts b/packages/odata-annotation-core/src/annotation-file.ts index 59564849163..b7c5f9f763b 100644 --- a/packages/odata-annotation-core/src/annotation-file.ts +++ b/packages/odata-annotation-core/src/annotation-file.ts @@ -42,7 +42,7 @@ export function isElementWithName(node: AnyNode | undefined, name: string): node * @returns boolean check result */ function isEmptyText(text: string): boolean { - return (text || '').replace(/[\s]/g, '').length === 0; + return (text || '').replace(/\s/g, '').length === 0; } /** diff --git a/packages/odata-vocabularies/src/vocabulary-service.ts b/packages/odata-vocabularies/src/vocabulary-service.ts index 573059e6ac8..ddc12bef21a 100644 --- a/packages/odata-vocabularies/src/vocabulary-service.ts +++ b/packages/odata-vocabularies/src/vocabulary-service.ts @@ -156,7 +156,9 @@ export class VocabularyService { } }); - this.cdsVocabulary.nameMap.forEach((value, key) => this.cdsVocabulary.reverseNameMap.set(value, key)); + for (const [key, value] of this.cdsVocabulary.nameMap.entries()) { + this.cdsVocabulary.reverseNameMap.set(value, key); + } } } diff --git a/packages/preview-middleware-client/src/cpe/init.ts b/packages/preview-middleware-client/src/cpe/init.ts index 492ff56f009..5be08fd2edf 100644 --- a/packages/preview-middleware-client/src/cpe/init.ts +++ b/packages/preview-middleware-client/src/cpe/init.ts @@ -25,6 +25,15 @@ import { ODataHealthChecker } from './odata-health/odata-health-checker'; import { sendInfoCenterMessage } from '../utils/info-center-message'; import { ODataUpStatus } from './odata-health/odata-health-status'; +/** + * Subscribes a handler to the CommunicationService + * + * @param handler action handler + */ +function subscribe(handler: ActionHandler): void { + CommunicationService.subscribe(handler); +} + export default function init( rta: RuntimeAuthoring, registries: QuickActionDefinitionRegistry[] = [] @@ -37,14 +46,6 @@ export default function init( enableTelemetry(); } - /** - * - * @param handler action handler - */ - function subscribe(handler: ActionHandler): void { - CommunicationService.subscribe(handler); - } - const rtaService = new RtaService(rta); const changesService = new ChangeService({ rta }); diff --git a/packages/ui-components/src/components/UITable/UITable-helper.tsx b/packages/ui-components/src/components/UITable/UITable-helper.tsx index 097b1bbbe6e..5e456201957 100644 --- a/packages/ui-components/src/components/UITable/UITable-helper.tsx +++ b/packages/ui-components/src/components/UITable/UITable-helper.tsx @@ -14,7 +14,11 @@ import type { UIColumn, EditedCell, UITableProps, UITableState } from '.'; */ export function _copyAndSort(items: T[], columnKey: string, isSortedDescending?: boolean): T[] { const key = columnKey as keyof T; - return items.slice(0).sort((a: T, b: T) => ((isSortedDescending ? a[key] > b[key] : a[key] < b[key]) ? 1 : -1)); + return items.slice(0).sort((a: T, b: T) => { + const comparison = a[key] < b[key]; + const shouldSwap = isSortedDescending ? !comparison : comparison; + return shouldSwap ? 1 : -1; + }); } /** diff --git a/packages/ui5-application-writer/src/data/validators.ts b/packages/ui5-application-writer/src/data/validators.ts index 07861552cc9..cccf85e779e 100644 --- a/packages/ui5-application-writer/src/data/validators.ts +++ b/packages/ui5-application-writer/src/data/validators.ts @@ -13,7 +13,7 @@ export function validateAppId(appId: string): boolean { if (!appId) { throw new Error(t('error.missingRequiredProperty', { propertyName: 'app.id' })); } - const match = appId.match(/["]/); + const match = appId.match(/"/); if (match) { throw new Error( t('error.disallowedCharacters', { propertyName: 'app.id', disallowedChars: `${match?.join()}` }) From 81e84a398fe19d953238107b62cbe89d814fe605 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Dec 2025 11:11:24 +0000 Subject: [PATCH 10/13] Linting auto fix commit --- .../src/printer/indent.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/cds-odata-annotation-converter/src/printer/indent.ts b/packages/cds-odata-annotation-converter/src/printer/indent.ts index 86eff73ae3c..db63ee1db0c 100644 --- a/packages/cds-odata-annotation-converter/src/printer/indent.ts +++ b/packages/cds-odata-annotation-converter/src/printer/indent.ts @@ -10,15 +10,11 @@ const CLOSING_CHARACTERS = new Set([']', '}', ')']); * * @param string - String representing a complete element * @param indentInfo - indentation level, default 0 and skipFirstLine a boolean flag, flag to skip indenting first line if insert position is known. + * @param indentInfo.level + * @param indentInfo.skipFirstLine * @returns Indent a string representing a complete element. */ -export function indent( - string: string, - { - level = 0, - skipFirstLine = false - } = {} -): string { +export function indent(string: string, { level = 0, skipFirstLine = false } = {}): string { const parts = string.split('\n'); for (let i = 0; i < parts.length; i++) { const line = parts[i]; From 65cf9e020bc1590afee8a314ae2359c5e4ce5243 Mon Sep 17 00:00:00 2001 From: D048415 Date: Fri, 19 Dec 2025 12:12:54 +0100 Subject: [PATCH 11/13] adjust changeset --- .changeset/six-pots-perform.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.changeset/six-pots-perform.md b/.changeset/six-pots-perform.md index 93fe1bf9159..0a57076c2c1 100644 --- a/.changeset/six-pots-perform.md +++ b/.changeset/six-pots-perform.md @@ -1,13 +1,27 @@ --- +'@sap-ux/cds-odata-annotation-converter': patch '@sap-ux-private/preview-middleware-client': patch '@sap-ux/control-property-editor': patch +'@sap-ux/serve-static-middleware': patch '@sap-ux/odata-service-inquirer': patch +'@sap-ux/ui5-application-writer': patch +'@sap-ux/cds-annotation-parser': patch +'@sap-ux/fiori-docs-embeddings': patch +'@sap-ux/fiori-elements-writer': patch '@sap-ux/odata-annotation-core': patch +'@sap-ux/annotation-generator': patch +'@sap-ux/fiori-annotation-api': patch '@sap-ux/jest-environment-ui5': patch +'@sap-ux/odata-vocabularies': patch '@sap-ux/environment-check': patch +'@sap-ux/axios-extension': patch +'@sap-ux/inquirer-common': patch '@sap-ux/deploy-tooling': patch +'@sap-ux/project-access': patch '@sap-ux/fe-fpm-writer': patch +'@sap-ux/launch-config': patch '@sap-ux/ui-components': patch +'@sap-ux/adp-tooling': patch --- fix sonar issues From 0e8422d4453fb31c5bc570ce5235f5f95639e3e4 Mon Sep 17 00:00:00 2001 From: D048415 Date: Fri, 19 Dec 2025 12:47:20 +0100 Subject: [PATCH 12/13] undo fix --- packages/odata-vocabularies/src/vocabulary-service.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/odata-vocabularies/src/vocabulary-service.ts b/packages/odata-vocabularies/src/vocabulary-service.ts index ddc12bef21a..573059e6ac8 100644 --- a/packages/odata-vocabularies/src/vocabulary-service.ts +++ b/packages/odata-vocabularies/src/vocabulary-service.ts @@ -156,9 +156,7 @@ export class VocabularyService { } }); - for (const [key, value] of this.cdsVocabulary.nameMap.entries()) { - this.cdsVocabulary.reverseNameMap.set(value, key); - } + this.cdsVocabulary.nameMap.forEach((value, key) => this.cdsVocabulary.reverseNameMap.set(value, key)); } } From ab765c189d953800f3bcca45987d2b62863b267c Mon Sep 17 00:00:00 2001 From: D048415 Date: Fri, 19 Dec 2025 12:56:41 +0100 Subject: [PATCH 13/13] adjust changeset --- .changeset/six-pots-perform.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.changeset/six-pots-perform.md b/.changeset/six-pots-perform.md index 0a57076c2c1..dbebf219a09 100644 --- a/.changeset/six-pots-perform.md +++ b/.changeset/six-pots-perform.md @@ -12,7 +12,6 @@ '@sap-ux/annotation-generator': patch '@sap-ux/fiori-annotation-api': patch '@sap-ux/jest-environment-ui5': patch -'@sap-ux/odata-vocabularies': patch '@sap-ux/environment-check': patch '@sap-ux/axios-extension': patch '@sap-ux/inquirer-common': patch