FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tools: refactor update-authors.js to ESM by F3n67u · Pull Request #43098 · nodejs/node · GitHub

/ node Public

tools: refactor update-authors.js to ESM - #43098

Merged
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
F3n67u:esm/update-author
May 21, 2022
Merged

tools: refactor update-authors.js to ESM#43098
nodejs-github-bot merged 1 commit into
nodejs:masterfrom
F3n67u:esm/update-author

Conversation

F3n67u commented May 14, 2022
edited
Loading

Copy link
Copy Markdown
Contributor

Motivation

  1. make tools directory's js file format more consistent
  2. shifting towards ESM which is the official standard.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/actions

nodejs-github-bot added meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory. labels May 14, 2022

aduh95 left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is there a reason to refactor this to ESM?

Comment thread tools/update-authors.mjs Outdated
Comment thread tools/update-authors.mjs Outdated
F3n67u force-pushed the esm/update-author branch 3 times, most recently from e8fd4de to b080a08 Compare May 14, 2022 13:47

F3n67u commented May 14, 2022
edited
Loading

Copy link
Copy Markdown
Contributor Author

Is there a reason to refactor this ESM?

@aduh95 Thanks for the review.

I see the newly added file on tools directory is all ESM module, so I think we could also refactor other commonjs format file to esm module format to make:

  1. all tools js file is more consistent: they are all esm module
  2. shifting towards ESM which is the official standard.

F3n67u requested a review from aduh95 May 14, 2022 14:33

aduh95 commented May 14, 2022

Copy link
Copy Markdown
Contributor

FYI ESM means 'ECMAScript module', so "esm module" is redundant. I'd suggest using refactor … to ESM or refactor … to ESM syntax instead.

Maybe instead of rl.line, we should use for await(const line of rl), using to our advantage top-level await to improve the script readability would be a very good argument for switching to ESM.

F3n67u changed the title tools: refactor update-authors.js to esm module tools: refactor update-authors.js to ESM May 15, 2022
F3n67u force-pushed the esm/update-author branch 2 times, most recently from 56e9d15 to f8f0a15 Compare May 15, 2022 02:29

F3n67u commented May 15, 2022

Copy link
Copy Markdown
Contributor Author

FYI ESM means 'ECMAScript module', so "esm module" is redundant. I'd suggest using refactor … to ESM or refactor … to ESM syntax instead.

Maybe instead of rl.line, we should use for await(const line of rl), using to our advantage top-level await to improve the script readability would be a very good argument for switching to ESM.

Good suggestion. I have refactored rl.on('line' to for await(const line of rl). please take another look. the pr title is also changed to refactor … to ESM

F3n67u force-pushed the esm/update-author branch from f8f0a15 to 1aae44d Compare May 15, 2022 02:34
F3n67u force-pushed the esm/update-author branch from 03c759b to e7a41e5 Compare May 16, 2022 02:18
aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label May 21, 2022
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 21, 2022
nodejs-github-bot merged commit 5cb2579 into nodejs:master May 21, 2022

Copy link
Copy Markdown
Collaborator

Landed in 5cb2579

F3n67u deleted the esm/update-author branch May 21, 2022 15:33
bengl pushed a commit that referenced this pull request May 30, 2022
PR-URL: #43098
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
bengl mentioned this pull request May 31, 2022
juanarbol pushed a commit that referenced this pull request May 31, 2022
PR-URL: #43098
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
danielleadams pushed a commit that referenced this pull request Jun 27, 2022
PR-URL: #43098
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request Jul 12, 2022
PR-URL: #43098
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
targos pushed a commit that referenced this pull request Jul 31, 2022
PR-URL: #43098
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
PR-URL: nodejs/node#43098
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Issues and PRs related to the general management of the project. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL