Skip to content

Commit 842ed14

Browse files
committed
tools: refactor license2rtf.js to esm module
1 parent 556df3d commit 842ed14

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ endif
10961096
$(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules
10971097
unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npm
10981098
unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npx
1099-
$(NODE) tools/license2rtf.js < LICENSE > \
1099+
$(NODE) tools/license2rtf.mjs < LICENSE > \
11001100
$(MACOSOUTDIR)/installer/productbuild/Resources/license.rtf
11011101
cp doc/osx_installer_logo.png $(MACOSOUTDIR)/installer/productbuild/Resources
11021102
pkgbuild --version $(FULLVERSION) \

tools/license2rtf.js renamed to tools/license2rtf.mjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
'use strict';
2-
3-
const assert = require('assert');
4-
const Stream = require('stream');
1+
import assert from 'node:assert';
2+
import Stream from 'node:stream';
3+
import process from 'node:process';
54

65

76
/*

vcbuild.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,9 @@ if "%use_x64_node_exe%"=="true" (
420420
set exit_code=1
421421
goto exit
422422
)
423-
%x64_node_exe% tools\license2rtf.js < LICENSE > %config%\license.rtf
423+
%x64_node_exe% tools\license2rtf.mjs < LICENSE > %config%\license.rtf
424424
) else (
425-
%node_exe% tools\license2rtf.js < LICENSE > %config%\license.rtf
425+
%node_exe% tools\license2rtf.mjs < LICENSE > %config%\license.rtf
426426
)
427427

428428
if errorlevel 1 echo Failed to generate license.rtf&goto exit

0 commit comments

Comments
 (0)