Skip to content

tools: refactor license2rtf.js to ESM

This PR tries to refactor license2rtf.js to ESM. Should still produce the same result:

$ git checkout master                                                                 
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
$ cat LICENSE | out/Release/node tools/license2rtf.js > LICENSE_ORIGINAL.rtf 
$ git checkout esm/license2rtf            
Switched to branch 'esm/license2rtf'
Your branch is up to date with 'origin/esm/license2rtf'.
$ cat LICENSE | out/Release/node tools/license2rtf.mjs > LICENSE_NEW.rtf     
$ sha256sum LICENSE_ORIGINAL.rtf LICENSE_NEW.rtf
48264d4618ee04c3347303d4de0e36d351c08ad885a9c7bf2c3b310523178325  LICENSE_ORIGINAL.rtf
48264d4618ee04c3347303d4de0e36d351c08ad885a9c7bf2c3b310523178325  LICENSE_NEW.rtf

Changes:

  • commonjs format to esm
  • use pipeline promise version instead of a serial of pipe function to improve readability

Merge request reports

Loading