node-bunyan icon indicating copy to clipboard operation
node-bunyan copied to clipboard

Remove/replace dependency on MV

Open nielm opened this issue 1 year ago • 3 comments
trafficstars

npm package MV has not been updated in 9 years, and depends on a deprecated package inflight which leaks memory:

Bunyan should find a replacement for mv.

> npm install --save
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
> npm ls inflight
my-package
└─┬ [email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      └─┬ [email protected]
        └── [email protected]

nielm avatar May 23 '24 17:05 nielm

Workaround: add the following to package.json:

  "overrides": {
    "mv": "npm:dry-uninstall"
  },

which will prevent mv from being installed by using the dummy package dry-uninstall instead.

Mv is an optional module used for "rotating-file" stream type

nielm avatar May 23 '24 18:05 nielm

Interesting workaround! Thanks for sharing.

I also found the same problem: https://github.com/renovatebot/renovate/discussions/29265, any chance you're coming from Renovate too?

TWiStErRob avatar May 26 '24 20:05 TWiStErRob

Related/duplicate https://github.com/trentm/node-bunyan/issues/667

aabmass avatar Jun 03 '24 20:06 aabmass