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

The version of pnpm is not being retrieved from the packageManager field in the package.json. #86

Open
CinArb2 opened this issue Jun 8, 2023 · 6 comments

Comments

@CinArb2
Copy link

CinArb2 commented Jun 8, 2023

I see the version can be omitted when we have the packageManager field defined in our package.json.

This is my package.json see pkg.json

This is the error I get: see error

Error: Error: Invalid packageManager field in package.json

It seems that retrieving range versions from the 'packageManager' field is not possible; only exact versions can be retrieved.

@KSXGitHub
Copy link
Collaborator

^pnpm is an invalid prefix.

@CinArb2
Copy link
Author

CinArb2 commented Jul 25, 2023

yes, using "packageManager": "pnpm@^8.6.1", works, but there is an issue with a pattern matching error in VSC "String does not match the pattern of "(npm|pnpm|yarn)@\d+.\d+.\d+(-.+)?"", I'll look into it. Thanks for your reply

@KSXGitHub
Copy link
Collaborator

but there is an issue with a pattern matching error in VSC "String does not match the pattern of "(npm|pnpm|yarn)@\d+.\d+.\d+(-.+)?"", I'll look into it.

It seems that our action supporting version range is a non-standard extension. The spec seems the require the exact version (packageManager itself is still experimental after all). And the regex in VS Code schema fails to exclude invalid initial characters.

@glensc
Copy link

glensc commented Oct 29, 2023

@Potof-TheOz
Copy link

This behavior makes Dependabot failing on my project

i put this in my package.json
"packageManager": "pnpm@^8.6.1",

My github action is working quite well, by detecting the good version automatically.

But dependantBot fails :(

This is the error in the output logs of Dependabot
updater | 2023/11/13 07:51:02 ERROR <job_748887009> Usage Error: Invalid package manager specification in package.json; expected a semver version

So I rollbacked and put my pnpm version hardcoded in my github actions :(

@KSXGitHub
Copy link
Collaborator

@Potof-TheOz Caret isn't supported by corepack either. So I guess our unintentional extension was a mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants