Skip to content

Conversation

@ryo-manba
Copy link
Member

Fixes #9985

Allows specifying exact versions like [email protected] in minimumReleaseAgeExclude to bypass minimumReleaseAge filtering for manually verified packages.

Semver ranges (^, ~, >=) are intentionally rejected for security.
Users must verify each version individually to prevent unverified versions from being automatically included.

@ryo-manba ryo-manba force-pushed the feat/minimum-release-age-exclude-exact-version branch from e159099 to abfb17f Compare October 9, 2025 15:44
@ryo-manba ryo-manba marked this pull request as ready for review October 9, 2025 16:05
@ryo-manba ryo-manba requested a review from zkochan as a code owner October 9, 2025 16:05
@ryo-manba ryo-manba force-pushed the feat/minimum-release-age-exclude-exact-version branch from ae2749a to de39ed6 Compare October 10, 2025 14:40
@ryo-manba ryo-manba marked this pull request as draft October 10, 2025 16:32
Comment on lines 101 to 104
}, {
...opts,
patchedDependencies: undefined,
offline: true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI tests failed due to store sharing issues between projects using different testDefaults() configs.
See: https://github.com/pnpm/pnpm/actions/runs/18424090647/job/52502860033

@ryo-manba ryo-manba marked this pull request as ready for review October 11, 2025 07:59
@zkochan zkochan requested a review from Copilot October 17, 2025 19:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for exact versions in minimumReleaseAgeExclude configuration to bypass minimumReleaseAge filtering for manually verified packages. Users can now specify patterns like [email protected] to exclude specific versions from minimum release age checks, while semver ranges are intentionally rejected for security reasons.

Key changes:

  • Introduces createVersionMatcher function to handle exact version patterns with || unions
  • Replaces string-only matching with version-aware matching that returns exact version arrays
  • Updates resolver pipeline to pass version exclusion data through publishedByExclude parameter

Reviewed Changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
config/matcher/src/index.ts Implements new createVersionMatcher function with exact version parsing and validation
config/matcher/test/index.ts Adds comprehensive tests for version matching functionality
reviewing/outdated/src/createManifestGetter.ts Updates to use new version matcher and pass exclusions to resolver
resolving/npm-resolver/src/pickPackageFromMeta.ts Integrates version exclusions into package metadata filtering
pkg-manager/resolve-dependencies/src/resolveDependencyTree.ts Switches from createMatcher to createVersionMatcher
registry/pkg-metadata-filter/src/index.ts Adds support for trusted versions in publish date filtering
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zkochan zkochan requested a review from Copilot October 18, 2025 08:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 19 out of 20 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zkochan zkochan requested a review from Copilot October 18, 2025 09:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@zkochan zkochan merged commit 7c1382f into pnpm:main Oct 18, 2025
13 checks passed
@ryo-manba ryo-manba deleted the feat/minimum-release-age-exclude-exact-version branch October 18, 2025 14:58
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

Successfully merging this pull request may close these issues.

minimumReleaseAgeExclude: Add support for version range

2 participants