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

fix: update deps #675

Merged
merged 2 commits into from
Apr 6, 2021
Merged

fix: update deps #675

merged 2 commits into from
Apr 6, 2021

Conversation

ronag
Copy link
Member

@ronag ronag commented Apr 3, 2021

No description provided.

@ronag ronag marked this pull request as draft April 3, 2021 20:04
@ronag
Copy link
Member Author

ronag commented Apr 3, 2021

@dnlup I'm having trouble with npm run test and npm run coverage. Would you mind have a look? Maybe you have better luck.

undici$ npm run coverage

> undici@3.3.1 coverage
> standard | snazzy && tap test/*.js

TestExclude is not a constructor
undici$ tap test/request-timeout.js 
 FAIL  test/request-timeout.js
 ✖ Cannot read property 'paused' of undefined

function onBodyTimeout (self) {
  if (!self.paused) {
------------^
    util.destroy(self.socket, new BodyTimeoutError())
  }

  test: body timeout
  stack: |
    onBodyTimeout (lib/client.js:755:13)
    callTimer (node_modules/@sinonjs/fake-timers/src/fake-timers-src.js:423:24)
    doTickInner (node_modules/@sinonjs/fake-timers/src/fake-timers-src.js:894:29)
    doTick (node_modules/@sinonjs/fake-timers/src/fake-timers-src.js:975:20)
    Object.tick (node_modules/@sinonjs/fake-timers/src/fake-timers-src.js:982:20)
    RequestResponse.<anonymous> (test/request-timeout.js:61:15)
  at:
    line: 755
    column: 13
    file: lib/client.js
    function: onBodyTimeout
  type: TypeError
  tapCaught: uncaughtException

@ronag ronag added this to the 4.0 milestone Apr 3, 2021
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dnlup
Copy link
Contributor

dnlup commented Apr 5, 2021

No problem, I'll take a look at it @ronag

@dnlup
Copy link
Contributor

dnlup commented Apr 6, 2021

The fake-timers update is causing the failure. Apparently, the context passed to the callbacks is undefined. Not sure if this is something we should address in undici or not yet.

@ronag
Copy link
Member Author

ronag commented Apr 6, 2021

Sounds like a bug in fake timers

@dnlup
Copy link
Contributor

dnlup commented Apr 6, 2021

Sounds like a bug in fake timers

Could be, I don't understand why only the onBodyTimeout has this problem though. I would pin fake-timers to the previous version, or do we need the latest one now?

As a side note, should we enable depandabot updates?

@ronag
Copy link
Member Author

ronag commented Apr 6, 2021

Could be, I don't understand why only the onBodyTimeout has this problem though.

Yea. That's weird.

I would pin fake-timers to the previous version, or do we need the latest one now?

We can pin. I'll do so.

As a side note, should we enable depandabot updates?

I'm neutral. @mcollina wdyt?

@ronag ronag marked this pull request as ready for review April 6, 2021 08:40
@ronag ronag merged commit fe1b7fd into main Apr 6, 2021
@Uzlopak Uzlopak deleted the update-deps branch February 21, 2024 12:38
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
* fix: update deps

* fixup: pin fake-timers
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

Successfully merging this pull request may close these issues.

None yet

3 participants