-
Notifications
You must be signed in to change notification settings - Fork 539
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
build(deps-dev): bump nock from 13.5.6 to 14.0.0 #2182
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: dependabot[bot] The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@cjihrig test failiures appear to be related to: We are trying to simulate a socket error part-way through a watch, I think that we need to modify that code, I played around with it some but I couldn't (yet) figure out the right way to simulate it with the new stack. I'll keep trying, but if you have any ideas, that'd be great too. |
Yea, I had this on my list of things to look into. I'll move it up the list 😄 I'm pretty certain we will need to make some changes to this code anyway. These two tests are also causing problems updating to node-fetch v3 (and presumably native fetch in the future). I wrote up my findings on that in #2146 (comment). |
Bisecting nock releases points to v14.0.0-beta.8, which only has one commit (unfortunately a complex one): nock/nock#2517 Looking more closely at that particular release, and the v14.0.0 release, it appears that a new mock implementation was swapped in under the hood. There were a number of tests moved into a skipped state to address edge cases - maybe this is one of those edge cases. |
@dependabot rebase (I'm hopeful that the update to fetch v3 comparability will fix this) |
Bumps [nock](https://github.com/nock/nock) from 13.5.6 to 14.0.0. - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](nock/nock@v13.5.6...v14.0.0) --- updated-dependencies: - dependency-name: nock dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
065f89b
to
6076633
Compare
It won't. The tests won't timeout anymore, but the expected errors will be |
I created a reduced reproduction of the issue to share with the nock team: import assert from 'node:assert';
import { createInterface } from 'node:readline';
import { PassThrough } from 'node:stream';
import fetch from 'node-fetch';
import nock from 'nock';
const stream = new PassThrough();
const expectedErr = new Error('boom!');
let response;
const scope = nock('http://foo.com');
const s = scope
.get('/bar')
.reply(200, function() {
this.req.on('response', (r) => {
response = r;
});
stream.push(JSON.stringify({ name: 'obj1' }) + '\n');
stream.push(JSON.stringify({ name: 'obj2' }) + '\n');
return stream;
});
const res = await fetch('http://foo.com/bar');
assert.strictEqual(res.status, 200);
const waitForLines = Promise.withResolvers();
const waitForError = Promise.withResolvers();
const lines = [];
let actual;
const readline = createInterface(res.body);
readline.on('error', (err) => {
actual = err;
waitForError.resolve();
});
readline.on('line', (line) => {
lines.push(line);
if (lines.length === 2) {
waitForLines.resolve();
}
});
await waitForLines.promise;
assert.deepStrictEqual(lines, [
JSON.stringify({ name: 'obj1' }),
JSON.stringify({ name: 'obj2' }),
]);
response.destroy(expectedErr);
await waitForError.promise;
assert.strictEqual(actual, expectedErr);
console.log('done!'); I tested this with Node 23.7.0 and [email protected], which are both the latest at the time of writing. With [email protected] and [email protected] (latest 13x release), this completes successfully. With [email protected] (where I believe the break was introduced) and [email protected], this does not complete successfully because the |
Bumps nock from 13.5.6 to 14.0.0.
Release notes
Sourced from nock's releases.
Commits
ef3f158
feat: support for nativefetch
(#2813)c8b2b22
Fix: GitHub workflow script injection (#2805)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore this major version
will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor version
will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependency
will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)