Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolving a dependabot alert on a repository using the Github NPM Package Registry looks for updates in the wrong registry #11496

Open
1 task done
ImRodry opened this issue Feb 5, 2025 · 0 comments
Labels
L: dart:pub Dart packages via pub L: javascript T: bug 🐞 Something isn't working

Comments

@ImRodry
Copy link

ImRodry commented Feb 5, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

npm

Package manager version

yarn v4.5.3

Language version

Node.js v22.13.1

Manifest location and content before the Dependabot update

No response

dependabot.yml content

version: 2
registries:
  private:
    type: npm-registry
    url: https://npm.pkg.github.com
    token: ${{ secrets.GH_TOKEN }}
    replaces-base: true
updates:
  - package-ecosystem: npm
    directory: "/"
    registries:
      - private

Updated dependency

undici from 6.19.8 to 6.21.1 or later

What you expected to see, versus what you actually saw

When requesting dependabot to resolve a security alert and create a PR on a context that has a private repo configured with the Github Package Registry, dependabot will try to look for updates on the affected package on the Github Package Regitry despite the package being a public one. It should instead look in the yarn registry like it is written in the yarn.lock file.

Native package manager behavior

The native package manager looks for updates for the package in the regitry specified in the lockfile

Images of the diff or a link to the PR, issue, or logs

Image

Image

Smallest manifest that reproduces the issue

{
	"name": "test",
	"version": "1.0.0",
	"description": "Test app",
	"main": "dist/index.js",
	"license": "UNLICENSED",
	"private": true,
	"dependencies": {
		"discord.js": "^14.16.3",
	},
}
@ImRodry ImRodry added the T: bug 🐞 Something isn't working label Feb 5, 2025
@github-actions github-actions bot added L: dart:pub Dart packages via pub L: javascript labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: dart:pub Dart packages via pub L: javascript T: bug 🐞 Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant