kentcdodds / babel-plugin-macros

🎣 Allows you to build simple compile-time libraries
https://npm.im/babel-plugin-macros
MIT License
2.62k stars 135 forks source link

refactor: use simple babel config and drop babel runtime #185

Closed TrySound closed 2 years ago

TrySound commented 2 years ago

What:

With modern node there is no need for transpilation (except esm to commonjs) and having babel/runtime dependency gives nothing as it's not used by generated code as well. In this diff I replaced kcd-scripts babel config with simple commons plugin for tests. Published code stays the same and unsupported node versions should be caught by tests. Babel runtime is not necessary anymore as dependency.

Why:

How:

Checklist:

TrySound commented 2 years ago

cc @conartist6

codecov[bot] commented 2 years ago

Codecov Report

Merging #185 (016961e) into main (7f3bdec) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #185   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          131       131           
  Branches        39        39           
=========================================
  Hits           131       131           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7f3bdec...016961e. Read the comment docs.

conartist6 commented 2 years ago

Remove the module transform plugin too and all of babel. You're not using the files it's generating. I'd remove the build script as well (if it no longer does anything useful) and remove the gitignore and any other ignores on dist.

TrySound commented 2 years ago

Don't see transform-runtime plugin though found commonjs pluginn from babel6