Skip to content

Modernize project: update all dependencies to current versions#113

Open
discostur wants to merge 4 commits into
codecentric:masterfrom
discostur:master
Open

Modernize project: update all dependencies to current versions#113
discostur wants to merge 4 commits into
codecentric:masterfrom
discostur:master

Conversation

@discostur

Copy link
Copy Markdown

Summary

This PR modernizes the entire gopass-ui project so it builds and runs again on current systems (macOS, Node 20+). The project was stuck on Node 14 / Electron 13 / Webpack 4 era dependencies and could no longer be installed or built.

Changes

Build Toolchain

  • Node.js 14 → 20 (LTS)
  • TypeScript 3.8 → 5.7
  • Webpack 4 → 5 (asset modules, updated plugin APIs, webpack-merge v6)
  • Replaced node-sass with sass (Dart Sass) — node-sass fails to compile on modern Node/ARM64
  • Replaced awesome-typescript-loader with ts-loader
  • Removed deprecated loaders: file-loader, image-webpack-loader, source-map-loader
  • Removed react-hot-loader (replaced by webpack-dev-server built-in HMR)
  • Fixed webpack-dev-server v5 config (onBeforeSetupMiddlewaresetupMiddlewares)

Electron

  • Electron 13 → 34
  • electron-builder 22 → 25
  • @electron/remote 1.x → 2.x (explicit remoteMain.enable() per window)
  • electron-settings 3.x → 4.x (get()/set()getSync()/setSync())
  • electron-log 4.x → 5.x
  • Removed deprecated WebPreferences: enableRemoteModule, worldSafeExecuteJavaScript
  • Removed electron-devtools-installer (no longer needed)

React Ecosystem

  • React Router 5 → 6 (migrated all routes to <Routes>/<Route element> API, replaced withRouter HOC with useNavigate hook)
  • Converted class components to functional: AddSecretPage, PasswordHealthPage, TreeComponent
  • Fixed react-keyboard-event-handler import for esModuleInterop compatibility
  • animate.css 3.x → 4.x

Linting & Tooling

  • Replaced TSLint (deprecated) with ESLint 8 + @typescript-eslint + React/React Hooks plugins
  • Husky 1 → 9 (new .husky/ directory format)
  • Prettier 2 → 3
  • Jest 27 → 29, ts-jest updated accordingly
  • Removed all tslint:disable comments, fixed all ESLint errors

Code Quality

  • Replaced XMLHttpRequest with fetch() in GithubService.ts
  • Replaced electron-mock-ipc (broken) with custom EventEmitter-based IPC mock
  • Fixed fix-path import for esModuleInterop (was causing fixPath is not a function at runtime)
  • Fixed unused variable warnings

Bug Fixes

  • Secret tree now shows stores on initial load — previously, with >15 secrets the tree was fully collapsed making it appear empty. Top-level store folders are now always expanded.
  • Fixed path collision crash — when a secret path was both a leaf and a directory prefix (e.g. store/foo and store/foo/bar), the tree builder would throw Cannot create property on string. Now handles this gracefully.

CI / GitHub Actions

  • Updated actions/checkout v2 → v4, actions/setup-node v2 → v4
  • Node version 14.16 → 20
  • Replaced abandoned samuelmeuli/action-electron-builder@v1 with direct electron-builder commands
  • Added npm run lint step to CI
  • Added npm cache for faster CI builds

Documentation

  • Updated docs/development.md with current prerequisites, ESLint/Prettier/Husky instructions

Verification

  • npm install succeeds
  • npm run build succeeds (all 3 webpack targets: main, renderer-explorer, renderer-search)
  • npm run lint passes (0 errors, 11 pre-existing warnings)
  • npm test passes (38/38 tests, 3 snapshots)
  • ✅ App starts and runs on macOS (tested with npm start and dev mode)

Notes

  • React stays at 16.14react-materialize v2.6.0 doesn't support React 18. Upgrading to v3.x would require InputTextInput API migration across many components.
  • @electron/remote kept — removing it would require a full IPC/contextBridge rewrite.
  • contextIsolation remains false — enabling it properly requires preload scripts; deferred for a future PR.
  • fix-path pinned at v3 — v4 is ESM-only and incompatible with the current CJS webpack setup.

discostur and others added 4 commits March 9, 2026 18:41
- Node.js 14 → 20, TypeScript 3.8 → 5.7, Electron 13 → 34
- Webpack 4 → 5 with ts-loader, asset modules, updated plugins
- Replace node-sass with sass (dart-sass)
- React Router 5 → 6 (withRouter → hooks, Routes/element API)
- Replace TSLint with ESLint + TypeScript/React plugins
- Update Husky 1 → 9, Prettier 2 → 3
- Update electron-builder 22 → 25, electron-settings 3 → 4
- Update electron-log 4 → 5, @electron/remote 1 → 2
- Replace XMLHttpRequest with fetch() in GithubService
- Convert class components to functional (AddSecretPage, PasswordHealthPage, TreeComponent)
- Replace electron-mock-ipc with custom EventEmitter-based mock
- Update GitHub Actions: checkout@v4, setup-node@v4, Node 20
- Remove deprecated deps: node-sass, awesome-typescript-loader,
  react-hot-loader, spectron, tslint, file-loader, etc.
- Fix all ESLint errors, update docs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…lewares

- Change fix-path import to default import (esModuleInterop compatibility)
- Replace onBeforeSetupMiddleware with setupMiddlewares (webpack-dev-server v5)
- Remove redundant HotModuleReplacementPlugin (hot:true enables it)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Always expand top-level store folders so tree isn't blank on initial load
  (previously collapsed when >15 secrets, making it appear empty)
- Fix 'Cannot create property on string' error when a secret path is both
  a leaf and a directory prefix (e.g. 'store/foo' and 'store/foo/bar')

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@discostur

Copy link
Copy Markdown
Author

Should fix #110 #76

@discostur

Copy link
Copy Markdown
Author

Could anybody from the maintainers have a look please?

@devfaz

devfaz commented May 21, 2026

Copy link
Copy Markdown

Looks like the project is dead?

@discostur

Copy link
Copy Markdown
Author

Looks like it's dead, yes ... :/

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants