Skip to content

feat: don't check version format if user specifys an exact version #760

@zanminkian

Description

@zanminkian

Example

  1. Case 1
{
  "devEngines": {
    "packageManager": {
      "name": "npm",
      "version": "10.7.0"
    }
  }
}

Running corepack [email protected] i has no errors.

  1. Case 2
{
  "devEngines": {
    "packageManager": {
      "name": "npm",
      "version": "^10.7.0"
    }
  }
}

Running corepack [email protected] i throws an error: Invalid package manager specification in package.json (npm@^10.7.0); expected a semver version

Expectation

No errors in case 2.

Reason

As case 1 works well, case 2 should work well too. Both of them don't need to check the version format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions