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: README.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ Found 2 dependencies with mismatching versions across the workspace. Fix with `-
113
113
## Options
114
114
115
115
| Name | Description |
116
-
|---|--- |
116
+
|:--|:-- |
117
117
|`--fix`| Whether to autofix inconsistencies (using latest version present). |
118
118
|`--ignore-dep`| Dependency to ignore mismatches for (option can be repeated). |
119
119
|`--ignore-dep-pattern`| RegExp of dependency names to ignore mismatches for (option can be repeated). |
@@ -122,6 +122,24 @@ Found 2 dependencies with mismatching versions across the workspace. Fix with `-
122
122
|`--ignore-path`| Workspace-relative path of packages to ignore mismatches for (option can be repeated). |
123
123
|`--ignore-path-pattern`| RegExp of workspace-relative path of packages to ignore mismatches for (option can be repeated). |
124
124
125
+
## Node API
126
+
127
+
| Function | Description |
128
+
| :-- | :-- |
129
+
|`check()`| Checks for inconsistencies across a workspace. Optionally fixes them. Returns lists of inconsistencies: a complete list, a fixable list, and a not fixable list. |
130
+
|`mismatchingVersionsToDetailedSummary()`| Returns a string of human-readable tables describing mismatching dependency versions. |
131
+
|`mismatchingVersionsToFixedSummary()`| Returns a string summary of the mismatching dependency versions that were fixed. |
132
+
133
+
More information about parameters and return values can be found in the types and JSDoc comments.
See a usage example in [`lib/cli.ts`](./lib/cli.ts).
142
+
125
143
## Related
126
144
127
145
*[npm-package-json-lint](https://github.com/tclindner/npm-package-json-lint) — use this complementary tool to enforce that your dependency versions use consistent range types (i.e. [prefer-caret-version-dependencies](https://npmpackagejsonlint.org/docs/rules/dependencies/prefer-caret-version-dependencies), [prefer-caret-version-devDependencies](https://npmpackagejsonlint.org/docs/rules/dependencies/prefer-caret-version-devDependencies))
0 commit comments