Skip to content

Conversation

@F3n67u
Copy link
Contributor

@F3n67uF3n67u commented May 14, 2022

Motivation

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

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/actions

@nodejs-github-botnodejs-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
Copy link
Contributor

@aduh95aduh95 left a comment

Choose a reason for hiding this comment

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

Is there a reason to refactor this to ESM?

@F3n67uF3n67uforce-pushed the esm/update-author branch 3 times, most recently from e8fd4de to b080a08CompareMay 14, 2022 13:47
@F3n67u
Copy link
ContributorAuthor

F3n67u commented May 14, 2022

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.

@F3n67uF3n67u requested a review from aduh95May 14, 2022 14:33
@aduh95
Copy link
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.

@F3n67uF3n67u changed the title tools: refactor update-authors.js to esm moduletools: refactor update-authors.js to ESMMay 15, 2022
@F3n67uF3n67uforce-pushed the esm/update-author branch 2 times, most recently from 56e9d15 to f8f0a15CompareMay 15, 2022 02:29
@F3n67u
Copy link
ContributorAuthor

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

@F3n67uF3n67uforce-pushed the esm/update-author branch from f8f0a15 to 1aae44dCompareMay 15, 2022 02:34
@F3n67uF3n67uforce-pushed the esm/update-author branch from 03c759b to e7a41e5CompareMay 16, 2022 02:18
@aduh95aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label May 21, 2022
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 21, 2022
@nodejs-github-botnodejs-github-bot merged commit 5cb2579 into nodejs:masterMay 21, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 5cb2579

@F3n67uF3n67u deleted the esm/update-author branch May 21, 2022 15:33
bengl pushed a commit that referenced this pull request May 30, 2022
@benglbengl mentioned this pull request May 31, 2022
juanarbol pushed a commit that referenced this pull request May 31, 2022
danielleadams pushed a commit that referenced this pull request Jun 27, 2022
targos pushed a commit that referenced this pull request Jul 12, 2022
targos pushed a commit that referenced this pull request Jul 31, 2022
@targostargos mentioned this pull request Aug 3, 2022
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

metaIssues and PRs related to the general management of the project.toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@F3n67u@nodejs-github-bot@aduh95