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
events: extract events file to a separate files #52726
base: main
Are you sure you want to change the base?
events: extract events file to a separate files #52726
Conversation
b702d6b
to
40e3fe7
Compare
Failed to start CI⚠ No approving reviews found ✘ Refusing to run CI on potentially unsafe PRhttps://github.com/nodejs/node/actions/runs/8861715452 |
EventEmitterAsyncResource
to a separate file
I'm a fan of this idea, but IMO the file names could drop the |
This would penalize startup, make back porting harder, and make git blame and git log less useful. Unless it’s getting completely rewritten I would suggest avoid moving files for moving files’ sake. |
It's not for moving files' sake if the goal is to open another PR later that uses the extracted internals. |
I'm working on another PR that creates a fast and slow EventEmitter after talking to @benjamingr and currently the |
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 assuming this is to facilitate a refactor
The reason I did this is that I want to create another PR to add a fast event emitter for the common cases and the
events
file is already large enough, if you want I can extract this PR to multiple PRs one for each fileBefore merging needs
git squash
to avoid having commits in main that not working by themselfI extracted the following:
EventEmitter
tolib/internal/events/event_emitter.js
on
,once
, andgetEventListeners
tointernal/events/event_emitter_helpers.js
EventEmitterAsyncResource
tolib/internal/events/event_emitter_async_resource.js