Repository navigation
Conversation
…ved from a mature version close #10270
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where optional dependencies were being silently skipped when they couldn't be resolved due to minimumReleaseAge settings, which is a security/policy configuration. The fix introduces a new error code ERR_PNPM_NO_MATURE_MATCHING_VERSION to distinguish maturity-related resolution failures from general resolution failures, ensuring users are properly notified when maturity policies prevent dependency resolution.
Key Changes
- Introduced
ERR_PNPM_NO_MATURE_MATCHING_VERSIONerror code to distinguish maturity constraint failures from general resolution failures - Updated optional dependency error handling to exclude the new error code from silent skipping
- Maintained consistent error reporting for both old and new error codes
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
resolving/npm-resolver/src/index.ts |
Modified NoMatchingVersionError constructor to conditionally use the new error code when publishedBy is set |
pkg-manager/resolve-dependencies/src/resolveDependencies.ts |
Added ERR_PNPM_NO_MATURE_MATCHING_VERSION to the list of error codes that should not be silently skipped for optional dependencies |
reviewing/outdated/src/createManifestGetter.ts |
Updated error handling to catch the new error code when checking for outdated packages with maturity constraints |
cli/default-reporter/src/reportError.ts |
Added case for the new error code to use the same error formatting as the original error code |
.changeset/flat-clowns-type.md |
Documents the breaking change in @pnpm/npm-resolver with a major version bump |
.changeset/fair-nights-grow.md |
Documents the bug fix across multiple affected packages with patch version bumps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1 task
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #10270