Repository navigation
Removing unused uid-number library - #1237
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1237 +/- ##
==========================================
- Coverage 96.11% 96.09% -0.03%
==========================================
Files 29 29
Lines 2213 2201 -12
==========================================
- Hits 2127 2115 -12
Misses 86 86 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Some history that might be useful context...in the early days of CITGM the intent was to use many ecosystem packages in the implementation so that the CITGM tool itself would form part of the regression test. But, I'm +1 to being lighter in module usage in CITGM itself going forward as it's a lot easier to debug/triage modules that are explicitly tested in the |
Thank you for the context, as this also means that the packages of the implementation, it could be nice to be on the |
Summary
This PR removes the uid-number library from package.json.
The
uid-numberlibrary is evaluating theuid/gidonly if one of thegiduidare type of string.https://github.com/npm/uid-number/blob/6e9bdb302ae4799d05abf12e922ccdb4bd9ea023/uid-number.js#L27-L29
In addition, the
uid-numberlibrary is converting the strings to numbershttps://github.com/npm/uid-number/blob/6e9bdb302ae4799d05abf12e922ccdb4bd9ea023/uid-number.js#L21-L22
This is not the case any more, as after landing this PR, #182 the
uid/gidis parsed by common args and it always ends up being type ofnumberwith either an actual number in it or aNaN.citgm/lib/common-args.js
Lines 95 to 107 in f6fc80b
In case of the
NaNvalue, the current code sets thegidoruid, to theprocess.getuid();orprocess.getgid();accordingly, as a fallback, before calling theuid-numbercitgm/lib/bin/citgm.js
Lines 53 to 55 in f6fc80b
Therefore, the functionality that the
uid-numberprovides, is never used, as thegiduidvariables, are always numbers, and practically, theuid-numberlibrary just returns.In addition, the
uid-numberlibrary is deprecated. Last publish was 12 years ago. By removing this library, the warning during npm install is being removed too.Checklist
npm testpasseshere