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

mock-require is deprecated #225

Open
jimthedev opened this issue Sep 30, 2024 · 0 comments
Open

mock-require is deprecated #225

jimthedev opened this issue Sep 30, 2024 · 0 comments
Labels

Comments

@jimthedev
Copy link
Member

jimthedev commented Sep 30, 2024

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.

@jimthedev jimthedev added the esm label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant