From 283113e5ff8425c92a924f95ab32f0ad76228dd2 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Thu, 13 Aug 2026 12:09:19 +0530 Subject: [PATCH 1/4] fix: module changes during app build --- .../rollup-plugin-bigjs-import-replacer.mjs | 3 ++- .../src/geolocation/GetStraightLineDistance.ts | 3 --- scripts/automation/mxbuild.Dockerfile | 16 ++++++++++------ scripts/release/module-automation/commons.js | 7 +++++-- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs b/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs index 206a7bca6..c8d89eac7 100644 --- a/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs +++ b/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs @@ -5,7 +5,8 @@ export function bigJsImportReplacer() { const [filename] = Object.keys(bundle); const fileInfo = bundle[filename]; - fileInfo.code = fileInfo.code.replace("import { Big } from 'big.js';", `import { Big } from "big.js";`); + // Remove Big import entirely - mxbuild will add it in the header at line 8 + fileInfo.code = fileInfo.code.replace(/^import\s*\{\s*Big\s*\}\s*from\s*['"]big\.js['"];?\s*\r?\n/m, ""); } }; } diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts index a013cb54f..6974922b1 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts @@ -8,12 +8,9 @@ import { Big } from "big.js"; // BEGIN EXTRA CODE -// END EXTRA CODE type DistanceUnit = "KILOMETER" | "STATUTE_MILE" | "NAUTICAL_MILE"; -// BEGIN EXTRA CODE - function deg2rad(deg: Big): Big { return deg.times(Math.PI / 180); } diff --git a/scripts/automation/mxbuild.Dockerfile b/scripts/automation/mxbuild.Dockerfile index 49d751b81..eef3a404d 100644 --- a/scripts/automation/mxbuild.Dockerfile +++ b/scripts/automation/mxbuild.Dockerfile @@ -2,12 +2,14 @@ FROM mcr.microsoft.com/dotnet/runtime:8.0 ARG MENDIX_VERSION RUN \ - echo "Installing Java..." && \ + echo "Installing Java 21..." && \ apt-get -qq update && \ apt-get -qq install -y wget libgdiplus && \ - wget -q https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz && \ - mkdir /usr/lib/jvm && \ + wget -q https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz && \ + mkdir -p /usr/lib/jvm && \ tar xfz /tmp/openjdk.tar.gz --directory /usr/lib/jvm && \ + ls /usr/lib/jvm && \ + mv /usr/lib/jvm/jdk-21* /usr/lib/jvm/java-21-openjdk && \ rm /tmp/openjdk.tar.gz RUN \ echo "Downloading mxbuild ${MENDIX_VERSION}..." && \ @@ -20,9 +22,11 @@ RUN \ apt-get clean RUN \ echo "#!/bin/bash -x" >/bin/mxbuild && \ - echo "dotnet /tmp/mxbuild/modeler/mxbuild.dll --java-home=/usr/lib/jvm/jdk-11.0.2 --java-exe-path=/usr/lib/jvm/jdk-11.0.2/bin/java \$@" >>/bin/mxbuild && \ - chmod +x /bin/mxbuild + echo "dotnet /tmp/mxbuild/modeler/mxbuild.dll --java-home=/usr/lib/jvm/java-21-openjdk --java-exe-path=/usr/lib/jvm/java-21-openjdk/bin/java \$@" >>/bin/mxbuild && \ + chmod +x /bin/mxbuild RUN \ echo "#!/bin/bash -x" >/bin/mx && \ echo "dotnet /tmp/mxbuild/modeler/mx.dll \$@" >>/bin/mx && \ - chmod +x /bin/mx \ No newline at end of file + chmod +x /bin/mx + +ENV M2EE_TOOLS_JAR=/tmp/mxbuild/modeler/tools/m2ee-tools.jar \ No newline at end of file diff --git a/scripts/release/module-automation/commons.js b/scripts/release/module-automation/commons.js index 67762893f..db0f8e40d 100644 --- a/scripts/release/module-automation/commons.js +++ b/scripts/release/module-automation/commons.js @@ -78,11 +78,14 @@ async function createModuleMpkInDocker(sourceDir, moduleName, mendixVersion, exc ); } - // Build testProject via mxbuild + // Build testProject and regenerate JS actions + // 1. mx update-widgets: Updates widget files + // 2. mxbuild --target=package: Regenerates JS action files in Studio Pro format (prevents phantom diffs) + // 3. mx create-module-package: Packages the module with the regenerated files const projectFile = basename((await getFiles(sourceDir, [`.mpr`]))[0]); await execShellCommand( `docker run -t -v ${sourceDir}:/source ` + - `--rm mxbuild:${mendixVersion} bash -c "mx update-widgets --loose-version-check /source/${projectFile} && dotnet /tmp/mxbuild/modeler/mx.dll create-module-package ${ + `--rm mxbuild:${mendixVersion} bash -c "mx update-widgets --loose-version-check /source/${projectFile} && mxbuild --target=package /source/${projectFile} && dotnet /tmp/mxbuild/modeler/mx.dll create-module-package ${ excludeFilesRegExp ? `--exclude-files='${excludeFilesRegExp}'` : "" } /source/${projectFile} ${moduleName}"` ); From 7fe16d4c53f6ae1972ce3817c808bbed578ea96c Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Thu, 13 Aug 2026 13:34:52 +0530 Subject: [PATCH 2/4] fix: lint issues --- .../intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx | 1 + .../intro-screen-native/src/__tests__/IntroScreen.spec.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx b/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx index b84a944fe..1ed84bc11 100644 --- a/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx +++ b/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx @@ -79,6 +79,7 @@ describe("Intro Screen", () => { it("renders with async storage identifier", async () => { const component = render(); // Wait for async storage to resolve + // eslint-disable-next-line @typescript-eslint/no-empty-function await act(async () => {}); layout(component, "intro-screen-notch-test"); expect(component.toJSON()).toMatchSnapshot(); diff --git a/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.spec.tsx b/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.spec.tsx index 14c1bd1d4..c172194c8 100644 --- a/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.spec.tsx +++ b/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.spec.tsx @@ -84,6 +84,7 @@ describe("Intro Screen", () => { it("renders with async storage identifier", async () => { const component = render(); // Wait for async storage to resolve + // eslint-disable-next-line @typescript-eslint/no-empty-function await act(async () => {}); layout(component, "intro-screen-test"); expect(component.toJSON()).toMatchSnapshot(); From 8d188ff3f1b6e4daae440172f16fc202178eb6d1 Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Thu, 13 Aug 2026 13:46:30 +0530 Subject: [PATCH 3/4] Revert "fix: lint issues" This reverts commit 7fe16d4c53f6ae1972ce3817c808bbed578ea96c. --- .../intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx | 1 - .../intro-screen-native/src/__tests__/IntroScreen.spec.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx b/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx index 1ed84bc11..b84a944fe 100644 --- a/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx +++ b/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.notch.spec.tsx @@ -79,7 +79,6 @@ describe("Intro Screen", () => { it("renders with async storage identifier", async () => { const component = render(); // Wait for async storage to resolve - // eslint-disable-next-line @typescript-eslint/no-empty-function await act(async () => {}); layout(component, "intro-screen-notch-test"); expect(component.toJSON()).toMatchSnapshot(); diff --git a/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.spec.tsx b/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.spec.tsx index c172194c8..14c1bd1d4 100644 --- a/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.spec.tsx +++ b/packages/pluggableWidgets/intro-screen-native/src/__tests__/IntroScreen.spec.tsx @@ -84,7 +84,6 @@ describe("Intro Screen", () => { it("renders with async storage identifier", async () => { const component = render(); // Wait for async storage to resolve - // eslint-disable-next-line @typescript-eslint/no-empty-function await act(async () => {}); layout(component, "intro-screen-test"); expect(component.toJSON()).toMatchSnapshot(); From ec07db1666ed5ec3116579d1732d69d8dcbb6e5d Mon Sep 17 00:00:00 2001 From: Srirang Kalantri Date: Fri, 14 Aug 2026 14:27:59 +0530 Subject: [PATCH 4/4] fix: use open source link for java21 --- scripts/automation/mxbuild.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/automation/mxbuild.Dockerfile b/scripts/automation/mxbuild.Dockerfile index eef3a404d..84e37a4a1 100644 --- a/scripts/automation/mxbuild.Dockerfile +++ b/scripts/automation/mxbuild.Dockerfile @@ -5,7 +5,7 @@ RUN \ echo "Installing Java 21..." && \ apt-get -qq update && \ apt-get -qq install -y wget libgdiplus && \ - wget -q https://download.oracle.com/java/21/latest/jdk-21_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz && \ + wget -q https://download.java.net/java/GA/jdk21.0.2/f2283984656d49d69e91c558476027ac/13/GPL/openjdk-21.0.2_linux-x64_bin.tar.gz -O /tmp/openjdk.tar.gz && \ mkdir -p /usr/lib/jvm && \ tar xfz /tmp/openjdk.tar.gz --directory /usr/lib/jvm && \ ls /usr/lib/jvm && \