-
Notifications
You must be signed in to change notification settings - Fork 370
ESM modules & More #2285
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
base: master
Are you sure you want to change the base?
ESM modules & More #2285
Conversation
|
Tested under Windows and Linux, looks good so far. |
|
Lightly "tested" on Arch Linux
|
Make sure to do a
Works for me on Kubuntu 24.10/X11 and propetary NVIDIA drivers.
Fixed, (wrong filename of an asset) |
|
9.0 (master) is ready for submissions, if you want to get this merged now :) |
|
Bump ;) |
|
No idea, the ARM64 Action hangs on the SITL executable, even though it is no longer present. |
|
Thanks for your work on this! If this is ready to be included in NAV 9.0RC1 tomorrow, please resolve the merge conflicts. |
|
/review |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
/improve |
PR Code Suggestions ✨
|
||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This is a major infrastructure upgrade transitioning the INAV Configurator from CommonJS modules to modern ESM modules, with Vite replacing the previous build system. The PR modernizes the development toolchain while maintaining functionality, except for a known issue with the elevation graph in Mission Control.
Key Changes:
- Complete migration from CommonJS (
require/module.exports) to ESM (import/export) - Integration of Vite as the module bundler and development server
- Replacement of the iOS7-style Switchery library with pure CSS implementation
- Update of npm dependencies and removal of static libraries in favor of npm-managed packages
Reviewed Changes
Copilot reviewed 124 out of 306 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated dependencies, added Vite plugin configuration, changed main entry point to Vite build output, and set module type to "module" |
| js/**/*.js | Converted module syntax from CommonJS to ESM across all JavaScript files |
| js/main/main.js | New main process file with Electron IPC handlers and window management |
| js/main/preload.js | New preload script exposing IPC communication to renderer process |
| js/main/serial.js | New serial port communication handler for main process |
| js/main/tcp.js | New TCP connection handler for main process |
| js/main/udp.js | New UDP connection handler for main process |
| js/main/child_process.js | New child process management for SITL demo mode |
| js/store.js | New store wrapper exposing electron-store via IPC |
| resources/models/*.gltf | Removed GLTF model files (likely moved or handled differently by Vite) |
| js/libraries/* | Removed static library files now managed through npm |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Note the comments from the bots likely include some false positives. Maybe even mostly false positives. But a couple of the points look like they may be valid. |
This will not work, but will only lead to a “range error” and cause the call stack to overflow. |
|
I'm having a couple issues with sensor reading when testing on Ubuntu 22.04. But first, I learned t run it at all I needed to upgrade node to a higher version that what is available via apt: After I got it to run, I found that on two of the three flight controllers I tested, this version of Configurator was not reading accelerometer data and therefore not updating the 3D model. The Sensors tab doesn't show any changes to accelerometer data. The third FC did show the data changing in the Sensors tab, but then the 3D model wasn't visible at all. UPDATE - the accelerometer sensor reading issue continues after I reverted to the master branch or earlier. So the problem may have been caused by my attempt to update npm, rather than the code itself. Now I just need to figure out how to un-screw my system, with limited knowledge about nodejs. :) |
Actually it should be ‘only’ due to support from ESM, but somehow it has become a major maintenance update, the Configurator should now really be fit for the next few years.
Bonus: The packed installers/archives are now about 40 Mb smaller.
Known issues:
Elevation graph in Misson control not working, graph lib incompatible with vite.
Will be fixed in Missionplanner rewrite.