Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to 1.129.0 and tests for 2.x compatibility #1090

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Private folders
_

# Ignore Mac files
.DS_Store

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
2 changes: 1 addition & 1 deletion packages/ui5-middleware-approuter/test/crud/ui5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
2 changes: 1 addition & 1 deletion packages/ui5-middleware-approuter/test/no-auth/ui5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
2 changes: 1 addition & 1 deletion packages/ui5-middleware-approuter/test/rewrite/ui5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ resources:

framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ resources:

framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
2 changes: 1 addition & 1 deletion packages/ui5-task-copyright/test/__assets__/ui5.file.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
type: application
framework:
name: OpenUI5
version: "1.127.0"
version: "1.129.0"
libraries:
- name: sap.m
- name: sap.ui.core
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,4 @@
sap.ui.define(['sap/base/strings/hyphenate', 'sap/ui/core/webc/WebComponentRenderer', 'sap/ui/base/DataType'], (function (hyphenate, WebComponentRenderer, DataType) { 'use strict';

// Fixed with https://github.com/SAP/openui5/commit/7a4615e3fe55221ae9de9d876d3eed209f71a5b1 in UI5 1.128.0


WebComponentRenderer.renderAttributeProperties = function (oRm, oWebComponent) {
var oAttrProperties = oWebComponent.getMetadata().getPropertiesByMapping("property");
// ##### MODIFICATION START #####
var aPropsToAlwaysSet = ["enabled"].concat(
Object.entries(oWebComponent.getMetadata().getPropertyDefaults()).map(([key, value]) => {
return value !== undefined && value !== false ? key : null;
})
); // some properties can be initial and still have a non-default value due to side effects (e.g. EnabledPropagator)
// ##### MODIFICATION END #####
for (var sPropName in oAttrProperties) {
if (oWebComponent.isPropertyInitial(sPropName) && !aPropsToAlwaysSet.includes(sPropName)) {
continue; // do not set attributes for properties that were not explicitly set or bound
}

var oPropData = oAttrProperties[sPropName];
var vPropValue = oPropData.get(oWebComponent);
if (oPropData.type === "object" || typeof vPropValue === "object") {
continue; // Properties of type "object" and custom-type properties with object values are set during onAfterRendering
}

var sAttrName = oPropData._sMapTo ? oPropData._sMapTo : hyphenate(sPropName);
if (oPropData._fnMappingFormatter) {
vPropValue = oWebComponent[oPropData._fnMappingFormatter].call(oWebComponent, vPropValue);
}

if (oPropData.type === "boolean") {
if (vPropValue) {
oRm.attr(sAttrName, "");
}
} else {
if (vPropValue != null) {
oRm.attr(sAttrName, vPropValue);
}
}
}
};
sap.ui.define(['sap/ui/base/DataType'], (function (DataType) { 'use strict';

const pkg = {
"_ui5metadata": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sap.ui.define(['sap/ui/base/DataType', './webcomponents-base', 'sap/base/strings/hyphenate', 'sap/ui/core/webc/WebComponentRenderer'], (function (DataType, _ui5_webcomponentsBase, hyphenate, WebComponentRenderer) { 'use strict';
sap.ui.define(['sap/ui/base/DataType', './webcomponents-base'], (function (DataType, _ui5_webcomponentsBase) { 'use strict';

const pkg = {
"_ui5metadata": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sap.ui.define(['ui5/ecosystem/demo/app/resources/@ui5/webcomponents', 'sap/ui/core/webc/WebComponent', 'sap/ui/base/DataType', 'ui5/ecosystem/demo/app/resources/@ui5/webcomponents-base', 'sap/base/strings/hyphenate', 'sap/ui/core/webc/WebComponentRenderer'], (function (_ui5_webcomponents, WebComponentBaseClass, DataType, _ui5_webcomponentsBase, hyphenate, WebComponentRenderer) { 'use strict';
sap.ui.define(['ui5/ecosystem/demo/app/resources/@ui5/webcomponents', 'sap/ui/core/webc/WebComponent', 'sap/ui/base/DataType', 'ui5/ecosystem/demo/app/resources/@ui5/webcomponents-base'], (function (_ui5_webcomponents, WebComponentBaseClass, DataType, _ui5_webcomponentsBase) { 'use strict';

const isSSR$2 = typeof document === "undefined";
const internals = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sap.ui.define(['sap/ui/base/DataType', '../webcomponents-base', 'sap/base/strings/hyphenate', 'sap/ui/core/webc/WebComponentRenderer'], (function (DataType, _ui5_webcomponentsBase, hyphenate, WebComponentRenderer) { 'use strict';
sap.ui.define(['sap/ui/base/DataType', '../webcomponents-base'], (function (DataType, _ui5_webcomponentsBase) { 'use strict';

const pkg = {
"_ui5metadata": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sap.ui.define(['ui5/ecosystem/demo/app/resources/webcomponents-base', 'ui5/ecosystem/demo/app/resources/@ui5/webcomponents', 'sap/ui/core/webc/WebComponent', 'sap/base/strings/hyphenate', 'sap/ui/core/webc/WebComponentRenderer', 'sap/ui/base/DataType'], (function (_ui5_webcomponentsBase, _ui5_webcomponents, WebComponentBaseClass, hyphenate, WebComponentRenderer, DataType) { 'use strict';
sap.ui.define(['ui5/ecosystem/demo/app/resources/webcomponents-base', 'ui5/ecosystem/demo/app/resources/@ui5/webcomponents', 'sap/ui/core/webc/WebComponent', 'sap/ui/base/DataType'], (function (_ui5_webcomponentsBase, _ui5_webcomponents, WebComponentBaseClass, DataType) { 'use strict';

const kebabToCamelMap = new Map();
const camelToKebabMap = new Map();
Expand Down
Loading
Loading