Skip to content

Remove util.inherits #70

Closed
Closed

Description

@jwerre

Use ES6 Class syntax with extends instead of utils.inherits

util.inherits(AuthorizationCodeGrantType, AbstractGrantType);

util.inherits(ClientCredentialsGrantType, AbstractGrantType);

util.inherits(PasswordGrantType, AbstractGrantType);

util.inherits(RefreshTokenGrantType, AbstractGrantType);

This also occurs in all the errors at lib/errors

Activity

  1. dannyreg commented on Nov 15, 2021

    @dannyreg
    Member

    Wouldn't this require to change these functions to be class AuthorizationCodeGrantType extends AbstractGrantType?

  2. jwerre commented on Nov 15, 2021

    @jwerre
    ContributorAuthor

    Yes.

  3. Uzlopak commented on Nov 15, 2021

    @Uzlopak
    Contributor
  4. jankapunkt commented on Nov 16, 2021

    @jankapunkt
    Member

    Since #58 is merged I could start working on this on a new branch

  5. dsschiramm commented on Dec 18, 2021

    @dsschiramm

    I'll start with this issue ok?
    Seems like a good start for me (first time in a project doing something in an opensource project)

  6. dsschiramm commented on Dec 18, 2021

    @dsschiramm

    Should I change the way the import is written as well?

    Example:
    const AbstractGrantType = require('./abstract-grant-type');
    To
    import AbstractGrantType from './abstract-grant-type';

    Or should I leave this change for another issue/pull request?

  7. Uzlopak commented on Dec 18, 2021

    @Uzlopak
    Contributor

    Dont change, as it would just open the whole can of worms of esModule imports potentially breaking while running on node because of some reasons.

  8. linked a pull request that will close this issuerefactor: Remove util.inherits #70 #109on Dec 19, 2021
  9. added this to the v5 milestone on Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions