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 — lib: make event static properties non writable and configurable by BenzeneAlcohol · Pull Request #50425 · nodejs/node

Conversation

@BenzeneAlcohol

@BenzeneAlcohol BenzeneAlcohol commented Oct 27, 2023

Copy link
Copy Markdown
Contributor

The idl definition for Event makes the properties constants, this means that they shouldn't be configurable. However, they were, and this commit fixes that.

Fixes: #50417

Sorry, something went wrong.

Uh oh!

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

bricss reacted with thumbs up emoji Utkar5hM reacted with hooray emoji
All reactions
  • 👍 1 reaction
  • 🎉 1 reaction
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Oct 27, 2023
@BenzeneAlcohol

BenzeneAlcohol commented Oct 27, 2023

Copy link
Copy Markdown
Contributor Author

making writable: false, makes it such that the user cannot even assign a value. Is that what we intend at the end?

All reactions

Sorry, something went wrong.

Uh oh!

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

@BenzeneAlcohol

BenzeneAlcohol commented Oct 30, 2023

Copy link
Copy Markdown
Contributor Author

I've run the linter and fixed the errors, and also changed up stuff a bit.

Please review @KhafraDev

All reactions

Sorry, something went wrong.

Uh oh!

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

@H4ad
H4ad requested a review from KhafraDev October 30, 2023 15:36
H4ad
H4ad approved these changes Oct 30, 2023
View reviewed changes
@H4ad H4ad added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Oct 30, 2023
@H4ad

H4ad commented Oct 30, 2023

Copy link
Copy Markdown
Member

@BenzeneAlcohol Can you please fix the issue on the first commit?

https://github.com/nodejs/node/actions/runs/6690083519/job/18190085079?pr=50425

But thanks for the PR, looks great!

All reactions

Sorry, something went wrong.

Uh oh!

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

@BenzeneAlcohol
BenzeneAlcohol force-pushed the event_target_bug branch from da98db5 to e90fbb1 Compare October 30, 2023 15:48
@BenzeneAlcohol

BenzeneAlcohol commented Oct 30, 2023

Copy link
Copy Markdown
Contributor Author

@BenzeneAlcohol Can you please fix the issue on the first commit?

https://github.com/nodejs/node/actions/runs/6690083519/job/18190085079?pr=50425

But thanks for the PR, looks great!

Done, thank you! :)

All reactions

Sorry, something went wrong.

Uh oh!

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

@BenzeneAlcohol

BenzeneAlcohol commented Oct 30, 2023

Copy link
Copy Markdown
Contributor Author

The test for some reason runs on the old commit message?
Do I have to squash all the commits into one manually?

All reactions

Sorry, something went wrong.

Uh oh!

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

@BenzeneAlcohol

BenzeneAlcohol commented Oct 31, 2023

Copy link
Copy Markdown
Contributor Author

Any changes I have to further make?

All reactions

Sorry, something went wrong.

Uh oh!

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

@H4ad

H4ad commented Oct 31, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

You can squash everything, or you can rebase, but you need to change the commit message, both should work.

All reactions

Sorry, something went wrong.

Uh oh!

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

@BenzeneAlcohol
BenzeneAlcohol force-pushed the event_target_bug branch from e90fbb1 to 53502c7 Compare November 1, 2023 08:34
@BenzeneAlcohol

BenzeneAlcohol commented Nov 1, 2023

Copy link
Copy Markdown
Contributor Author

Squashed into one commit.

All reactions

Sorry, something went wrong.

Uh oh!

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

MrJithil
MrJithil reviewed Nov 1, 2023
View reviewed changes
Comment thread lib/internal/event_target.js Resolved

Uh oh!

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

Comment thread test/parallel/test-event-target.js Resolved

Uh oh!

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

@BenzeneAlcohol

BenzeneAlcohol commented Nov 1, 2023

Copy link
Copy Markdown
Contributor Author

Ok, I have a very noob question.

But I do some small changes, and every time do I have to make the detailed commit message? Because sometimes the change I do is like removing a few lines (like I removed a few console lines) but then the commit message should contain details about the actual change in case it gets merged.

So do I just wait for approval, then rebase all changes to 1 commit message? And have normal commit messages, 1 liners till that one final rebased single commit.

All reactions

Sorry, something went wrong.

Uh oh!

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

H4ad
H4ad reviewed Nov 1, 2023
View reviewed changes
Comment thread lib/internal/event_target.js Resolved

Uh oh!

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

H4ad
H4ad approved these changes Nov 1, 2023
View reviewed changes
@H4ad

H4ad commented Nov 1, 2023

Copy link
Copy Markdown
Member

From what I know, only the first message will be used to create the commit description, so it's fine you keep the first commit with the message and then create other commits for minor fixes.

About all commits, I will later add a flag to squash everything, so all the commits will be released as just one commit.

BenzeneAlcohol 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.

@KhafraDev

KhafraDev commented Nov 1, 2023

Copy link
Copy Markdown
Member

But I do some small changes, and every time do I have to make the detailed commit message? Because sometimes the change I do is like removing a few lines (like I removed a few console lines) but then the commit message should contain details about the actual change in case it gets merged.

I believe only the first commit must be detailed, because they typically get squashed automatically when merged.

Personally, I use git rebase -i HEAD~[number of commits] and then squash all the commits together into the first one, then git push -f. That way I only need to worry about a single commit.

H4ad and BenzeneAlcohol reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

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

KhafraDev
KhafraDev approved these changes Nov 1, 2023
View reviewed changes
@BenzeneAlcohol

BenzeneAlcohol commented Nov 1, 2023

Copy link
Copy Markdown
Contributor Author

But I do some small changes, and every time do I have to make the detailed commit message? Because sometimes the change I do is like removing a few lines (like I removed a few console lines) but then the commit message should contain details about the actual change in case it gets merged.

I believe only the first commit must be detailed, because they typically get squashed automatically when merged.

Personally, I use git rebase -i HEAD~[number of commits] and then squash all the commits together into the first one, then git push -f. That way I only need to worry about a single commit.

Got it, thanks!

All reactions

Sorry, something went wrong.

Uh oh!

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

@BenzeneAlcohol

BenzeneAlcohol commented Nov 1, 2023

Copy link
Copy Markdown
Contributor Author

From what I know, only the first message will be used to create the commit description, so it's fine you keep the first commit with the message and then create other commits for minor fixes.

About all commits, I will later add a flag to squash everything, so all the commits will be released as just one commit.

Alrighty!

All reactions

Sorry, something went wrong.

Uh oh!

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

@H4ad H4ad added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 1, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 1, 2023
@nodejs-github-bot

nodejs-github-bot commented Nov 1, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55396/

All reactions

Sorry, something went wrong.

Uh oh!

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

MrJithil
MrJithil reviewed Nov 1, 2023
View reviewed changes
Comment thread test/parallel/test-event-target.js Resolved

Uh oh!

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

@BenzeneAlcohol

BenzeneAlcohol commented Nov 2, 2023

Copy link
Copy Markdown
Contributor Author

Does that failed pipeline for 4 checks indicate any changes I have to do or are they some flaky tests?

All reactions

Sorry, something went wrong.

Uh oh!

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

@MrJithil

MrJithil commented Nov 2, 2023

Copy link
Copy Markdown
Member

Its not because of your changes.

BenzeneAlcohol 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.

@nodejs-github-bot

nodejs-github-bot commented Nov 2, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55418/

All reactions

Sorry, something went wrong.

Uh oh!

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

@BenzeneAlcohol
BenzeneAlcohol force-pushed the event_target_bug branch from 1923af3 to b8cb3cc Compare November 3, 2023 05:25
@BenzeneAlcohol

BenzeneAlcohol commented Nov 3, 2023

Copy link
Copy Markdown
Contributor Author

Ok, I've made the changes hopefully the pipeline runs successfully 👀

Please look into the pending comment too

Done

All reactions

Sorry, something went wrong.

Uh oh!

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

MrJithil
MrJithil reviewed Nov 3, 2023
View reviewed changes

@MrJithil MrJithil 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

Sorry, something went wrong.

Uh oh!

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

BenzeneAlcohol reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@H4ad H4ad added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Nov 3, 2023
H4ad
H4ad approved these changes Nov 3, 2023
View reviewed changes
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 3, 2023
@nodejs-github-bot

nodejs-github-bot commented Nov 3, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55434/

All reactions

Sorry, something went wrong.

Uh oh!

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

@tniessen tniessen changed the title lib: Event static properties non configurable and writable lib: make event static properties non writable and configurable Nov 3, 2023
@tniessen

tniessen commented Nov 3, 2023

Copy link
Copy Markdown
Member

Is this semver-major or do we consider it a bug fix?

All reactions

Sorry, something went wrong.

Uh oh!

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

@H4ad

H4ad commented Nov 3, 2023

Copy link
Copy Markdown
Member

I think it is a bug fix since people are not supposed to change/modify these properties.

But if we want to be cautious, a semver-minor can be applied.

Maybe run CITMG too?

All reactions

Sorry, something went wrong.

Uh oh!

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

@KhafraDev

KhafraDev commented Nov 3, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

definitely a bug fix, I wouldn't consider it a major change. If someone relied on changing these properties, they were relying on a bug.

H4ad and BenzeneAlcohol reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

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

@BenzeneAlcohol

BenzeneAlcohol commented Nov 3, 2023

Copy link
Copy Markdown
Contributor Author

definitely a bug fix, I wouldn't consider it a major change. If someone relied on changing these properties, they were relying on a bug.

Agreed. Does it need semver-minor?

All reactions

Sorry, something went wrong.

Uh oh!

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

This was referenced Nov 4, 2023
CI Reliability 2023-11-04 nodejs/reliability#707
Open
CI Reliability 2023-11-05 nodejs/reliability#708
Open
@BenzeneAlcohol

BenzeneAlcohol commented Nov 5, 2023

Copy link
Copy Markdown
Contributor Author

Does this need anything else before merging?

All reactions

Sorry, something went wrong.

Uh oh!

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

This was referenced Nov 6, 2023
CI Reliability 2023-11-06 nodejs/reliability#709
Open
CI Reliability 2023-11-07 nodejs/reliability#710
Open
CI Reliability 2023-11-08 nodejs/reliability#711
Open
@BenzeneAlcohol

BenzeneAlcohol commented Nov 10, 2023

Copy link
Copy Markdown
Contributor Author

@KhafraDev and @H4ad any blockers stopping this from merge?

All reactions

Sorry, something went wrong.

Uh oh!

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

@tniessen tniessen added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 10, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 10, 2023
@nodejs-github-bot
nodejs-github-bot merged commit b4850f2 into nodejs:main Nov 10, 2023
@nodejs-github-bot

nodejs-github-bot commented Nov 10, 2023

Copy link
Copy Markdown
Collaborator

Landed in b4850f2

All reactions

Sorry, something went wrong.

Uh oh!

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

@MrJithil

MrJithil commented Nov 10, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

@KhafraDev and @H4ad any blockers stopping this from merge?

IMO No. It's already landed

BenzeneAlcohol reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

targos pushed a commit that referenced this pull request Nov 11, 2023
@BenzeneAlcohol @targos
lib: make event static properties non writable and configurable
50ecda6
The idl definition for Event makes the properties constant
this means that they shouldn't be configurable and writable.
However, they were, and this commit fixes that.

Fixes: #50417
PR-URL: #50425
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
@targos targos mentioned this pull request Nov 12, 2023
v21.2.0 release proposal #50681
Merged
targos pushed a commit that referenced this pull request Nov 14, 2023
@BenzeneAlcohol @targos
lib: make event static properties non writable and configurable
5fa40be
The idl definition for Event makes the properties constant
this means that they shouldn't be configurable and writable.
However, they were, and this commit fixes that.

Fixes: #50417
PR-URL: #50425
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
UlisesGascon pushed a commit that referenced this pull request Dec 11, 2023
@BenzeneAlcohol @UlisesGascon
lib: make event static properties non writable and configurable
3844af2
The idl definition for Event makes the properties constant
this means that they shouldn't be configurable and writable.
However, they were, and this commit fixes that.

Fixes: #50417
PR-URL: #50425
Reviewed-By: Vinícius Lourenço Claro Cardoso <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
@UlisesGascon UlisesGascon mentioned this pull request Dec 12, 2023
v20.11.0 proposal #51124
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tniessen tniessen tniessen left review comments
@MrJithil MrJithil MrJithil left review comments
@H4ad H4ad H4ad approved these changes
@KhafraDev KhafraDev KhafraDev 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. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

events: static properties are configurable & writable

Uh oh!

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

6 participants

@BenzeneAlcohol @H4ad @KhafraDev @nodejs-github-bot @MrJithil @tniessen
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.