DEV Community

Discussion on: Coding in the Age of Constant Deprecation?

Collapse
 
ingosteinke profile image
Ingo Steinke, web developer • Edited

Copyfiles in another example. So, it's been deprecated due to an unsafe dependency to inflight which "is not supported, and leaks memory. Do not use it." Seems the easiest in-place alternative is changing copyfiles to npx. But why on earth hasn't anyone saved their deprecation efforts to submit a fix to copyfiles instead then?

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it.
npm ls inflight

 └─┬ copyfiles@2.4.1
   └─┬ glob@7.2.3
     └── inflight@1.0.6
Enter fullscreen mode Exit fullscreen mode

Googling it did not match any documents. It looks like there aren't any great matches for your search. Asking AI produces various alternatives, including including cpx, cpx2, cpy, cpy-cli, ncp and fs.cp(), which at least seem legit at first sight. But again, why not change a widely used peer dependency instead of deprecation and causing a disruptive wave of half-hearted "housekeeping" actionism merge request through hundreds, thousands or probably millions of JavaScript projects?

I also wondered, how serious is the inflight memory leak in practice for small projects with less than a hundred files in total in a handful of directories nested no deeper than three levels? Could we just ignore the warning pragmatically then? In this case, the severity is likely minimal or negligible.