Discussion: Proposed Changes for expressjs/response-time Next Major Version
This issue aims to discuss potential changes for the next major version of expressjs/response-time.
Key Areas to Consider:
- 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
-
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.
-
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+.
-
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.
Sounds like a good plan. +1 from me. cc: @expressjs/express-tc
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 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.
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.