jsenv / importmap-node-module

Generate importmap for node_modules
35 stars 4 forks source link

add basic CLI #65

Closed bakkot closed 1 year ago

bakkot commented 1 year ago

Fixes https://github.com/jsenv/importmap-node-module/issues/63.

I only implemented a subset of the options, since you can still use the API if you need more advanced features.

github-actions[bot] commented 1 year ago

Performance impact

Impact on 9 metrics when merging cli into master. Before drawing conclusion, keep in mind performance variability.

package metrics (+2%)
Metric Before merge After merge Impact
import duration 0.2 second 0.2 second :ghost:
import memory heap used 7.5 MB 7.5 MB +9.3 kB / +0.1% :arrow_upper_right:
npm tarball size 24.4 kB 25 kB +648 B / +3% :arrow_upper_right:
npm tarball unpacked size 110 kB 112 kB +2.4 kB / +2% :arrow_upper_right:
npm tarball file count 25 26 +1 / +4% :arrow_upper_right:
write importmap metrics (-0.3%)
Metric Before merge After merge Impact
write importmap duration 0.2 second 0.2 second -0.002 second / -0.8% :arrow_lower_right:
write importmap memory heap used 7.6 MB 7.6 MB +256 B / +0.003% :arrow_upper_right:
number of fs read operation 0 0 :ghost:
number of fs write operation 8 8 :ghost:

Generated by @jsenv/performance-impact during performance_impact#5231629786 on 45d009b

dmail commented 1 year ago

It looks fantastic I'll review and test monday

dmail commented 1 year ago

👌 I am merging the pr and publishing a new version with this

dmail commented 1 year ago

Version 5.5.1 published with your changes, thank you very much very nice PR

dmail commented 1 year ago

Found a little bug to fix: https://github.com/jsenv/importmap-node-module/commit/85d516574b47ca824847c19429b9a5af7c089473 Version 5.5.2 will have the fix