In order to add a support for a new package manager, one needs to do the following:
- Expand
packageManagerIdSchema
inconfig.ts
. - Create a new object of
PackageManager
type inpackage-managers/<name>/<name>.ts
and fill it in with all relevant data. Following the current pattern of separate files for audit and outdated result and types is recommended. - Extend
package-managers/package-managers.ts
record with the new package manager.
Note
Should your package manager require specific behaviour, feel free to request a property addition or change.
(audit|check).unifyResult()
: In order to process the results in a unified way, the expected type needs to be defined inrunner/(audit|check)/types.ts
and its transformation to normalised result implemented inrunner/(audit|check)/unify-type.ts
. This function is then referenced in the object to be called accordingly.audit.getCommandArgs(depGroup)
: Theaudit
command is run for one dependency group. In order to filter out the other dependencies, the arguments are provided dynamically based on this function. One may include frequently used arguments fromCOMMON_AUDIT_ARGS
.audit.ignoreExitCode
: Some package managers do not allow non-zero exit code override. To ignore non-zero exit code, set this property totrue
.audit.supportedDepGroups
: Some package managers do not supportaudit
check for all types of dependencies (e.g. optional). In that case, please list a supported subset of dependencies in this property. By default, all dependency groups are considered supported.audit.postProcessResult()
: Theaudit
check often does not offer exclusive result for all dependency groups. In order to filter out duplicates after the results are normalised, add a post-processing function here.