Skip to content

feat: respect minimumReleaseAge in outdated command#10030

Merged
zkochan merged 6 commits intopnpm:mainfrom
ryo-manba:feat/outdated-minimum-release-age
Sep 30, 2025
Merged

feat: respect minimumReleaseAge in outdated command#10030
zkochan merged 6 commits intopnpm:mainfrom
ryo-manba:feat/outdated-minimum-release-age

Conversation

@ryo-manba
Copy link
Copy Markdown
Member

@ryo-manba ryo-manba commented Sep 27, 2025

Fixes #10009

Added minimumReleaseAge support to outdated command.

@ryo-manba ryo-manba marked this pull request as ready for review September 27, 2025 13:14
@ryo-manba ryo-manba requested a review from zkochan as a code owner September 27, 2025 13:15
@ryo-manba ryo-manba requested a review from zkochan September 30, 2025 13:03
if (opts.minimumReleaseAge) {
const isExcluded = opts.minimumReleaseAgeExclude && createMatcher(opts.minimumReleaseAgeExclude)(packageName)
if (!isExcluded) {
publishedBy = new Date(Date.now() - opts.minimumReleaseAge * 60 * 1000)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

calculated publishedBy outside of getManifest and pass it in.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

return resolution?.manifest ?? null
let publishedBy: Date | undefined
if (opts.minimumReleaseAge) {
const isExcluded = opts.minimumReleaseAgeExclude && createMatcher(opts.minimumReleaseAgeExclude)(packageName)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pass in the created matched function instead of creating it here.

@ryo-manba ryo-manba requested a review from zkochan September 30, 2025 13:44
@zkochan zkochan requested a review from Copilot September 30, 2025 15:47
Copy link
Copy Markdown
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 the minimumReleaseAge configuration option to the outdated command, allowing users to filter out packages that are too new. The feature includes two configuration options: minimumReleaseAge (to set an age threshold in minutes) and minimumReleaseAgeExclude (to exclude specific packages from the age filter).

  • Added minimumReleaseAge and minimumReleaseAgeExclude options to outdated command handlers
  • Modified manifest getter to respect release age filtering when resolving package versions
  • Enhanced error handling to gracefully handle cases where no versions meet the age requirement

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
reviewing/plugin-commands-outdated/src/recursive.ts Passes through minimumReleaseAge options to recursive outdated handler
reviewing/plugin-commands-outdated/src/outdated.ts Adds minimumReleaseAge options to command type and handler
reviewing/outdated/test/outdated.spec.ts Comprehensive test coverage for both minimumReleaseAge features
reviewing/outdated/test/getManifest.spec.ts Tests for manifest getter with age filtering and exclusions
reviewing/outdated/src/outdatedDepsOfProjects.ts Passes minimumReleaseAge options through to outdated function
reviewing/outdated/src/outdated.ts Adds minimumReleaseAge parameters to outdated function signature
reviewing/outdated/src/createManifestGetter.ts Core implementation of age filtering logic with exclusion support
.changeset/dry-impalas-mate.md Changeset documenting the new feature

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

@zkochan zkochan merged commit 2e07c4f into pnpm:main Sep 30, 2025
11 checks passed
@welcome
Copy link
Copy Markdown

welcome bot commented Sep 30, 2025

Congrats on merging your first pull request! 🎉🎉🎉

@ryo-manba ryo-manba deleted the feat/outdated-minimum-release-age branch October 6, 2025 01:49
jeremymeng added a commit to jeremymeng/azure-sdk-for-js that referenced this pull request Dec 1, 2025
vaernion pushed a commit to Arbeidstilsynet/brevgen2 that referenced this pull request Dec 3, 2025
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [pnpm](https://pnpm.io) ([source](https://github.com/pnpm/pnpm/tree/HEAD/pnpm)) | [`10.17.1` -> `10.18.0`](https://renovatebot.com/diffs/npm/pnpm/10.17.1/10.18.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/10.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/10.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/10.17.1/10.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/10.17.1/10.18.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>pnpm/pnpm (pnpm)</summary>

### [`v10.18.0`](https://github.com/pnpm/pnpm/blob/HEAD/pnpm/CHANGELOG.md#10180)

[Compare Source](pnpm/pnpm@v10.17.1...v10.18.0)

##### Minor Changes

- Added network performance monitoring to pnpm by implementing warnings for slow network requests, including both metadata fetches and tarball downloads.

  Added configuration options for warning thresholds: `fetchWarnTimeoutMs` and `fetchMinSpeedKiBps`.
  Warning messages are displayed when requests exceed time thresholds or fall below speed minimums

  Related PR: [#&#8203;10025](pnpm/pnpm#10025).

##### Patch Changes

- Retry filesystem operations on EAGAIN errors [#&#8203;9959](pnpm/pnpm#9959).
- Outdated command respects `minimumReleaseAge` configuration [#&#8203;10030](pnpm/pnpm#10030).
- Correctly apply the `cleanupUnusedCatalogs` configuration when removing dependent packages.
- Don't fail with a meaningless error when `scriptShell` is set to `false` [#&#8203;8748](pnpm/pnpm#8748).
- `pnpm dlx` should not fail when `minimumReleaseAge` is set [#&#8203;10037](pnpm/pnpm#10037).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or PR is renamed to start with "rebase!".

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Related work items: #30372
jeremymeng added a commit to Azure/azure-sdk-for-js that referenced this pull request Dec 8, 2025
a particular fix in 10.18 pnpm/pnpm#10030 should
resolve #36426
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.

The outdated command should account for minimumReleaseAge

3 participants