Renovate: npm: deprecated check is skipped if current version starts with `v`

Created on 18 Nov 2020  路  10Comments  路  Source: renovatebot/renovate

What Renovate type, platform and version are you using?

GitHub.com

Describe the bug

Renovate raises a PR to update node-fetch from v3.0.0-beta.9 to 3.0.0-beta.6-exportfix.

6 < 9, so Renovate should not try to open this PR.

Relevant debug logs

I don't know what exactly is relevant, so I pasted the entire job log from my test repo here. It's fairly short since my test repo only has one dependency.


Renovate debug logs

INFO: Repository started
{
  "renovateVersion": "23.84.0"
}
DEBUG: Using localDir: /mnt/renovate/gh/stephenwade/renovate-issue-repro
DEBUG: Repository cache is valid
DEBUG: initRepo("stephenwade/renovate-issue-repro")
DEBUG: Overriding default GitHub endpoint
{
  "endpoint": "https://api.github.com/"
}
DEBUG: No dangling containers to remove
DEBUG: stephenwade/renovate-issue-repro default branch = main
DEBUG: Using personal access token for git init
DEBUG: resetMemCache()
DEBUG: checkOnboarding()
DEBUG: isOnboarded()
DEBUG: findFile(renovate.json)
DEBUG: Initializing git repository into /mnt/renovate/gh/stephenwade/renovate-issue-repro
DEBUG: git clone completed
{
  "durationMs": 574
}
DEBUG: latest commit
{
  "latestCommitDate": "2020-11-18T08:56:14-05:00"
}
DEBUG: Setting git author name
{
  "gitAuthorName": "Renovate Bot"
}
DEBUG: Setting git author email
{
  "gitAuthorEmail": "[email protected]"
}
DEBUG: config file exists
DEBUG: Retrieving issueList
DEBUG: Retrieved 0 issues
DEBUG: Repo is onboarded
DEBUG: Found renovate.json config file
DEBUG: Repository config
{
  "fileName": "renovate.json",
  "config": {
    "extends": [
      "config:base"
    ]
  }
}
DEBUG: migrateAndValidate()
DEBUG: No config migration necessary
DEBUG: massaged config
{
  "config": {
    "extends": [
      "config:base"
    ]
  }
}
DEBUG: migrated config
{
  "config": {
    "extends": [
      "config:base"
    ]
  }
}
DEBUG: Found repo ignorePaths
{
  "ignorePaths": [
    "**/node_modules/**",
    "**/bower_components/**",
    "**/vendor/**",
    "**/examples/**",
    "**/__tests__/**",
    "**/test/**",
    "**/tests/**",
    "**/__fixtures__/**"
  ]
}
DEBUG: detectSemanticCommits()
DEBUG: getCommitMessages
DEBUG: Semantic commits detection: unknown
DEBUG: No semantic commits detected
DEBUG: Setting branchPrefix: renovate/
DEBUG: Cannot read vulnerability alerts
DEBUG: No vulnerability alerts found
DEBUG: processRepo()
DEBUG: No baseBranches
DEBUG: extract()
DEBUG: Setting current branch to main
DEBUG: latest commit
{
  "branchName": "main",
  "latestCommitDate": "2020-11-18T08:56:14-05:00"
}
DEBUG: Using file match: (^|/)tasks/[^/]+\.ya?ml$ for manager ansible
DEBUG: Using file match: (^|/)requirements\.ya?ml$ for manager ansible-galaxy
DEBUG: Using file match: azure.*pipelines?.*\.ya?ml$ for manager azure-pipelines
DEBUG: Using file match: (^|/)WORKSPACE(|\.bazel)$ for manager bazel
DEBUG: Using file match: \.bzl$ for manager bazel
DEBUG: Using file match: buildkite\.ya?ml for manager buildkite
DEBUG: Using file match: \.buildkite/.+\.ya?ml$ for manager buildkite
DEBUG: Using file match: (^|/)Gemfile$ for manager bundler
DEBUG: Using file match: (^|/)Cargo.toml$ for manager cargo
DEBUG: Using file match: (^|/).circleci/config.yml$ for manager circleci
DEBUG: Using file match: (^|/)Podfile$ for manager cocoapods
DEBUG: Using file match: (^|/)([\w-]*)composer.json$ for manager composer
DEBUG: Using file match: (^|/)deps\.edn$ for manager deps-edn
DEBUG: Using file match: (^|/)docker-compose[^/]*\.ya?ml$ for manager docker-compose
DEBUG: Using file match: (^|/|\.)Dockerfile$ for manager dockerfile
DEBUG: Using file match: (^|/)Dockerfile\.[^/]*$ for manager dockerfile
DEBUG: Using file match: (^|/).drone.yml$ for manager droneci
DEBUG: Using file match: (^|/).gitmodules$ for manager git-submodules
DEBUG: Using file match: ^\.github/workflows/[^/]+\.ya?ml$ for manager github-actions
DEBUG: Using file match: ^\.gitlab-ci\.yml$ for manager gitlabci
DEBUG: Using file match: ^\.gitlab-ci\.yml$ for manager gitlabci-include
DEBUG: Using file match: (^|/)go.mod$ for manager gomod
DEBUG: Using file match: \.gradle(\.kts)?$ for manager gradle
DEBUG: Using file match: (^|/)gradle.properties$ for manager gradle
DEBUG: Using file match: (^|/)gradle/wrapper/gradle-wrapper.properties$ for manager gradle-wrapper
DEBUG: Using file match: (^|/)requirements\.yaml$ for manager helm-requirements
DEBUG: Using file match: (^|/)values.yaml$ for manager helm-values
DEBUG: Using file match: (^|/)helmfile.yaml$ for manager helmfile
DEBUG: Using file match: (^|/)Chart.yaml$ for manager helmv3
DEBUG: Using file match: ^Formula/[^/]+[.]rb$ for manager homebrew
DEBUG: Using file match: \.html?$ for manager html
DEBUG: Using file match: (^|/)plugins\.txt for manager jenkins
DEBUG: Using file match: (^|/)kustomization\.yaml for manager kustomize
DEBUG: Using file match: (^|/)project\.clj$ for manager leiningen
DEBUG: Using file match: \.pom\.xml$ for manager maven
DEBUG: Using file match: (^|/)pom\.xml$ for manager maven
DEBUG: Using file match: (^|/)package.js$ for manager meteor
DEBUG: Using file match: (^|/)mix\.exs$ for manager mix
DEBUG: Using file match: ^.node-version$ for manager nodenv
DEBUG: Using file match: (^|/)package.json$ for manager npm
DEBUG: Using file match: \.(?:cs|fs|vb)proj$ for manager nuget
DEBUG: Using file match: \.(?:props|targets)$ for manager nuget
DEBUG: Using file match: \.config\/dotnet-tools\.json$ for manager nuget
DEBUG: Using file match: (^|/)\.nvmrc$ for manager nvm
DEBUG: Using file match: (^|/)([\w-]*)requirements.(txt|pip)$ for manager pip_requirements
DEBUG: Using file match: (^|/)setup.py$ for manager pip_setup
DEBUG: Using file match: (^|/)Pipfile$ for manager pipenv
DEBUG: Using file match: (^|/)pyproject\.toml$ for manager poetry
DEBUG: Using file match: (^|/)pubspec\.ya?ml$ for manager pub
DEBUG: Using file match: (^|/)\.ruby-version$ for manager ruby-version
DEBUG: Using file match: \.sbt$ for manager sbt
DEBUG: Using file match: project/[^/]*.scala$ for manager sbt
DEBUG: Using file match: (^|/)setup\.cfg$ for manager setup-cfg
DEBUG: Using file match: (^|/)Package\.swift for manager swift
DEBUG: Using file match: \.tf$ for manager terraform
DEBUG: Using file match: (^|/)terragrunt\.hcl$ for manager terragrunt
DEBUG: Using file match: ^.travis.yml$ for manager travis
DEBUG: Matched 1 file(s) for manager npm: package.json
DEBUG: npm file package.json has name "renovate-issue-repro"
DEBUG: Detecting Lerna and Yarn Workspaces
DEBUG: Finding locked versions
DEBUG: Found npm package files
DEBUG: Found 1 package file(s)
INFO: Dependency extraction complete
{
  "baseBranch": "main",
  "stats": {
    "managers": {
      "npm": {
        "fileCount": 1,
        "depCount": 1
      }
    },
    "total": {
      "fileCount": 1,
      "depCount": 1
    }
  }
}
DEBUG: Package releases lookups complete
{
  "baseBranch": "main"
}
DEBUG: packageFiles with updates
{
  "config": {
    "npm": [
      {
        "packageFile": "package.json",
        "deps": [
          {
            "depType": "dependencies",
            "depName": "node-fetch",
            "currentValue": "v3.0.0-beta.9",
            "datasource": "npm",
            "prettyDepType": "dependency",
            "depIndex": 0,
            "updates": [
              {
                "fromVersion": "v3.0.0-beta.9",
                "toVersion": "3.0.0-beta.6-exportfix",
                "newValue": "3.0.0-beta.6-exportfix",
                "newMajor": 3,
                "newMinor": 0,
                "updateType": "minor",
                "isSingleVersion": true,
                "releaseTimestamp": "2020-05-25T17:30:35.066Z",
                "canBeUnpublished": false
              }
            ],
            "warnings": [],
            "fixedVersion": "v3.0.0-beta.9",
            "sourceUrl": "https://github.com/bitinn/node-fetch"
          }
        ],
        "packageJsonName": "renovate-issue-repro",
        "packageFileVersion": "0.0.1",
        "packageJsonType": "library",
        "skipInstalls": true,
        "constraints": {}
      }
    ]
  }
}
DEBUG: branchifyUpgrades
DEBUG: 1 flattened updates found: node-fetch
DEBUG: Returning 1 branch(es)
DEBUG: config.repoIsOnboarded=true
DEBUG: processRepo()
DEBUG: Processing 1 branch: renovate/node-fetch-3.x
DEBUG: Calculating hourly PRs remaining
DEBUG: Retrieving PR list
DEBUG: Retrieved 0 Pull Requests
DEBUG: currentHourStart=2020-11-18T13:00:00.000+00:00
DEBUG: PR hourly limit remaining: 2
DEBUG: Calculating prConcurrentLimit (20)
DEBUG: getBranchPr(renovate/node-fetch-3.x)
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)
DEBUG: 0 PRs are currently open
DEBUG: PR concurrent limit remaining: 20
DEBUG: Calculated maximum PRs remaining this run
{
  "prsRemaining": 2
}
DEBUG: getBranchPr(renovate/node-fetch-3.x)(branch="renovate/node-fetch-3.x")
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)(branch="renovate/node-fetch-3.x")
DEBUG: processBranch with 1 upgrades(branch="renovate/node-fetch-3.x")
DEBUG: Setting current branch to main(branch="renovate/node-fetch-3.x")
DEBUG: latest commit(branch="renovate/node-fetch-3.x")
{
  "branchName": "main",
  "latestCommitDate": "2020-11-18T08:56:14-05:00"
}
DEBUG: getBranchPr(renovate/node-fetch-3.x)(branch="renovate/node-fetch-3.x")
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)(branch="renovate/node-fetch-3.x")
DEBUG: branchExists=false(branch="renovate/node-fetch-3.x")
DEBUG: Branch has 1 upgrade(s)(branch="renovate/node-fetch-3.x")
DEBUG: recreateClosed is false(branch="renovate/node-fetch-3.x")
DEBUG: findPr(renovate/node-fetch-3.x, Update dependency node-fetch to v3.0.0-beta.6-exportfix, !open)(branch="renovate/node-fetch-3.x")
DEBUG: prAlreadyExisted=false(branch="renovate/node-fetch-3.x")
DEBUG: Checking schedule(at any time, null)(branch="renovate/node-fetch-3.x")
DEBUG: No schedule defined(branch="renovate/node-fetch-3.x")
DEBUG: Branch needs creating(branch="renovate/node-fetch-3.x")
DEBUG: Using reuseExistingBranch: false(branch="renovate/node-fetch-3.x")
DEBUG: manager.getUpdatedPackageFiles()(branch="renovate/node-fetch-3.x")
{
  "reuseExistingBranch": false,
  "branchName": "renovate/node-fetch-3.x"
}
DEBUG: npm.updateDependency(): dependencies.node-fetch = 3.0.0-beta.6-exportfix(branch="renovate/node-fetch-3.x")
DEBUG: Updating packageFile content(packageFile="package.json", branch="renovate/node-fetch-3.x")
{
  "depName": "node-fetch"
}
DEBUG: Updated 1 package files(branch="renovate/node-fetch-3.x")
DEBUG: Getting updated lock files(branch="renovate/node-fetch-3.x")
DEBUG: lock file dirs(branch="renovate/node-fetch-3.x")
{
  "dirs": {
    "yarnLockDirs": [],
    "npmLockDirs": [],
    "pnpmShrinkwrapDirs": [],
    "lernaDirs": []
  }
}
DEBUG: Writing package.json files(branch="renovate/node-fetch-3.x")
{
  "packageFiles": [
    "package.json"
  ]
}
DEBUG: Writing any updated package files(branch="renovate/node-fetch-3.x")
DEBUG: Writing package.json(branch="renovate/node-fetch-3.x")
DEBUG: No updated lock files in branch(branch="renovate/node-fetch-3.x")
DEBUG: 1 file(s) to commit(branch="renovate/node-fetch-3.x")
DEBUG: Committing files to branch renovate/node-fetch-3.x(branch="renovate/node-fetch-3.x")
INFO: Branch created(branch="renovate/node-fetch-3.x")
{
  "commitSha": "6526560"
}
DEBUG: Ensuring PR(branch="renovate/node-fetch-3.x")
DEBUG: There are 0 errors and 0 warnings(branch="renovate/node-fetch-3.x")
DEBUG: getBranchPr(renovate/node-fetch-3.x)(branch="renovate/node-fetch-3.x")
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)(branch="renovate/node-fetch-3.x")
DEBUG: Creating PR(branch="renovate/node-fetch-3.x")
{
  "prTitle": "Update dependency node-fetch to v3.0.0-beta.6-exportfix"
}
DEBUG: Creating PR(branch="renovate/node-fetch-3.x")
{
  "title": "Update dependency node-fetch to v3.0.0-beta.6-exportfix",
  "head": "stephenwade:renovate/node-fetch-3.x",
  "base": "main",
  "draft": false
}
DEBUG: PR created(branch="renovate/node-fetch-3.x")
{
  "pr": 1,
  "draft": false
}
DEBUG: Adding labels '' to #1(branch="renovate/node-fetch-3.x")
INFO: PR created(branch="renovate/node-fetch-3.x")
{
  "pr": 1,
  "prTitle": "Update dependency node-fetch to v3.0.0-beta.6-exportfix"
}
DEBUG: Created Pull Request #1(branch="renovate/node-fetch-3.x")
DEBUG: Checking #1 for automerge(branch="renovate/node-fetch-3.x")
{
  "automerge": false,
  "automergeType": "pr",
  "automergeComment": "automergeComment"
}
DEBUG: No automerge(branch="renovate/node-fetch-3.x")
DEBUG: getBranchPr(renovate/node-fetch-3.x)
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)
DEBUG: Found PR #1
DEBUG: Returning from graphql open PR list
DEBUG: Removing any stale branches
DEBUG: config.repoIsOnboarded=true
DEBUG: Branch lists
{
  "branchList": [
    "renovate/node-fetch-3.x"
  ],
  "renovateBranches": [
    "renovate/node-fetch-3.x"
  ]
}
DEBUG: remainingBranches=
DEBUG: No branches to clean up
DEBUG: Repository timing splits (milliseconds)
{
  "splits": {
    "init": 2259,
    "extract": 1026,
    "lookup": 95,
    "update": 6261
  },
  "total": 10082
}
DEBUG: http statistics
{
  "hostStats": [
    "api.github.com, 6 requests, 373ms request average, 0ms queue average"
  ],
  "totalRequests": 6
}
INFO: Repository finished
{
  "durationMs": 10082
}

To Reproduce

Minimal repo demonstrating the issue: https://github.com/stephenwade/renovate-issue-repro2

Additional context

This doesn't happen if the version in package.json is ^3.0.0-beta.9. It does happen if the version is v3.0.0-beta.9. I think it has trouble determining the latest version when it compares a string with a v in it.

npm priority-4-low reproduced bug

All 10 comments

I think it's because 3.0.0-beta.6-exportfix is not a valid semver and renovate somehow patches it to something greater than 3.0.0-beta.9 馃

I don't think the issue is with 3.0.0-beta.6-exportfix.

It doesn't happen if the version in package.json is ^3.0.0-beta.9. It does happen if the version is v3.0.0-beta.9.

image

Not a bug - unless it's a but in the node semver library itself

How we add this to our new workarounds preset to make the problem go away for everyone?

When the version specified uses a caret (^3.0.0-beta.9), the logs say:

DEBUG: Skipping [email protected] because it is deprecated

This doesn't happen if the version specified uses a v. I think this is the issue - Renovate should still realize that the version is deprecated.

Can you use subdirectories in your reproduction repo to show the 2 (or more) cases simultaneously?

I agree that if that badly tagged one is deprecated then we should not upgrade to it.

@rarkins Reproduced in a new repo: https://github.com/stephenwade/renovate-issue-repro2


Renovate logs

INFO: Repository started
{
  "renovateVersion": "23.84.0"
}
DEBUG: Using localDir: /mnt/renovate/gh/stephenwade/renovate-issue-repro2
DEBUG: Repository cache not found
{
  "cacheFileName": "/tmp/renovate-cache/renovate/repository/github/stephenwade/renovate-issue-repro2.json"
}
DEBUG: initRepo("stephenwade/renovate-issue-repro2")
DEBUG: Overriding default GitHub endpoint
{
  "endpoint": "https://api.github.com/"
}
DEBUG: No dangling containers to remove
DEBUG: stephenwade/renovate-issue-repro2 default branch = main
DEBUG: Using personal access token for git init
DEBUG: resetMemCache()
DEBUG: checkOnboarding()
DEBUG: isOnboarded()
DEBUG: findFile(renovate.json)
DEBUG: Initializing git repository into /mnt/renovate/gh/stephenwade/renovate-issue-repro2
DEBUG: git clone completed
{
  "durationMs": 584
}
DEBUG: latest commit
{
  "latestCommitDate": "2020-11-18T09:43:49-05:00"
}
DEBUG: Setting git author name
{
  "gitAuthorName": "Renovate Bot"
}
DEBUG: Setting git author email
{
  "gitAuthorEmail": "[email protected]"
}
DEBUG: config file exists
DEBUG: Retrieving issueList
DEBUG: Retrieved 0 issues
DEBUG: Repo is onboarded
DEBUG: Found renovate.json config file
DEBUG: Repository config
{
  "fileName": "renovate.json",
  "config": {
    "extends": [
      "config:base"
    ]
  }
}
DEBUG: migrateAndValidate()
DEBUG: No config migration necessary
DEBUG: massaged config
{
  "config": {
    "extends": [
      "config:base"
    ]
  }
}
DEBUG: migrated config
{
  "config": {
    "extends": [
      "config:base"
    ]
  }
}
DEBUG: Found repo ignorePaths
{
  "ignorePaths": [
    "**/node_modules/**",
    "**/bower_components/**",
    "**/vendor/**",
    "**/examples/**",
    "**/__tests__/**",
    "**/test/**",
    "**/tests/**",
    "**/__fixtures__/**"
  ]
}
DEBUG: detectSemanticCommits()
DEBUG: getCommitMessages
DEBUG: Semantic commits detection: unknown
DEBUG: No semantic commits detected
DEBUG: Setting branchPrefix: renovate/
DEBUG: Cannot read vulnerability alerts
DEBUG: No vulnerability alerts found
DEBUG: processRepo()
DEBUG: No baseBranches
DEBUG: extract()
DEBUG: Setting current branch to main
DEBUG: latest commit
{
  "branchName": "main",
  "latestCommitDate": "2020-11-18T09:43:49-05:00"
}
DEBUG: Using file match: (^|/)tasks/[^/]+\.ya?ml$ for manager ansible
DEBUG: Using file match: (^|/)requirements\.ya?ml$ for manager ansible-galaxy
DEBUG: Using file match: azure.*pipelines?.*\.ya?ml$ for manager azure-pipelines
DEBUG: Using file match: (^|/)WORKSPACE(|\.bazel)$ for manager bazel
DEBUG: Using file match: \.bzl$ for manager bazel
DEBUG: Using file match: buildkite\.ya?ml for manager buildkite
DEBUG: Using file match: \.buildkite/.+\.ya?ml$ for manager buildkite
DEBUG: Using file match: (^|/)Gemfile$ for manager bundler
DEBUG: Using file match: (^|/)Cargo.toml$ for manager cargo
DEBUG: Using file match: (^|/).circleci/config.yml$ for manager circleci
DEBUG: Using file match: (^|/)Podfile$ for manager cocoapods
DEBUG: Using file match: (^|/)([\w-]*)composer.json$ for manager composer
DEBUG: Using file match: (^|/)deps\.edn$ for manager deps-edn
DEBUG: Using file match: (^|/)docker-compose[^/]*\.ya?ml$ for manager docker-compose
DEBUG: Using file match: (^|/|\.)Dockerfile$ for manager dockerfile
DEBUG: Using file match: (^|/)Dockerfile\.[^/]*$ for manager dockerfile
DEBUG: Using file match: (^|/).drone.yml$ for manager droneci
DEBUG: Using file match: (^|/).gitmodules$ for manager git-submodules
DEBUG: Using file match: ^\.github/workflows/[^/]+\.ya?ml$ for manager github-actions
DEBUG: Using file match: ^\.gitlab-ci\.yml$ for manager gitlabci
DEBUG: Using file match: ^\.gitlab-ci\.yml$ for manager gitlabci-include
DEBUG: Using file match: (^|/)go.mod$ for manager gomod
DEBUG: Using file match: \.gradle(\.kts)?$ for manager gradle
DEBUG: Using file match: (^|/)gradle.properties$ for manager gradle
DEBUG: Using file match: (^|/)gradle/wrapper/gradle-wrapper.properties$ for manager gradle-wrapper
DEBUG: Using file match: (^|/)requirements\.yaml$ for manager helm-requirements
DEBUG: Using file match: (^|/)values.yaml$ for manager helm-values
DEBUG: Using file match: (^|/)helmfile.yaml$ for manager helmfile
DEBUG: Using file match: (^|/)Chart.yaml$ for manager helmv3
DEBUG: Using file match: ^Formula/[^/]+[.]rb$ for manager homebrew
DEBUG: Using file match: \.html?$ for manager html
DEBUG: Using file match: (^|/)plugins\.txt for manager jenkins
DEBUG: Using file match: (^|/)kustomization\.yaml for manager kustomize
DEBUG: Using file match: (^|/)project\.clj$ for manager leiningen
DEBUG: Using file match: \.pom\.xml$ for manager maven
DEBUG: Using file match: (^|/)pom\.xml$ for manager maven
DEBUG: Using file match: (^|/)package.js$ for manager meteor
DEBUG: Using file match: (^|/)mix\.exs$ for manager mix
DEBUG: Using file match: ^.node-version$ for manager nodenv
DEBUG: Using file match: (^|/)package.json$ for manager npm
DEBUG: Using file match: \.(?:cs|fs|vb)proj$ for manager nuget
DEBUG: Using file match: \.(?:props|targets)$ for manager nuget
DEBUG: Using file match: \.config\/dotnet-tools\.json$ for manager nuget
DEBUG: Using file match: (^|/)\.nvmrc$ for manager nvm
DEBUG: Using file match: (^|/)([\w-]*)requirements.(txt|pip)$ for manager pip_requirements
DEBUG: Using file match: (^|/)setup.py$ for manager pip_setup
DEBUG: Using file match: (^|/)Pipfile$ for manager pipenv
DEBUG: Using file match: (^|/)pyproject\.toml$ for manager poetry
DEBUG: Using file match: (^|/)pubspec\.ya?ml$ for manager pub
DEBUG: Using file match: (^|/)\.ruby-version$ for manager ruby-version
DEBUG: Using file match: \.sbt$ for manager sbt
DEBUG: Using file match: project/[^/]*.scala$ for manager sbt
DEBUG: Using file match: (^|/)setup\.cfg$ for manager setup-cfg
DEBUG: Using file match: (^|/)Package\.swift for manager swift
DEBUG: Using file match: \.tf$ for manager terraform
DEBUG: Using file match: (^|/)terragrunt\.hcl$ for manager terragrunt
DEBUG: Using file match: ^.travis.yml$ for manager travis
DEBUG: Matched 2 file(s) for manager npm: case-1/package.json, case-2/package.json
DEBUG: npm file case-1/package.json has name "renovate-issue-repro"
DEBUG: npm file case-2/package.json has name "renovate-issue-repro"
DEBUG: Detecting Lerna and Yarn Workspaces
DEBUG: Finding locked versions
DEBUG: Found npm package files
DEBUG: Found 2 package file(s)
INFO: Dependency extraction complete
{
  "baseBranch": "main",
  "stats": {
    "managers": {
      "npm": {
        "fileCount": 2,
        "depCount": 2
      }
    },
    "total": {
      "fileCount": 2,
      "depCount": 2
    }
  }
}
DEBUG: Skipping [email protected] because it is deprecated
DEBUG: Package releases lookups complete
{
  "baseBranch": "main"
}
DEBUG: packageFiles with updates
{
  "config": {
    "npm": [
      {
        "packageFile": "case-1/package.json",
        "deps": [
          {
            "depType": "dependencies",
            "depName": "node-fetch",
            "currentValue": "v3.0.0-beta.9",
            "datasource": "npm",
            "prettyDepType": "dependency",
            "depIndex": 0,
            "updates": [
              {
                "fromVersion": "v3.0.0-beta.9",
                "toVersion": "3.0.0-beta.6-exportfix",
                "newValue": "3.0.0-beta.6-exportfix",
                "newMajor": 3,
                "newMinor": 0,
                "updateType": "minor",
                "isSingleVersion": true,
                "releaseTimestamp": "2020-05-25T17:30:35.066Z",
                "canBeUnpublished": false
              }
            ],
            "warnings": [],
            "fixedVersion": "v3.0.0-beta.9",
            "sourceUrl": "https://github.com/bitinn/node-fetch"
          }
        ],
        "packageJsonName": "renovate-issue-repro",
        "packageFileVersion": "0.0.1",
        "packageJsonType": "library",
        "skipInstalls": true,
        "constraints": {}
      },
      {
        "packageFile": "case-2/package.json",
        "deps": [
          {
            "depType": "dependencies",
            "depName": "node-fetch",
            "currentValue": "^3.0.0-beta.9",
            "datasource": "npm",
            "prettyDepType": "dependency",
            "depIndex": 0,
            "updates": [],
            "warnings": [],
            "sourceUrl": "https://github.com/bitinn/node-fetch"
          }
        ],
        "packageJsonName": "renovate-issue-repro",
        "packageFileVersion": "0.0.1",
        "packageJsonType": "library",
        "skipInstalls": true,
        "constraints": {}
      }
    ]
  }
}
DEBUG: branchifyUpgrades
DEBUG: 1 flattened updates found: node-fetch
DEBUG: Returning 1 branch(es)
DEBUG: config.repoIsOnboarded=true
DEBUG: processRepo()
DEBUG: Processing 1 branch: renovate/node-fetch-3.x
DEBUG: Calculating hourly PRs remaining
DEBUG: Retrieving PR list
DEBUG: Retrieved 0 Pull Requests
DEBUG: currentHourStart=2020-11-18T14:00:00.000+00:00
DEBUG: PR hourly limit remaining: 2
DEBUG: Calculating prConcurrentLimit (20)
DEBUG: getBranchPr(renovate/node-fetch-3.x)
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)
DEBUG: 0 PRs are currently open
DEBUG: PR concurrent limit remaining: 20
DEBUG: Calculated maximum PRs remaining this run
{
  "prsRemaining": 2
}
DEBUG: getBranchPr(renovate/node-fetch-3.x)(branch="renovate/node-fetch-3.x")
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)(branch="renovate/node-fetch-3.x")
DEBUG: processBranch with 1 upgrades(branch="renovate/node-fetch-3.x")
DEBUG: Setting current branch to main(branch="renovate/node-fetch-3.x")
DEBUG: latest commit(branch="renovate/node-fetch-3.x")
{
  "branchName": "main",
  "latestCommitDate": "2020-11-18T09:43:49-05:00"
}
DEBUG: getBranchPr(renovate/node-fetch-3.x)(branch="renovate/node-fetch-3.x")
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)(branch="renovate/node-fetch-3.x")
DEBUG: branchExists=false(branch="renovate/node-fetch-3.x")
DEBUG: Branch has 1 upgrade(s)(branch="renovate/node-fetch-3.x")
DEBUG: recreateClosed is false(branch="renovate/node-fetch-3.x")
DEBUG: findPr(renovate/node-fetch-3.x, Update dependency node-fetch to v3.0.0-beta.6-exportfix, !open)(branch="renovate/node-fetch-3.x")
DEBUG: prAlreadyExisted=false(branch="renovate/node-fetch-3.x")
DEBUG: Checking schedule(at any time, null)(branch="renovate/node-fetch-3.x")
DEBUG: No schedule defined(branch="renovate/node-fetch-3.x")
DEBUG: Branch needs creating(branch="renovate/node-fetch-3.x")
DEBUG: Using reuseExistingBranch: false(branch="renovate/node-fetch-3.x")
DEBUG: manager.getUpdatedPackageFiles()(branch="renovate/node-fetch-3.x")
{
  "reuseExistingBranch": false,
  "branchName": "renovate/node-fetch-3.x"
}
DEBUG: npm.updateDependency(): dependencies.node-fetch = 3.0.0-beta.6-exportfix(branch="renovate/node-fetch-3.x")
DEBUG: Updating packageFile content(packageFile="case-1/package.json", branch="renovate/node-fetch-3.x")
{
  "depName": "node-fetch"
}
DEBUG: Updated 1 package files(branch="renovate/node-fetch-3.x")
DEBUG: Getting updated lock files(branch="renovate/node-fetch-3.x")
DEBUG: lock file dirs(branch="renovate/node-fetch-3.x")
{
  "dirs": {
    "yarnLockDirs": [],
    "npmLockDirs": [],
    "pnpmShrinkwrapDirs": [],
    "lernaDirs": []
  }
}
DEBUG: Writing package.json files(branch="renovate/node-fetch-3.x")
{
  "packageFiles": [
    "case-1/package.json",
    "case-2/package.json"
  ]
}
DEBUG: Writing any updated package files(branch="renovate/node-fetch-3.x")
DEBUG: Writing case-1/package.json(branch="renovate/node-fetch-3.x")
DEBUG: No updated lock files in branch(branch="renovate/node-fetch-3.x")
DEBUG: 1 file(s) to commit(branch="renovate/node-fetch-3.x")
DEBUG: Committing files to branch renovate/node-fetch-3.x(branch="renovate/node-fetch-3.x")
INFO: Branch created(branch="renovate/node-fetch-3.x")
{
  "commitSha": "59faa4d"
}
DEBUG: Ensuring PR(branch="renovate/node-fetch-3.x")
DEBUG: There are 0 errors and 0 warnings(branch="renovate/node-fetch-3.x")
DEBUG: getBranchPr(renovate/node-fetch-3.x)(branch="renovate/node-fetch-3.x")
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)(branch="renovate/node-fetch-3.x")
DEBUG: Creating PR(branch="renovate/node-fetch-3.x")
{
  "prTitle": "Update dependency node-fetch to v3.0.0-beta.6-exportfix"
}
DEBUG: Creating PR(branch="renovate/node-fetch-3.x")
{
  "title": "Update dependency node-fetch to v3.0.0-beta.6-exportfix",
  "head": "stephenwade:renovate/node-fetch-3.x",
  "base": "main",
  "draft": false
}
DEBUG: PR created(branch="renovate/node-fetch-3.x")
{
  "pr": 1,
  "draft": false
}
DEBUG: Adding labels '' to #1(branch="renovate/node-fetch-3.x")
INFO: PR created(branch="renovate/node-fetch-3.x")
{
  "pr": 1,
  "prTitle": "Update dependency node-fetch to v3.0.0-beta.6-exportfix"
}
DEBUG: Created Pull Request #1(branch="renovate/node-fetch-3.x")
DEBUG: Checking #1 for automerge(branch="renovate/node-fetch-3.x")
{
  "automerge": false,
  "automergeType": "pr",
  "automergeComment": "automergeComment"
}
DEBUG: No automerge(branch="renovate/node-fetch-3.x")
DEBUG: getBranchPr(renovate/node-fetch-3.x)
DEBUG: findPr(renovate/node-fetch-3.x, undefined, open)
DEBUG: Found PR #1
DEBUG: Returning from graphql open PR list
DEBUG: Removing any stale branches
DEBUG: config.repoIsOnboarded=true
DEBUG: Branch lists
{
  "branchList": [
    "renovate/node-fetch-3.x"
  ],
  "renovateBranches": [
    "renovate/node-fetch-3.x"
  ]
}
DEBUG: remainingBranches=
DEBUG: No branches to clean up
DEBUG: Repository timing splits (milliseconds)
{
  "splits": {
    "init": 2297,
    "extract": 1084,
    "lookup": 137,
    "update": 6428
  },
  "total": 11230
}
DEBUG: http statistics
{
  "hostStats": [
    "api.github.com, 6 requests, 506ms request average, 0ms queue average"
  ],
  "totalRequests": 6
}
INFO: Repository finished
{
  "durationMs": 11230
}

A reason - maybe the reason - you don't see an update in case 2 is because the export fix version satisfies the existing range:

image

image

We locate the fromVersion using an exact string match but would need to introduce some type of 'massage' or 'normalize' function instead.

You can work around this issue with either of these approaches:

  1. Remove v prefix from existing package.json, or
  2. This package rule:
  "packageRules": [{
    "packageNames": ["node-fetch"],
    "allowedVersions": "!/^3\\.0\\.0-beta\\.6-exportfix$/"
  }]
Was this page helpful?
0 / 5 - 0 ratings

Related issues

rtaum picture rtaum  路  36Comments

rarkins picture rarkins  路  40Comments

rarkins picture rarkins  路  40Comments

ikatyang picture ikatyang  路  34Comments

maplesteve picture maplesteve  路  105Comments