You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/plugin-js-packages/README.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,6 +159,15 @@ Each dependency group has its own audit. If you want to check only a subset of d
159
159
],
160
160
```
161
161
162
+
## Adding new package managers
163
+
164
+
In order to add a support for a new package manager, one needs to do the following.
165
+
166
+
1. Expand `packageManagerSchema` in `config.ts`.
167
+
2. Expand `<command>Args` in `runner/<command>/constants.ts` with a set of arguments to be run for a given package manager command.
168
+
3. Create a custom type in `runner/<command>/types.ts` with relevant properties based on expected command JSON output.
169
+
4. Create a function in `runner/<command>/unify-type.ts` that will transform JSON output into a normalized type `OutdatedResult` or `AuditResult` and add it to `normalized<command>Mapper` in `runner/<command>/constants.ts`.
170
+
162
171
## Score calculation
163
172
164
173
Audit output score is a numeric value in the range 0-1.
0 commit comments