Skip to content

mock-require is deprecated #225

Open
@jimthedev

Description

Someone contributed a dependency that relates to require and mocking. Sadly, this dependency is long deprecated. Proxyquire might or might not help. Looks like the author recommended to use it, but unclear if it works for this use-case.

Of course a lot of the code in commitizen is not ideal given newer versions of node and the evolution of ESM.

A few options:

  • Continue to have mock require, remove whatever code seems to be blocking test right now and yolo
  • Find a suitable alternative and get it working but keep using require.
  • Stop using require, move to esm. Drop older node support. More like a rewrite.

Not sure any of these really speak to me. I tend to not want to keep supporting anything older than 18 though at this point.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions