response-time icon indicating copy to clipboard operation
response-time copied to clipboard

Discussion: Proposed Changes for expressjs/response-time Next Major Version

Open carpasse opened this issue 1 year ago • 4 comments

This issue aims to discuss potential changes for the next major version of expressjs/response-time.

Key Areas to Consider:

  1. API Simplification - BREAKING CHANGE
  • Standardized Options Object: Remove the deprecated approach of passing a single number to the middleware. Going forward, users should provide options as an object:
    app.use(responseTime({ digits: 3 })); // Set digits to 3
    
  1. Node.js Version Support - BREAKING CHANGE Drop support for Node.js < 18: We propose discontinuing support for Node.js versions below 18 (LTS). This ensures alignment with the latest security patches and modern features of Node.js.

  2. Dependency Management Upgrade dependencies: Update all project dependencies to their latest compatible versions, ensuring access to bug fixes, security updates, and compatibility with Node.js 18+.

  3. Code Modernization - BREAKING CHANGE Migrate to new ES syntax: Consider refactoring the codebase to leverage modern ES syntax, improving maintainability and alignment with contemporary Node.js practices.

carpasse avatar Sep 16 '24 09:09 carpasse

Sounds like a good plan. +1 from me. cc: @expressjs/express-tc

UlisesGascon avatar Sep 16 '24 10:09 UlisesGascon

Other than number 4, I think each of those could land as individual PRs. If you could open a PR or a new issue to discuss what new features you think would add value then I would like to discuss that part separately.

wesleytodd avatar Nov 14 '24 16:11 wesleytodd

@wesleytodd Apologies for the delayed response. Number 4 isn’t about adding new features but rather migrating to the new ES syntax—replacing var with const and let, using arrow functions where appropriate, etc.

carpasse avatar Feb 24 '25 11:02 carpasse

No worries on delays! It is all volunteer work, so no expectations at all.

I understood the line item I think, and my concern was just that it is usually not worth the work. Anyway, I wouldn't block it and it looks like there is already a PR up so maybe I will just retract my concern and not worry about it.

wesleytodd avatar Mar 04 '25 14:03 wesleytodd