-
Notifications
You must be signed in to change notification settings - Fork 5
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 18 and @octokit/core v5.0.0 incompatability #77
Comments
Thank you for pointing this out. I will keep an eye out for this or see if there are any alternative because of nock/nock#2397 (comment) I will update the docs till then. |
I have updated the docs but will keep this issue open |
Breaking change! - Internally uses `undici`'s `MockAgent`, instead of `nock` to mock requests. - `nock` is still used for data-matching to retain backwards compatibility. - Tests now use `fetch` instead of `axios`. Requires node>=18 and @octokit/rest>=20 Closes kiegroup#77
experimental support for fetch added to |
Not sure if I'm doing anything wrong, but I upgraded the latest |
* feat!: Use nock@14, support node@20/fetch Fixes #77 * feat!: Upgrade to octokit/rest@v20 * fix: NodeJS version ranges
Hey everyone, so sorry for the delay but thanks to @oliversalzburg a beta version of |
I upgraded all my actions to use the new beta and all tests are passing. I don't have many tests yet, because I was waiting for this project to work flawlessly, but what's there works 😄 I noticed that I need to pass |
Describe the bug
Moctokit
does not work with Node 18. All.reply
responses return the same result to Octokit. Setting thestatus
as200
and404
do not differ the mock response`I believe this is due to Node 18 using a new http client named undici for
fetch
API supportLooking at the code for Moctokit it uses
nock
, which has an open issue for undici supportTo Reproduce
Use
Moctokit
with Node 18 and@octokit/core
v5.0.0
Expected behavior
Proper mock responses are returned.
Additional context
I don't actually expect this to be solved until Nock is updated but an incompatibility note in the
README
would be nice.The text was updated successfully, but these errors were encountered: