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

Node minimum version #21

Closed
XaveScor opened this issue Jul 15, 2024 · 4 comments
Closed

Node minimum version #21

XaveScor opened this issue Jul 15, 2024 · 4 comments

Comments

@XaveScor
Copy link

Vitest supports node>=18 only, but vitest-fetch-mock supports node 14 in package.json.

https://github.com/vitest-dev/vitest/blob/d7b0387125da9c2882b12a1f63cc693dc049b15c/package.json#L9

I think, we can safely up the minimum supported Node version up to v18. It allows the lib to use the native fetch instead of cross-fetch polyfill.

@IanVS
Copy link
Owner

IanVS commented Jul 15, 2024

Ah, yes, my intention was to support node 18+, I just didn't notice I had an engines field. Would you like to submit a PR?

@XaveScor
Copy link
Author

I'll make a PR

@dirkluijk
Copy link
Collaborator

Should be fixed by #24.

IanVS pushed a commit that referenced this issue Oct 24, 2024
All right, this PR includes:

- Moving away from `cross-fetch` by just patching the global fetch which should be present in all modern runtimes and browsers. That would close issue #22 and #23.
- It will now force Node 18, which closes issue #21 and removes the need to patch the `DOMException`. 
- The source code is now written in TypeScript and transpiled to JavaScript into the `dist` directory, including the type definitions and source maps.
@IanVS
Copy link
Owner

IanVS commented Oct 24, 2024

Closed by #24, will be released in the next version.

@IanVS IanVS closed this as completed Oct 24, 2024
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