Description
-
Issue Newly published versions of package managers distributed from npm cannot be installed due to key id mismatch #612 records a disruption to the corepack service after npm registry keys were updated.
-
Please don't make error of fetching latest version information if packageManager field is specified. #625 describes how a project with an existing
packageManager
record can be affected if a new package manager version is released, signed with a new key, and not used in the project. -
How can this be prevented in future? I'm not familiar with how the keys and systems for using them work, so this is a question for the experts.
In #612 (comment) @wraithgar wrote
https://registry.npmjs.org/-/npm/v1/keys should now be returning two keys. During key rotation the old one was omitted by mistake and has since been re-added.
Even if a mistake hadn't been made, would there still have been an issue needing keys urgently updating in Corepack?
Does Corepack need to know in advanced if npm registry keys on the endpoint https://registry.npmjs.org/-/npm/v1/keys (see https://docs.npmjs.com/about-registry-signatures) are going to be changed?
If npm registry keys are changed, is there any advanced notice from the npm registry of a plan to change?
Is there any notification that npm registry keys have changed, at the time of change or does the endpoint need to be polled by Corepack regularly?
Can Corepack ensure that the version bundled in Node.js will always have a set of keys which can be used without error?
Also: the more fundamental question of whether Corepack should have a copy of the npm registry keys with the risk of them becoming out of date? Could Corepack simply use the live keys on https://registry.npmjs.org/-/npm/v1/keys instead of keeping a copy in the repo?
Activity