Skip to content

Conversation

@non-bin
Copy link

@non-bin non-bin commented Jul 16, 2025

User description

So. This is a much needed chore.

Firstly, using npm and yarn in the same project causes weird issues, like I couldn't install new dependencies for the web port.

Second, I'll go through all packages, but at least the following need updating:

  1. [email protected] was depricated 7 years ago. The current version is [email protected]
  2. temp hasn't been updated in 5 years, and depends on [email protected] which is 7 years old, and versions prior to v4 are no longer supported
  3. [email protected], 7 years old, replaced by [email protected]

additionally

  1. electron-forge is on the latest version, but depends on sudo-prompt whick is dead, and [email protected] but versions prior to v9 are no longer supported
  2. @electron/packager which also depends on [email protected]

I'm certain that other packages are way out of date too

Full warnings
warning [email protected]: Please use the ol package instead
warning openlayers > closure-util > [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
warning openlayers > [email protected]: Package no longer supported. Contact [email protected] for more info.
warning openlayers > closure-util > [email protected]: Package no longer supported. Contact [email protected] for more info.
warning openlayers > [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs.
warning openlayers > [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
warning openlayers > closure-util > [email protected]: Glob versions prior to v9 are no longer supported
warning openlayers > closure-util > [email protected]: This package is no longer supported.
warning openlayers > temp > [email protected]: Rimraf versions prior to v4 are no longer supported
warning openlayers > closure-util > [email protected]: Rimraf versions prior to v4 are no longer supported
warning openlayers > closure-util > rimraf > [email protected]: Glob versions prior to v9 are no longer supported
warning openlayers > closure-util > gaze > globule > [email protected]: Glob versions prior to v9 are no longer supported
warning openlayers > closure-util > get-down > [email protected]: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.

(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
warning openlayers > closure-util > get-down > decompress-zip > [email protected]: You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other.

(For a CapTP with native promises, see @endo/eventual-send and @endo/captp)
warning openlayers > closure-util > get-down > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning openlayers > closure-util > get-down > [email protected]: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
warning openlayers > closure-util > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning openlayers > closure-util > rimraf > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning openlayers > closure-util > gaze > globule > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning openlayers > closure-util > npmlog > [email protected]: This package is no longer supported.
warning openlayers > closure-util > npmlog > [email protected]: This package is no longer supported.
warning openlayers > closure-util > get-down > request > [email protected]: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning openlayers > closure-util > get-down > request > [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning openlayers > closure-util > get-down > request > [email protected]: this library is no longer supported
warning openlayers > closure-util > socket.io > engine.io > [email protected]: New code is available at github.com/uNetworking/uWebSockets.js
warning openlayers > closure-util > get-down > request > hawk > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning openlayers > closure-util > get-down > request > hawk > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning openlayers > closure-util > get-down > request > hawk > boom > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning openlayers > closure-util > get-down > request > hawk > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning openlayers > closure-util > get-down > request > hawk > cryptiles > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning openlayers > closure-util > get-down > request > hawk > [email protected]: This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning openlayers > closure-util > get-down > request > hawk > sntp > [email protected]: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning temp > [email protected]: Rimraf versions prior to v4 are no longer supported
warning temp > rimraf > [email protected]: Glob versions prior to v9 are no longer supported
warning [email protected]: replaced by i18next-http-backend
warning @electron/packager > @electron/asar > [email protected]: Glob versions prior to v9 are no longer supported
warning @electron/packager > @electron/get > global-agent > [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning @electron/packager > @electron/get > global-agent > roarr > [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning @electron/packager > get-package-info > [email protected]: This package is deprecated. Use the optional chaining (?.) operator instead.
warning @electron-forge/cli > @electron-forge/core > [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
warning @electron-forge/cli > @electron-forge/core-utils > @electron/rebuild > @electron/node-gyp > [email protected]: Glob versions prior to v9 are no longer supported
warning @electron-forge/cli > @electron-forge/core-utils > @electron/rebuild > @electron/node-gyp > glob > [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
warning @electron-forge/cli > @electron-forge/core-utils > @electron/rebuild > @electron/node-gyp > make-fetch-happen > cacache > [email protected]: Glob versions prior to v9 are no longer supported
warning @electron-forge/cli > @electron-forge/core-utils > @electron/rebuild > @electron/node-gyp > make-fetch-happen > cacache > [email protected]: Rimraf versions prior to v4 are no longer supported
warning @electron-forge/cli > @electron-forge/core-utils > @electron/rebuild > @electron/node-gyp > make-fetch-happen > cacache > rimraf > [email protected]: Glob versions prior to v9 are no longer supported
warning @electron-forge/cli > @electron-forge/core-utils > @electron/rebuild > @electron/node-gyp > make-fetch-happen > cacache > @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
warning @electron-forge/cli > @electron-forge/core-utils > @electron/rebuild > @electron/node-gyp > make-fetch-happen > cacache > @npmcli/move-file > [email protected]: Rimraf versions prior to v4 are no longer supported
warning @electron-forge/maker-deb > electron-installer-debian > electron-installer-common > [email protected]: Glob versions prior to v9 are no longer supported
warning @electron-forge/maker-deb > electron-installer-debian > get-folder-size > [email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

PR Type

Enhancement


Description

  • Upgrade OpenLayers from deprecated v4.6.5 to modern v10.6.1

  • Switch from CommonJS require to ES6 import syntax

  • Standardize package management to use yarn exclusively

  • Update code formatting and fix syntax inconsistencies


Changes diagram

flowchart LR
  A["Old OpenLayers v4.6.5"] --> B["New OpenLayers v10.6.1"]
  C["CommonJS require()"] --> D["ES6 import syntax"]
  E["Mixed npm/yarn"] --> F["Yarn only"]
  G["Inconsistent formatting"] --> H["Standardized formatting"]
Loading

Changes walkthrough 📝

Relevant files
Enhancement
gps.js
Modernize OpenLayers imports and formatting                           

tabs/gps.js

  • Replace require('openlayers') with import * as ol from 'ol'
  • Update OpenLayers API calls to match v10.6.1 syntax
  • Standardize code formatting and indentation
  • Fix object property syntax inconsistencies
  • +501/-427
    waypointCollection.js
    Update OpenLayers import syntax                                                   

    js/waypointCollection.js

  • Change require('openlayers') to import * as ol from 'ol'
  • Update code formatting and indentation consistency
  • Maintain existing functionality with new import syntax
  • +583/-469
    groundstation.js
    Modernize OpenLayers integration                                                 

    js/groundstation.js

  • Replace require('openlayers') with import * as ol from 'ol'
  • Improve code formatting and consistency
  • Update OpenLayers API usage for v10.6.1
  • +172/-166
    Configuration changes
    styles.css
    Disable deprecated OpenLayers CSS                                               

    src/css/styles.css

  • Comment out deprecated OpenLayers CSS import
  • Add FIXME comment for future resolution
  • +1/-1     
    Dependencies
    package.json
    Update OpenLayers dependency                                                         

    package.json

  • Replace [email protected] with [email protected]
  • Reorder dependencies alphabetically
  • Update to modern OpenLayers package name
  • +15/-15 
    Additional files
    mission_control.js +4960/-4015

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • non-bin added 2 commits July 16, 2025 12:26
    There's no need for npm and yarn to be used, in fact they cause weird issues when used together.
    @non-bin non-bin marked this pull request as ready for review July 16, 2025 03:02
    @non-bin non-bin marked this pull request as draft July 16, 2025 03:02
    @qodo-merge-pro
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Import Syntax

    Mixed import syntax using both ES6 import and CommonJS require in the same file. Line 4 uses ES6 import for ol while other dependencies use require. This inconsistency could cause module loading issues.

    import * as ol from 'ol';
    const semver = require('semver');
    Async Import

    Dynamic import of ol module using import() function which returns a Promise, but the code doesn't handle the asynchronous nature properly. This will likely cause runtime errors when trying to access ol properties.

    const ol = import('ol');
    Missing CSS

    The OpenLayers CSS import is commented out with a FIXME comment, which means the map styling will be broken. This needs to be replaced with the correct CSS import for the new ol package.

    /* @import './../../node_modules/openlayers/dist/ol.css'; FIXME */
    @import 'tabs/adjustments.css';

    @qodo-merge-pro
    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Maintain consistent module import syntax

    The ES6 import syntax is mixed with CommonJS require statements throughout the
    file. This creates inconsistency and potential compatibility issues. Consider
    using either all ES6 imports or all CommonJS requires for consistency.

    tabs/mission_control.js [5]

    -import * as ol from 'ol';
    +const ol = require('ol');
    • Apply / Chat
    Suggestion importance[1-10]: 6

    __

    Why: The suggestion correctly points out that the PR introduces an ES6 import statement while the rest of the file uses CommonJS require, and recommends using require for consistency, which improves code maintainability.

    Low
    Use template literals for safer string construction

    The string concatenation for the image source path could fail if
    safehome.isUsed() returns a non-boolean value or throws an error. Add proper
    error handling or use template literals for safer string construction.

    tabs/mission_control.js [615-623]

     image: new ol.style.Icon({
       anchor: [0.5, 1],
       opacity: 1,
       scale: 0.5,
    -  src:
    -    './images/icons/cf_icon_safehome' +
    -    (safehome.isUsed() ? '_used' : '') +
    -    '.png'
    +  src: `./images/icons/cf_icon_safehome${safehome.isUsed() ? '_used' : ''}.png`
     })
    • Apply / Chat
    Suggestion importance[1-10]: 5

    __

    Why: The suggestion correctly proposes using template literals for string construction, which is a valid improvement for code readability and modern JavaScript style, although the existing concatenation is not inherently unsafe.

    Low
    Use consistent module loading syntax

    Mixing ES6 import syntax with CommonJS require() creates inconsistent module
    loading patterns. Either convert all imports to ES6 modules or use require()
    consistently throughout the file.

    js/groundstation.js [4]

    -import * as ol from 'ol';
    +const ol = require('ol');
    • Apply / Chat
    Suggestion importance[1-10]: 5

    __

    Why: The suggestion correctly points out the inconsistent use of import and require, and using require would align with the module loading style in the rest of the file.

    Low
    Quote object property keys consistently

    The LAYERS parameter should be quoted consistently with other string keys in the
    codebase. This ensures consistent object property formatting.

    js/groundstation.js [76-79]

     privateScope.mapLayer = new ol.source.TileWMS({
       url: globalSettings.proxyURL,
    -  params: { LAYERS: globalSettings.proxyLayer }
    +  params: { 'LAYERS': globalSettings.proxyLayer }
     });
    • Apply / Chat
    Suggestion importance[1-10]: 2

    __

    Why: This is a minor stylistic suggestion about quoting an object key, which has no functional impact and reverts a formatting change made in the PR.

    Low
    • More

    @sensei-hacker
    Copy link
    Member

    Thanks for working on this!

    @Scavanger recently did fairly extensive work on Configurator, so they may have some useful comments or suggestions.

    @Scavanger
    Copy link
    Contributor

    Unfortunately, there is some overlap with #2285

    Let's merge it first, then see what happens.

    @sensei-hacker
    Copy link
    Member

    The description gives good reasons why this needs to be done. I see it is still a work in progress.
    Do you think you'll get time to work on it more?

    @non-bin
    Copy link
    Author

    non-bin commented Nov 17, 2025

    I would like to, but I wouldn't count on my ADHD ass to get to it any time soon :P
    I'm also waiting for #2285, but if you want to continue the work please do

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants