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 — tools: modernize tools/license2rtf.js by tniessen · Pull Request #16220 · nodejs/node

Conversation

@tniessen

@tniessen tniessen commented Oct 15, 2017

Copy link
Copy Markdown
Member

This PR tries to modernize some tooling code. Should still produce the same result:

$ git checkout master
Switched to branch 'master'
$ Release/node tools/license2rtf.js > LICENSE_ORIGINAL.rtf
$ cat LICENSE | Release/node tools/license2rtf.js > LICENSE_ORIGINAL.rtf
$ git checkout tools-license-es6
Switched to branch 'tools-license-es6'
$ cat LICENSE | Release/node tools/license2rtf.js > LICENSE_NEW.rtf
$ sha256sum LICENSE_ORIGINAL.rtf LICENSE_NEW.rtf
4331ecea25a7cfc6948d7fdd8b3e298f54de913591e6a3962b8302b80179acbb *LICENSE_ORIGINAL.rtf
4331ecea25a7cfc6948d7fdd8b3e298f54de913591e6a3962b8302b80179acbb *LICENSE_NEW.rtf

Changes:

  • ES classes instead of util.inherits
  • ES string functions (trimRight, padStart)
  • Template strings

There are still some possible improvements but it's a start.

Checklist
  • commit message follows commit guidelines
Affected core subsystem(s)

tools

Sorry, something went wrong.

Uh oh!

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

All reactions
tniessen added 2 commits October 15, 2017 14:32
@tniessen
tools: replace loop with padStart
65eb726
@tniessen
tools: modernize license2rtf
70682b3
@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Oct 15, 2017
@tniessen tniessen added the refactor to ES6+ label Oct 15, 2017
@tniessen tniessen self-assigned this Oct 15, 2017
TimothyGu
TimothyGu reviewed Oct 15, 2017
View reviewed changes
Comment thread tools/license2rtf.js

Stream.call(this);
this.writable = true;
class LineSplitter extends Stream {

@TimothyGu TimothyGu Oct 15, 2017

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.

Why not inherit from Stream.Writable which provides automatic backpressure?

Sorry, something went wrong.

Uh oh!

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

All reactions

@tniessen tniessen Oct 15, 2017

Copy link
Copy Markdown
Member Author

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.

Good point, I mostly just rewrote the classes without changing any semantics / inheritance.

Sorry, something went wrong.

Uh oh!

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

All reactions
lpinca
lpinca approved these changes Oct 16, 2017
View reviewed changes

@lpinca lpinca 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.

SGTM.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread tools/license2rtf.js Outdated

function rtfEscape(string) {
rtfEscape(string) {
function toHex(number, length) {

@lpinca lpinca Oct 16, 2017

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.

Nit: I would move this to the top scope.

Sorry, something went wrong.

Uh oh!

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

apapirovski reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
targos
targos approved these changes Oct 22, 2017
View reviewed changes
jasnell
jasnell approved these changes Oct 22, 2017
View reviewed changes
@targos

targos commented Oct 28, 2017

Copy link
Copy Markdown
Member

ping @tniessen

All reactions

Sorry, something went wrong.

Uh oh!

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

@tniessen
[fixup] lpinca's nit
a26186d
@tniessen

tniessen commented Oct 28, 2017

Copy link
Copy Markdown
Member Author

I would like to land this without addressing #16220 (comment) which can be done in a separate PR (unless someone objects).

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

@tniessen

tniessen commented Oct 29, 2017

Copy link
Copy Markdown
Member Author

Landed in 9d76850, e2ce130.

All reactions

Sorry, something went wrong.

Uh oh!

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

@tniessen tniessen closed this Oct 29, 2017
tniessen added a commit that referenced this pull request Oct 29, 2017
@tniessen
tools: replace loop with padStart
9d76850
PR-URL: #16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
tniessen added a commit that referenced this pull request Oct 29, 2017
@tniessen
tools: modernize license2rtf
e2ce130
PR-URL: #16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@jasnell jasnell mentioned this pull request Oct 30, 2017
Proposal: 2017-10-31, Version 9.0.0 (Current) #15135
Merged
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
@tniessen @gibfahn
tools: replace loop with padStart
8c1332c
PR-URL: #16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
@tniessen @gibfahn
tools: modernize license2rtf
d079a81
PR-URL: #16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
@tniessen @gibfahn
tools: replace loop with padStart
e402694
PR-URL: #16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 30, 2017
@tniessen @gibfahn
tools: modernize license2rtf
473377f
PR-URL: #16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 31, 2017
@tniessen @gibfahn
tools: replace loop with padStart
d5891b5
PR-URL: #16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
gibfahn pushed a commit that referenced this pull request Oct 31, 2017
@tniessen @gibfahn
tools: modernize license2rtf
3d8a7e9
PR-URL: #16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@gibfahn gibfahn mentioned this pull request Oct 31, 2017
v8.9.0 proposal #16630
Merged
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
@tniessen @Qard
tools: replace loop with padStart
5bc6daf
PR-URL: nodejs/node#16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
@tniessen @Qard
tools: modernize license2rtf
07fa7b7
PR-URL: nodejs/node#16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
@tniessen @Qard
tools: replace loop with padStart
8d1fa06
PR-URL: nodejs/node#16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
@tniessen @Qard
tools: modernize license2rtf
d1dbd95
PR-URL: nodejs/node#16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@MylesBorins

MylesBorins commented Nov 16, 2017

Copy link
Copy Markdown
Contributor

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

All reactions

Sorry, something went wrong.

Uh oh!

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

@MylesBorins MylesBorins added the backport-requested-v6.x label Nov 16, 2017
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
@tniessen @addaleax
tools: replace loop with padStart
f47c5d0
PR-URL: nodejs/node#16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
@tniessen @addaleax
tools: modernize license2rtf
edd9d35
PR-URL: nodejs/node#16220
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@lpinca lpinca lpinca approved these changes
+2 more reviewers
@TimothyGu TimothyGu TimothyGu left review comments
@targos targos targos approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@tniessen tniessen

Labels

tools Issues and PRs related to the tools directory.

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.

7 participants

@tniessen @targos @MylesBorins @jasnell @lpinca @TimothyGu @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 01402775 — 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.