Repository navigation
chore(deps): drop unused deps and apply safe security updates - #239
Merged
Merged
Conversation
Collaborator
Author
TestSetup: Test Case 1 - Install and build
Test Case 2 - Login
Test Case 3 - Calls and phone island
Test Case 4 - Command bar
Test Case 5 - NethLink modules
Test Case 6 - Theme and language
Test Case 7 - Tooltips and modals
Test Case 8 - Packaged app
|
tommaso-ascani
approved these changes
Oct 15, 2026
tommaso-ascani
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Note: the lockfile bumps @types/jest to 30 (major), not mentioned in the description.
Collaborator
Author
|
@tommaso-ascani right, |
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.
Summary
Goal: reduce the Renovate PRs opened every Monday on packages we don't use, clear the security alerts that can be fixed without major upgrades, and remove dead code. Same approach as nethesis/nethvoice-cti#591 and nethesis/phone-island#293. No behavior change intended.
Everything removed has zero references on
main(imports,require(), configs, scripts, workflows, IPC channel strings, asset file names).Removed dependencies (no import, config or runtime usage)
crypto-browserify,i18next-http-backend,i18next-browser-languagedetector(i18n uses a custom detector),vite-plugin-copy,auto-launch(login start usesapp.setLoginItemSettings),rollup(vite brings its own).tailwind-scrollbar: it was never registered intailwind.config.jsplugins, so thescrollbar-*classes inModalproduced no CSS. Those dead classes are removed too (generated CSS unchanged).@nethesis/nethesis-light-svg-icons,@nethesis/nethesis-brands-svg-icons: never imported (they are also GitHub-hosted, so install gets faster).motion: replaced byframer-motioninProfileDialog(same 11.18.2 code).motionshipped its own internal copy of framer-motion and motion-dom, so the renderer bundled framer-motion twice: -258 kB of renderer JS. The two copies differ only in import paths;ProfileDialoguses onlymotion.divwithanimate(noAnimatePresence/MotionConfigcontext).@date-fns/utc:new UTCDate(...)replaced withnew Date(Date.UTC(...))inCallsDateanddateTime, as in nethvoice-cti#591.UTCDate's constructor issetTime(Date.UTC(...arguments))and both values go straight intoutcToZonedTime, which clones the timestamp. Checked on 3.36M comparisons (3 system time zones, 14 server offsets/zones, IT/EN, edge dates, NaN): zero differences.Kept on purpose: the 4 native
dependencies(externalized by electron-vite and packed by electron-builder),dmg-license,electron-builder-notarizeand the@electron/notarizeoverride (they need a macOS release to verify),moment,clsx/tailwind-merge.Undeclared dependencies
react-tooltipis now declared (^5.28.0, same version as before):CustomThemedTooltipimports it at runtime but it only resolved through@nethesis/phone-island.IconDefinitionis imported from@fortawesome/fontawesome-svg-coreinstead of the undeclared@fortawesome/fontawesome-common-types.Security updates (lockfile only, no major bumps of our dependencies)
@xmldom/xmldom,ws/engine.io-client,js-yaml3.x,brace-expansion,minimatch,postcss-selector-parser,http-cache-semantics,@babel/*(all patch/minor within the declared ranges).One transitive major:
@types/jest29.5.14 → 30.0.0 (with its type-only chainexpect/jest-diff/pretty-format30,ci-info4). It is not ours: it comes from@nethesis/phone-island→@testing-library/jest-dom→@types/testing-library__jest-dom, which declares"@types/jest": "*". Onmainthe 29.x chain (expect→jest-message-util→micromatch→braces) reports 4 high advisories. It is types only: nothing imports it, it is not in any bundle, andtypecheckstays at 0 errors.The
libcfields that npm 10.9.8 strips from the lockfile were restored (14 entries, nolibcline in the diff).Still open, out of scope: Electron 28 (fixes need >= 38), react-router 7,
node-forge(viawin-ca) andjimp/file-type(vianut-js) which have no upstream fix.Removed dead code
hooks/useIsomorphicLayoutEffect.ts,ProfileDialog/NethVoiceLink.tsx, 5 unreferenced assets insrc/renderer/src/assets.lib/utils.ts, 8 inlib/dateTime.ts,isDeepEqual,Log.startTime/logTime/endTime,NetworkController.post,PhoneIslandController.{muteAudio,unmuteAudio,forceHide,forceShow,showPhoneIsland,hidePhoneIsland}(+ theisWarmingUpflag only set byforceHide), the emptyNethVoiceAPInamespaces,Profiling,User.all,Phonebook.{updateSpeeddialBy,updateContact,deleteContact}, unused types.RECONNECT_PHONE_ISLAND,DEV_TOOL_TOGGLE_CONNECTION,EMIT_RINGTONE_LIST,INITIALIZATION_COMPELTED,TOGGLE_COMMAND_BAR,HIDE_LOGIN_WINDOW,SHOW/HIDE_PHONE_ISLAND,ON_CHANGE_THEMEwhich nobody listened to; the main-sideSHOW_COMMAND_BARlistener nobody sent to) and the matching unused preload bridge members.window.emitis onlywebContents.sendand there is no dynamicIPC_EVENTS[...]access.#__next,#openDevToolButton).user_data.json),Theme.ts, component props, hook subscriptions, phone-island events, translations,BaseWindow.addListener(used by feat(screen-share): let users choose which screen or window to share #238).Results (clean
npm ci+ build, main vs this branch)npm audit(all /--omit=dev)out/main/main.js/out/preload/index.jstypecheckerrorselectron-builder --linux --dirstill packs the 4 native modules (@nut-tree-fork/nut-js,koffi,uiohook-napi,win-ca).How to test
rm -rf node_modules out dist && npm ci && npm run buildnpm run devand follow the test cases in the comment below.