Skip to content

Allow filtering/rejecting specific version (range) of dependency #1536

@remypar5

Description

@remypar5

Feature Request

When rejecting (or filtering), I would like to be able to specify a version (or range) of the package. E.g. reject updating a to eslint-config-prettier@9.1.1 which is known to contain malicious code. Or @mui/*@>=5.0.0 because my framework (Backstage) doesn't 5 and higher. The reasons don't really matter for this request.

With the current API this is possible by passing a function to reject but it would help us so much if it were to be handled by ncu itself.

.ncurc:

module.exports = {
  reject: [
    '@backstage/*', // managed in a different process
    'eslint-config-prettier@9.1.1', // Malicious
    '@mui/*@>=5.0.0', // Major version not supported by framework
  ],
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions