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 — doc: fix actual result of example is different in events by deokjinkim · Pull Request #45656 · nodejs/node

Conversation

@deokjinkim

@deokjinkim deokjinkim commented Nov 28, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Change of events internal may be not reflected yet.

In document, result of example is like below.

a b MyEmitter {
   domain: null,
   _events: { event: [Function] },
   _eventsCount: 1,
   _maxListeners: undefined } true

But actual result of example with current node is like below.

a b MyEmitter {
  _events: [Object: null prototype] { event: [Function (anonymous)] },
  _eventsCount: 1,
  _maxListeners: undefined,
  [Symbol(kCapture)]: false
} true

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
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. events Issues and PRs related to EventEmitter and the events module. labels Nov 28, 2022
@bnb

bnb commented Nov 28, 2022

Copy link
Copy Markdown
Member

Just ran with the below code example (separately, we should probably update this specific code example to actually be runnable with the below code) and got the updated output.

const EventEmitter = require('node:events');
class MyEmitter extends EventEmitter {};
const myEmitter = new MyEmitter();

myEmitter.on('event', function(a, b) {
  console.log(a, b, this, this === myEmitter);
});

myEmitter.emit('event', 'a', 'b');
All reactions

Sorry, something went wrong.

Uh oh!

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

bnb
bnb approved these changes Nov 28, 2022
View reviewed changes
@daeyeon

daeyeon commented Nov 29, 2022 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Nit: the commit message title needs to start with an imperative verb to meet the guideline below. This isn't a blocker since it could be fixed by someone when landing the PR. However, it can be fixed also by a force push.

node/doc/contributing/pull-requests.md

Lines 168 to 171 in a1c62cf

* be prefixed with the name of the changed [subsystem](#appendix-subsystems)
and start with an imperative verb. Check the output of `git log --oneline
files/you/changed` to find out what subsystems your changes touch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@deokjinkim
doc: fix actual result of example is different in events
56f9768
Change of events internal may be not reflected yet.
@deokjinkim
deokjinkim force-pushed the 221129_update_result_events branch from 1ed643b to 56f9768 Compare November 29, 2022 03:28
@deokjinkim deokjinkim changed the title doc: actual result is different from specified one in events doc: fix actual result of example is different in events Nov 29, 2022
@deokjinkim

deokjinkim commented Nov 29, 2022

Copy link
Copy Markdown
Contributor Author

Nit: the commit message title needs to start with an imperative verb to meet the guideline below. This isn't a blocker since it could be fixed by someone when landing the PR. However, it can be fixed also by a force push.

node/doc/contributing/pull-requests.md

Lines 168 to 171 in a1c62cf

* be prefixed with the name of the changed [subsystem](#appendix-subsystems)
and start with an imperative verb. Check the output of `git log --oneline
files/you/changed` to find out what subsystems your changes touch.

@daeyeon Thank you for kind explanation and remind. Updated commit message title starting with an imperative verb.

daeyeon reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

daeyeon
daeyeon approved these changes Nov 29, 2022
View reviewed changes
@daeyeon daeyeon added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Dec 6, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Dec 6, 2022
@nodejs-github-bot
nodejs-github-bot merged commit ab064d1 into nodejs:main Dec 6, 2022
@nodejs-github-bot

nodejs-github-bot commented Dec 6, 2022

Copy link
Copy Markdown
Collaborator

Landed in ab064d1

All reactions

Sorry, something went wrong.

Uh oh!

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

@bnb bnb mentioned this pull request Dec 6, 2022
doc: update events API example to have runnable code #45755
Closed
targos pushed a commit that referenced this pull request Dec 12, 2022
@deokjinkim @targos
doc: fix actual result of example is different in events
029060e
Change of events internal may be not reflected yet.

PR-URL: #45656
Reviewed-By: Tierney Cyren <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
@targos targos mentioned this pull request Dec 12, 2022
v19.3.0 release proposal #45831
Merged
@danielleadams danielleadams mentioned this pull request Dec 30, 2022
v18.13.0 release proposal #46025
Merged
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
@deokjinkim @danielleadams
doc: fix actual result of example is different in events
b2c55a1
Change of events internal may be not reflected yet.

PR-URL: #45656
Reviewed-By: Tierney Cyren <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
@deokjinkim @danielleadams
doc: fix actual result of example is different in events
fcd0f71
Change of events internal may be not reflected yet.

PR-URL: #45656
Reviewed-By: Tierney Cyren <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 5, 2023
@deokjinkim @danielleadams
doc: fix actual result of example is different in events
5ac8515
Change of events internal may be not reflected yet.

PR-URL: #45656
Reviewed-By: Tierney Cyren <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bnb bnb bnb approved these changes
@daeyeon daeyeon daeyeon approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. doc Issues and PRs related to Node.js documentation. events Issues and PRs related to EventEmitter and the events module.

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.

4 participants

@deokjinkim @bnb @daeyeon @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.