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

[INTERNAL] generateFlexChangesBundle: Fix minUI5Version check for UI5 v1.100.0+ #712

Merged
merged 1 commit into from
Feb 25, 2022
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
5 changes: 3 additions & 2 deletions lib/tasks/bundlers/generateFlexChangesBundle.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const log = require("@ui5/logger").getLogger("builder:tasks:bundlers:generateFlexChangesBundle");
const flexChangesBundler = require("../../processors/bundlers/flexChangesBundler");
const semver = require("semver");

/**
* Task to create changesBundle.json file containing all changes stored in the /changes folder for easier consumption
Expand Down Expand Up @@ -68,9 +69,9 @@ module.exports = async function({workspace, taskUtil, options: {namespace}}) {
const allResources = await workspace.byGlob(
`${pathPrefix}/changes/*.{change,variant,ctrl_variant,ctrl_variant_change,ctrl_variant_management_change}`);
if (allResources.length > 0) {
const version = await readManifestMinUI5Version();
const version = semver.coerce(await readManifestMinUI5Version());
let hasFlexBundleVersion = false;
if (parseFloat(version) >= 1.73) {
if (semver.compare(version, "1.73.0") >= 0) {
hasFlexBundleVersion = true;
}
const processedResources = await flexChangesBundler({
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/expected/build/application.i/dest/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.72",
"libs": {
"sap.ui.layout": {},
"sap.ui.core": {},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.73.2",
"minUI5Version": "1.100.2",
"libs": {
"sap.ui.layout": {},
"sap.ui.core": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
{
"name": "Component-preload.js",
"module": "application/j/Component-preload.js",
"size": 3730,
"size": 3731,
"merged": true,
"required": [
"sap/m/library.js",
Expand Down Expand Up @@ -79,7 +79,7 @@
{
"name": "manifest.json",
"module": "application/j/manifest.json",
"size": 423
"size": 424
},
{
"name": "resources.json",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/expected/build/application.j/dest/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.73.2",
"minUI5Version": "1.100.2",
"libs": {
"sap.ui.layout": {},
"sap.ui.core": {},
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/application.i/webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.72",
"libs": {
"sap.ui.layout": {},
"sap.ui.core": {},
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/application.j/webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"sap.ui5": {
"dependencies": {
"minUI5Version": "1.73.2",
"minUI5Version": "1.100.2",
"libs": {
"sap.ui.layout": {},
"sap.ui.core": {},
Expand Down