-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(pep621): use exclude-newer during uv lock when minimumReleaseAge is set #41913
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
Open
thejoeejoee
wants to merge
16
commits into
renovatebot:main
Choose a base branch
from
thejoeejoee:feat/uv-exclude-newer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c79fc1c
feat(pep621): add minimumReleaseAge to UpdateArtifactsConfig type
thejoeejoee 1444d77
feat(pep621): append --exclude-newer to uv lock when minimumReleaseAg…
thejoeejoee a2f416b
test(pep621): add tests for --exclude-newer flag in uv lock commands
thejoeejoee 0b4d5b3
chore: CR
thejoeejoee 2fc7070
refactor(pep621): use UV_EXCLUDE_NEWER env var with pyproject min-dat…
thejoeejoee 335a5d9
docs(pep621): add uv exclude-newer note to minimum-release-age docs
thejoeejoee 341376e
test(pep621): cover z.date().transform() branch in exclude-newer schema
thejoeejoee f2bd5e3
fix(pep621): address review comments on UV_EXCLUDE_NEWER
thejoeejoee 3c1e7a9
fix(pep621): use Nullish<string> for minimumReleaseAge to match confi…
thejoeejoee 9fb85e9
chore: CR suggestions
thejoeejoee a6c6c90
refactor(pep621): move schema test to schema.spec.ts, use uv section …
thejoeejoee 9c3d614
fix(pep621): fix prettier formatting in uv.spec.ts
thejoeejoee fe42046
fix(pep621): skip UV_EXCLUDE_NEWER when minimumReleaseAgeBehaviour is…
thejoeejoee 295c205
docs(pep621): remove npm section from minimum-release-age docs
thejoeejoee d8c6550
fix(pep621): add missing imports for Nullish and MinimumReleaseAgeBeh…
thejoeejoee 5af02cd
test(pep621): cover UV_EXCLUDE_NEWER for non-maintenance upgrade-pack…
thejoeejoee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,13 @@ To protect against this, it's recommended to ensure that your package manager co | |
| There is ongoing work to [integrate more closely with package manager checks](https://github.com/renovatebot/renovate/issues/41652) to make sure that Renovate's minimum release age configuration is specified when calling package managers that support it. | ||
| If you have a package manager you'd like supported, please raise a [Suggest an Idea Discussion](https://github.com/renovatebot/renovate/discussions/new?category=suggest-an-idea). | ||
|
|
||
| #### uv | ||
|
|
||
| <!-- prettier-ignore --> | ||
| For uv, Renovate reads `[tool.uv] exclude-newer` from `pyproject.toml` and uses the more restrictive (older) date between it and `minimumReleaseAge`. | ||
| The `exclude-newer` value can be an RFC 3339 timestamp (e.g. `2025-01-01T00:00:00Z`) or a friendly duration (e.g. `2 weeks`), but ISO 8601 durations (e.g. `P14D`) are not supported. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a recent change in uv, now you set See astral-sh/uv#19024. |
||
| See uv's [dependency bot integration guide](https://docs.astral.sh/uv/guides/integration/dependency-bots/#dependency-cooldown) for details on configuring `exclude-newer`. | ||
|
|
||
| ### What happens if the datasource and/or registry does not provide a release timestamp, when using `minimumReleaseAge`? | ||
|
|
||
| <!-- prettier-ignore --> | ||
|
|
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { PyProject } from './schema.ts'; | ||
|
|
||
| describe('modules/manager/pep621/schema', () => { | ||
| describe('UvConfig', () => { | ||
| it('handles exclude-newer as Date object', () => { | ||
| const result = PyProject.parse({ | ||
| tool: { | ||
| uv: { 'exclude-newer': new Date('2026-03-05T00:00:00.000Z') }, | ||
| }, | ||
| }); | ||
| expect(result.tool?.uv?.['exclude-newer']).toBe( | ||
| '2026-03-05T00:00:00.000Z', | ||
| ); | ||
| }); | ||
| }); | ||
| }); |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.