Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
carpasse opened this issue Sep 16, 2024 · 2 comments

Comments

@carpasse
Copy link
Contributor

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.

@UlisesGascon
Copy link
Member

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

@carpasse carpasse mentioned this issue Sep 17, 2024
carpasse added a commit to carpasse/response-time that referenced this issue Oct 14, 2024
BREAKING CHANGE: The function no longer supports passing a single number as the `options` argument. Use the `{ digits: <number> }` format instead.

See: expressjs#25
UlisesGascon pushed a commit that referenced this issue Oct 20, 2024
BREAKING CHANGE: The function no longer supports passing a single number as the `options` argument. Use the `{ digits: <number> }` format instead.

See: #25
@wesleytodd
Copy link
Member

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.

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

No branches or pull requests

3 participants