Skip to content

Conversation

@tniessen
Copy link
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
Affected core subsystem(s)

tools

@nodejs-github-botnodejs-github-bot added the tools Issues and PRs related to the tools directory. label Oct 15, 2017
@tniessentniessen self-assigned this Oct 15, 2017

Stream.call(this);
this.writable=true;
classLineSplitterextendsStream{
Copy link
Member

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?

Copy link
MemberAuthor

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.

Copy link
Member

@lpincalpinca left a comment

Choose a reason for hiding this comment

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

SGTM.


functionrtfEscape(string){
rtfEscape(string){
functiontoHex(number,length){
Copy link
Member

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.

@targos
Copy link
Member

ping @tniessen

@tniessen
Copy link
MemberAuthor

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

@tniessen
Copy link
MemberAuthor

Landed in 9d76850, e2ce130.

tniessen added a commit that referenced this pull request Oct 29, 2017
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
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
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
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
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
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
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
PR-URL: #16220 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
@gibfahngibfahn mentioned this pull request Oct 31, 2017
Qard pushed a commit to ayojs/ayo that referenced this pull request Nov 2, 2017
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
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
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
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
Copy link
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.

addaleax pushed a commit to ayojs/ayo that referenced this pull request Dec 7, 2017
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
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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@tniessen@targos@MylesBorins@jasnell@lpinca@TimothyGu@nodejs-github-bot