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

Pull latest changes from nodejs/node #28

Merged
merged 5 commits into from
Jul 25, 2022

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Jul 20, 2022

Tests are failing on v16.x and v14.x, not sure why.

@MoLow
Copy link
Member

MoLow commented Jul 20, 2022

@aduh95 any change you open this pr from a branch on this repo so I can check it out and tackle with it?
node 14 is missing an AbortSignal polyfill
and node 16 seems to have some other issue I want to take a look at

@aduh95
Copy link
Contributor Author

aduh95 commented Jul 20, 2022

node 14 is missing an AbortSignal polyfill

That's not exact, Node.js v14.x has AbortSignal but you need to have NODE_OPTIONS=--experimental-abortcontroller in your env.

any change you open this pr from a branch on this repo so I can check it out and tackle with it?

Any reason why you can't do from my fork? As a maintainer of this repo, you even should be allowed to push commit on my branch if needed. (The easiest to checkout a PR is to run curl -L <PR-url>.patch | git am)

@aduh95 aduh95 force-pushed the pull-latest-commits-from-node-core branch 3 times, most recently from fae94be to 86679ee Compare July 21, 2022 00:25
test/message.js Outdated Show resolved Hide resolved
@MoLow MoLow force-pushed the pull-latest-commits-from-node-core branch 2 times, most recently from 237798a to 1468888 Compare July 21, 2022 09:35
@MoLow MoLow marked this pull request as ready for review July 21, 2022 09:51
@aduh95 aduh95 force-pushed the pull-latest-commits-from-node-core branch from 1468888 to c06ee1c Compare July 21, 2022 10:21
PR-URL: nodejs/node#43554
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
(cherry picked from commit 389b7e138e89a339fabe4ad628bf09cd9748f957)
@aduh95 aduh95 force-pushed the pull-latest-commits-from-node-core branch 2 times, most recently from 93fbd06 to 41c0c3a Compare July 21, 2022 12:32
PR-URL: nodejs/node#43919
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
(cherry picked from commit 2fd4c013c221653da2a7921d08fe1aa96aaba504)
@aduh95 aduh95 force-pushed the pull-latest-commits-from-node-core branch from 41c0c3a to 10146fa Compare July 21, 2022 12:32
MoLow and others added 3 commits July 24, 2022 23:23
PR-URL: nodejs/node#43911
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
(cherry picked from commit 2e682f10b6104373fded64b0e364984b85ae2243)
PR-URL: nodejs/node#43843
Reviewed-By: Feng Yu <[email protected]>
(cherry picked from commit d83446b4c4694322e12d2b7d22592f2be674e580)
PR-URL: nodejs/node#43887
Fixes: nodejs/node#43837
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
(cherry picked from commit dab492f0444b0a6ae8a41dd1d9605e036c363655)
@aduh95 aduh95 force-pushed the pull-latest-commits-from-node-core branch from ed3cd03 to ba8fd71 Compare July 24, 2022 21:48
Copy link
Member

@MoLow MoLow left a comment

Choose a reason for hiding this comment

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

LGTM, when do we merge such prs?

@@ -102,6 +102,43 @@ function expectsError (validator, exact) {
}, exact)
}

if (typeof AbortSignal.timeout !== 'function') {
Copy link
Member

Choose a reason for hiding this comment

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

will this be required in consumer code too? Would it be safer to use a AbortSignal ponyfill?

Copy link
Member

Choose a reason for hiding this comment

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

no, it is not needed, these adjustments are just so the tap output will match across node versions

Copy link
Member

Choose a reason for hiding this comment

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

Great, thank you!

Suggested change
if (typeof AbortSignal.timeout !== 'function') {
// Ensure test output is consistent across node versions
if (typeof AbortSignal.timeout !== 'function') {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AbortSignal.timeout doesn't exist on Node.js 14.x, so all the tests that use it fails on that version. It's not required though, test/node-core-test.js makes sure that the library still works when it's not polyfilled.

The section below, that overrides AbortSignal.abort and AbortController.prototype.abort is indeed there just for the TAP output to match, and same, we have test/node-core-test.js to ensure it's not necessary for the lib to work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to land this and open a follow-up PR that adds the comments.

@aduh95 aduh95 merged commit ba8fd71 into nodejs:main Jul 25, 2022
@aduh95 aduh95 deleted the pull-latest-commits-from-node-core branch July 25, 2022 15:22
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.

4 participants