Repository navigation
fix(nanoflow-actions-native): GetStraightLineDistance runtime errors - #688
Merged
Merged
Conversation
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) <noreply@anthropic.com>
MxKevinBeqo
approved these changes
Oct 21, 2026
NikolaSimsic
approved these changes
Oct 22, 2026
NikolaSimsic
enabled auto-merge
October 22, 2026 14:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
This PR contains
What is the purpose of this PR?
Support ticket: in the latest Nanoflow Commons, the
GetStraightLineDistanceaction fails at runtime. There are two errors, in this order:deg2rad is not definedBig is not definedRelevant changes
GetStraightLineDistance.ts: the first statement after// BEGIN EXTRA CODEwas atypealias. TypeScript drops type aliases together with their leading comment, so the built file had no// BEGIN EXTRA CODEmarker. Studio Pro then discarded the helper functions (deg2rad,kmToStatueMile,kmToNauticalMile). The alias is moved after the helpers so the marker survives.configs/jsactions/rollup-plugin-bigjs-import-replacer.mjs: the plugin removedimport { Big } from "big.js";from all built JS actions, expecting mxbuild to add it back. It does not, so every action that createsBigvalues failed. The plugin now keeps the import (normalized to double quotes). This affects both Nanoflow Commons and Native Mobile Resources (for exampleTimeBetween,GetCurrentLocation,ShowProgress,SignIn,GetDeviceInfo).What should be covered while testing?
GetStraightLineDistancefrom a nanoflow (web and native) and check the result.TimeBetween,GetCurrentLocation) on web and native.javascriptsource/after a fresh module import. TheBigimport now appears above the generated header, like other imports already do.Extra comments (optional)
Cherry-pick of the mx/11.12.x fix. Verified: both modules build; every built action has matching EXTRA CODE markers and imports Big where it uses it; the built action returns correct distances in all units (Node + big.js).
🤖 Generated with Claude Code