Re:50% of new NPM packages are spam
by Hackbraten on Thursday March 30, 2023 @12:19PM
(#35375137)
Which better ways are you referring to?
[ Parent
| on HN ]
Install from GitHub directly is probably the simplest.
Re:50% of new NPM packages are spam
by slaymaker1907 on Thursday March 30, 2023 @07:43PM
(#35380421)
It's really important for long term projects to keep access to all dependencies. Package lock files only guarantee that your inputs are still correct but they do not guarantee your inputs will still be around in 10 years.
Falls apart for typescript projects if js files aren't also committed and the package.json setup properly to export the JS code as a module.
Installing from GH directly can also fall apart when fancy built scripts are in place that have to be ran to create actual useful code. :(
monorepos/workspaces presumably
npm link can be used to work on dependencies locally.
To install directly from GH, you can commit the compiled typescript into github, that will allow you to NPM install directly from GH.