GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — events: refactor to use validator by Lxxyx · Pull Request #45448 · nodejs/node

Conversation

@Lxxyx

@Lxxyx Lxxyx commented Nov 13, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Use validateNumber() for events(setMaxListeners/defaultMaxListeners).

If passed wrong parameter types, validateNumber() will throw ERR_INVALID_ARG_TYPE instead of original error code: ERR_OUT_OF_RANGE. I think ERR_INVALID_ARG_TYPE is more accurate.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@Lxxyx
events: refactor to use validator
28c6105
@nodejs-github-bot nodejs-github-bot added events Issues and PRs related to EventEmitter and the events module. needs-ci PRs that need a full CI run. labels Nov 13, 2022
@Trott Trott added the semver-major PRs that contain breaking changes and should be released in the next major version. label Nov 13, 2022
@Trott

Trott commented Nov 13, 2022

Copy link
Copy Markdown
Member

At least in theory, something that changes an error code is semver major so I added that label. But if others feel strongly that it isn't, I'm ok with it being removed and treating this as a bug fix.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@anonrig

anonrig commented Nov 13, 2022

Copy link
Copy Markdown
Member

I agree with @Trott. There might be some packages that depend on this error message, and therefore I'm good with semver-major label.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aduh95
aduh95 reviewed Nov 13, 2022
View reviewed changes

@aduh95 aduh95 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Let's not validate the error messages.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/parallel/test-event-emitter-max-listeners.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/parallel/test-event-emitter-max-listeners.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/parallel/test-event-emitter-max-listeners.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/parallel/test-event-emitter-max-listeners.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Lxxyx
fixup! remove validation for error message
7e7fc87
aduh95
aduh95 approved these changes Nov 14, 2022
View reviewed changes
Comment thread test/parallel/test-event-emitter-max-listeners.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/parallel/test-event-emitter-max-listeners.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/parallel/test-event-emitter-max-listeners.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/parallel/test-event-emitter-max-listeners.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Trott Trott mentioned this pull request Nov 14, 2022
test: add trailing commas in event tests #45466
Merged
Trott added a commit to Trott/io.js that referenced this pull request Nov 15, 2022
@Trott
test: add trailing commas in event tests
21fff62
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: nodejs#45448 (review)
@Lxxyx
fixup! add trailing commas
bbd6914
jasnell
jasnell approved these changes Nov 16, 2022
View reviewed changes

@jasnell jasnell left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM as a semver major. This should have a benchmark run before it lands.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
nodejs-github-bot pushed a commit that referenced this pull request Nov 22, 2022
@Trott
test: add trailing commas in event tests
d5d7a41
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <[email protected]>
ruyadorno pushed a commit that referenced this pull request Nov 24, 2022
@Trott @ruyadorno
test: add trailing commas in event tests
c3fe907
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <[email protected]>
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
@Trott @danielleadams
test: add trailing commas in event tests
8524c5e
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
@Trott @danielleadams
test: add trailing commas in event tests
3e87834
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 5, 2023
@Trott @danielleadams
test: add trailing commas in event tests
3f2caaf
As much as I would like to do this everywhere and then modify the lint
rule to enforce it, the churn would be too big. However if we're going
to have relatively frequent nits for this sort of thing (as we do), I'd
prefer we migrate a few files at a time to never actually getting around
to doing it.

Ref: #45448 (review)
PR-URL: #45466
Reviewed-By: James M Snell <[email protected]>
@aduh95

aduh95 commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

@Lxxyx this needs a rebase

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95

aduh95 commented Feb 22, 2025

Copy link
Copy Markdown
Contributor

This PR has conflicts that must be resolved

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Lxxyx

Lxxyx commented Mar 10, 2025

Copy link
Copy Markdown
Member Author

Close due to #45770

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Lxxyx Lxxyx closed this Mar 10, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Aug 23, 2026
fix(http): close Node HTTP/HTTPS parity tail PerryTS/perry#8632
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@aduh95 aduh95 aduh95 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

events Issues and PRs related to EventEmitter and the events module. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@Lxxyx @Trott @anonrig @aduh95 @jasnell @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.