adnanrahic / node-gcstats

The Unlicense
9 stars 14 forks source link

Issue-3 update dependencies #4

Closed Ghazgkull closed 3 years ago

Ghazgkull commented 3 years ago

Addresses #3

This PR updates the dependencies of the @adnanrahic/node-gcstats module to the latest. Most importantly, it updates this package to stop using the deprecated node-pre-gyp package in favor of the supported @mapbox/node-pre-gyp module. See the deprecation notice on the old module here: https://www.npmjs.com/package/node-pre-gyp

This PR also includes updates to keep the unit tests working with the latest mocha version. I renamed the tests folder to test because that's what the newest Mocha expects. And I updated the test command to pass the --expose-gc command to node directly, since Mocha no longer supports passing the flag through.

@adnanrahic Please take a look.

JNPLZ commented 3 years ago

Awesome, @Ghazgkull !

@adnanrahic can you please take a look at this MR? Thanks!

Jarco-dev commented 3 years ago

Waiting on this, hope it can get merged soon. (Due to the audit failing i can't install on linux atm)

baconandon commented 3 years ago

Sorry to be the bearer of bad news, but... even though the node-pre-gyp dependency was removed it is still bundled

Which means

  1. npm i @sematext/gc-stats installs node-pre-gyp as well as @mapbox/node-pre-gyp
  2. npm audit => 😢 (because of tar dependencies from node-pre-gyp)

FWIW npm ls node-pre-gyp after the install shows

┬ @sematext/gc-stats@1.5.4
  └── node-pre-gyp@0.15.0

(I would have added this as a comment on issue #3 but it is closed 🤷)

HTH

Ghazgkull commented 3 years ago

@baconandon At this point, you know as much about this repo as I do. :-) I see that @adnanrahic created Issue #1 a while back to remove the bundled dependency, but it seems like that never happened. Is it as simple as just removing the bundled dependency lines from the package.json manifest or are there other things to consider?

Ghazgkull commented 3 years ago

@baconandon @adnanrahic Actually, I decided to just give it a shot. I fixed everything up and submitted a PR: https://github.com/adnanrahic/node-gcstats/pull/6