From 0c66d271176fee065dc68cf7bc17660d342c8e2b Mon Sep 17 00:00:00 2001 From: stelselim Date: Mon, 19 Oct 2026 16:02:39 +0200 Subject: [PATCH 1/2] fix: update changelog and resolve distance unit type declaration --- packages/jsActions/nanoflow-actions-native/CHANGELOG.md | 1 + .../src/geolocation/GetStraightLineDistance.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/jsActions/nanoflow-actions-native/CHANGELOG.md b/packages/jsActions/nanoflow-actions-native/CHANGELOG.md index 083405075..a530e81f8 100644 --- a/packages/jsActions/nanoflow-actions-native/CHANGELOG.md +++ b/packages/jsActions/nanoflow-actions-native/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed +- Fixed an issue where the "Get straight line distance" action threw an error at runtime. - Fixed a resource leak in `Get current location with minimum accuracy` where the timeout and location watcher were not cleared on error. - Fixed an issue where base64-to-image decoding was failing. diff --git a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts index 6974922b1..89477aa0b 100644 --- a/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts +++ b/packages/jsActions/nanoflow-actions-native/src/geolocation/GetStraightLineDistance.ts @@ -9,8 +9,6 @@ import { Big } from "big.js"; // BEGIN EXTRA CODE -type DistanceUnit = "KILOMETER" | "STATUTE_MILE" | "NAUTICAL_MILE"; - function deg2rad(deg: Big): Big { return deg.times(Math.PI / 180); } @@ -23,6 +21,8 @@ function kmToNauticalMile(km: Big): Big { return km.div(1.852); } +type DistanceUnit = "KILOMETER" | "STATUTE_MILE" | "NAUTICAL_MILE"; + // END EXTRA CODE /** From ce27febc023ea299f69aa4dcf89355ed11187d42 Mon Sep 17 00:00:00 2001 From: stelselim Date: Tue, 20 Oct 2026 08:46:02 +0200 Subject: [PATCH 2/2] fix: keep big.js import in built js actions The bigjs import replacer stripped `import { Big } from "big.js"` from the build output, assuming mxbuild would re-add it. It does not, so actions creating Big values failed at runtime with "Big is not defined". Co-Authored-By: Claude Opus 5.5 (1M context) --- configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs | 7 +++++-- packages/jsActions/mobile-resources-native/CHANGELOG.md | 4 ++++ packages/jsActions/nanoflow-actions-native/CHANGELOG.md | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs b/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs index c8d89eac7..22eb1166a 100644 --- a/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs +++ b/configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs @@ -5,8 +5,11 @@ export function bigJsImportReplacer() { const [filename] = Object.keys(bundle); const fileInfo = bundle[filename]; - // 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, ""); + // Keep the Big import (Studio Pro does not re-add it at runtime), normalized to Studio Pro's quote style + fileInfo.code = fileInfo.code.replace( + /^import\s*\{\s*Big\s*\}\s*from\s*['"]big\.js['"];?/m, + `import { Big } from "big.js";` + ); } }; } diff --git a/packages/jsActions/mobile-resources-native/CHANGELOG.md b/packages/jsActions/mobile-resources-native/CHANGELOG.md index 914e2093c..d45eb246a 100644 --- a/packages/jsActions/mobile-resources-native/CHANGELOG.md +++ b/packages/jsActions/mobile-resources-native/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- Fixed an issue where actions using decimal values threw a "Big is not defined" error at runtime. + ### Changed - Replaced @notifee/react-native with react-native-notify-kit library. diff --git a/packages/jsActions/nanoflow-actions-native/CHANGELOG.md b/packages/jsActions/nanoflow-actions-native/CHANGELOG.md index a530e81f8..0b6aa7ae3 100644 --- a/packages/jsActions/nanoflow-actions-native/CHANGELOG.md +++ b/packages/jsActions/nanoflow-actions-native/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Fixed an issue where the "Get straight line distance" action threw an error at runtime. - Fixed a resource leak in `Get current location with minimum accuracy` where the timeout and location watcher were not cleared on error. - Fixed an issue where base64-to-image decoding was failing. +- Fixed an issue where actions using decimal values threw a "Big is not defined" error at runtime. ### Added