vt-optimizer icon indicating copy to clipboard operation
vt-optimizer copied to clipboard

support node 24 and change code to module

Open smellman opened this issue 6 months ago • 3 comments

  • support node 24
    • upgrade all dependencies packages
    • added package-lock.json
    • change all code from commonjs to module
    • use static value instead of instance value
  • support current tap command without exit 1 (coverage issue)
    • remove nyc becase current tap command doesn't work with nyc
  • change all Return code to LF and added editorconfig settings (to fix ^M in git diff).
  • added docker support

smellman avatar Oct 24 '25 05:10 smellman

Thanks for doing this @smellman. A couple of questions:

  • Why the change from commonjs to ESM? That makes sense in a Javascript package that you can then import in your project to be able to use tree shaking for example but I'm not sure about the value it brings here.
  • Why the endofline setting change?

ibesora avatar Oct 25 '25 10:10 ibesora

Why the change from commonjs to ESM? That makes sense in a Javascript package that you can then import in your project to be able to use tree shaking for example but I'm not sure about the value it brings here.

chalk v5.x supports only ESM module so I need rewrite all script to ESM module.

Why the endofline setting change?

Some source files use LF while others use CRLF, which causes git diff to show ^M characters. It was more convenient to unify line endings to LF in .editorconfig, since that prevents escape characters from appearing in git diffs

smellman avatar Oct 27 '25 05:10 smellman

This makes sense. Let me review this properly. And thanks for the work!

ibesora avatar Oct 28 '25 15:10 ibesora