Skip to content

feat: upgrade Node.js from 8.15.1+ to 18.20.8 LTS#10

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1753808199-nodejs-18-upgrade
Open

feat: upgrade Node.js from 8.15.1+ to 18.20.8 LTS#10
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1753808199-nodejs-18-upgrade

Conversation

@devin-ai-integration
Copy link
Copy Markdown

feat: upgrade Node.js from 8.15.1+ to 18.20.8 LTS

Summary

This PR upgrades the bank-client application from Node.js 8.15.1+ to Node.js 18.20.8 LTS, representing a major version jump across 10 Node.js releases. The upgrade includes:

Core Version Updates:

  • Updated package.json engines field to require node: ">=18.0.0"
  • Updated .nvmrc to specify Node.js 18.20.8
  • Updated README.md system requirements to Node.js v18.20+

Critical Compatibility Changes:

  • Replaced offline-plugin with workbox-webpack-plugin due to Node.js 18 incompatibility
  • Updated service worker registration from offline-plugin runtime to modern navigator.serviceWorker.register()
  • Added NODE_OPTIONS=--openssl-legacy-provider to build and start scripts for Webpack 4 + Node.js 18 compatibility

The build process and development server have been verified to work with Node.js 18, but this represents a significant architectural change that requires thorough testing.

Review & Testing Checklist for Human

🔴 CRITICAL - Complete Application Testing Required

  • Test complete application functionality in browser - Load the app, navigate through all major user flows (login, dashboard, transactions, etc.) to ensure no runtime errors or broken functionality
  • Verify service worker/offline functionality - Test that the app works offline, caches resources correctly, and service worker registration completes without errors in browser dev tools
  • Test build reproducibility - Run rm -rf node_modules yarn.lock && yarn install && yarn build in a clean environment to ensure consistent builds
  • Verify development experience - Test that yarn start works correctly with hot reloading, error overlays, and all development features
  • Check for runtime errors - Monitor browser console for any new errors, warnings, or performance issues that weren't present before

Recommended Test Plan:

  1. Clean install: rm -rf node_modules && yarn install
  2. Build verification: yarn build (should complete without errors)
  3. Development server: yarn start (should start and be accessible)
  4. Browser testing: Open app in browser, test all major user flows
  5. Service worker: Check Application tab in dev tools for service worker registration
  6. Offline testing: Disconnect network and verify app still functions

Diagram

%%{ init : { "theme" : "default" }}%%
graph TD
    subgraph "Core Configuration"
        A["package.json<br/>engines.node: 8.15.1+ → 18.0.0+<br/>+ NODE_OPTIONS flags"]:::major-edit
        B[".nvmrc<br/>lts/dubnium → 18.20.8"]:::major-edit
        C["README.md<br/>v12.18+ → v18.20+"]:::minor-edit
    end
    
    subgraph "Service Worker Architecture"
        D["webpack.prod.babel.js<br/>OfflinePlugin → GenerateSW"]:::major-edit
        E["app/app.js<br/>offline-plugin/runtime → navigator.serviceWorker"]:::major-edit
        F["yarn.lock<br/>+ workbox-webpack-plugin<br/>- offline-plugin"]:::major-edit
    end
    
    subgraph "Build Process"
        G["Build Scripts<br/>NODE_OPTIONS=--openssl-legacy-provider"]:::context
        H["Development Server<br/>Hot reload + error handling"]:::context
    end
    
    A --> D
    A --> G
    D --> E
    F --> D
    G --> H
    
    subgraph Legend
        L1["Major Edit"]:::major-edit
        L2["Minor Edit"]:::minor-edit
        L3["Context/No Edit"]:::context
    end
    
    classDef major-edit fill:#90EE90
    classDef minor-edit fill:#87CEEB
    classDef context fill:#FFFFFF
Loading

Notes

⚠️ High-Risk Changes:

  • This is a 10 major version jump in Node.js (8 → 18), which could introduce subtle breaking changes
  • Service worker implementation completely replaced - offline functionality needs thorough validation
  • Using OpenSSL legacy provider workaround indicates deeper Webpack 4 + Node.js 18 compatibility issues

Technical Context:

  • The NODE_OPTIONS=--openssl-legacy-provider flag is required because Webpack 4 uses deprecated OpenSSL functions that were removed in Node.js 17+
  • Workbox is the modern, Google-maintained replacement for the unmaintained offline-plugin
  • All 2020-era dependencies (React 16, Webpack 4, Babel 7) should be compatible with Node.js 18, but edge cases may exist

Session Info:

- Update package.json engines to require Node.js >=18.0.0
- Update .nvmrc to specify Node.js 18.20.8
- Update README.md system requirements to Node.js v18.20+
- Replace offline-plugin with workbox-webpack-plugin for Node.js 18 compatibility
- Add NODE_OPTIONS=--openssl-legacy-provider for Webpack 4 + Node.js 18 compatibility
- Update service worker registration to use modern Workbox approach
- Verify build process and development server work with Node.js 18

Co-Authored-By: Arthur Poon <arthur.poon@windsurf.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants