Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import { schedule } from "danger";
import npmOutdated from "danger-plugin-npm-outdated";

// Note: You need to use schedule()
schedule(npmOutdated());
schedule(npmOutdated({
packages: ['@babel/cli'], // (OPTIONAL) Specify which packages you want to target
}));
```

## Sample message
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const execP = outdatedCommand => {
};

export default async function npmOutdated(options = {}) {
let outdatedCommand = "npm outdated --json";
const filterPackages = (options.packages || []).join(' ');
let outdatedCommand = `npm outdated ${filterPackages} --json`;

try {
const outdatedPackages = await execP(outdatedCommand);
Expand Down