Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: NPM Time Machine (github.com/exlee)
1 point by xlii on April 14, 2023 | hide | past | favorite
Hey y'all!

I'd like to share a small utility I wrote to help with upgrading outdated JS projects:

https://github.com/exlee/npm_time_machine

Backstory:

Some time ago I was tasked with upgrading multi-module nodejs project. It was quite complex in structure, very much alive and in development except for its libraries that weren't updated in years.

Long story short A LOT had changed throughout the years including testing libraries, toolkits, transpilers and more. Whatever approach I took, the result was a big ball of unmergeable diff^Wmud.

When discussing options with colleagues someone jokingly suggested we should've build time machine instead. NPM Registry graciously provides exact release date for prior versions so building one actually was within realm of possibilities ;-)

Since I couldn't find utility that'd allow me to pin package.json "in-time" I wrote my own. It worked nicely and fulfilled its purpose but as it was contracted work I left it behind. Problem stuck with me, though, so with "Rewrite Everything in Rust" spirit I decided to recreate it and share it.

Resolving JS dependency hell is something.. different, but that approach worked for me, so maybe it'll help someone else too.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: