Skip to content

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Sep 16, 2025

Inspired by pnpm https://x.com/boshen_c/status/1967798474667438299 and npm https://x.com/darcy/status/1967953846061371556

Not sure about flag name and not sure if this should always be relative or if it should be an absolute date. I don't like stuff like --before="$(date -v -7d)" because it doesn't work on Windows and you can't use it in a config file. Edit: This pr supports relative via a number, or ISO 8601 duration format, or RFC3339

Ideally in the future this should also be able to be specified in the config file.

Needs test for:

  • deno add npm:package
  • deno outdated
  • deno run
  • deno install
  • investigate more

Closes #30751

@petamoriken
Copy link
Contributor

petamoriken commented Sep 17, 2025

not sure if this should always be relative or if it should be an absolute date. I don't like stuff like --before="$(date -v -7d)" because it doesn't work on Windows and you can't use it in a config file.

How about supporting both absolute and relative timestamps using the ISO 8601 duration format?

absolute: 2025-09-16T10:48:01+0900
relative: P1D


fn min_age_arg() -> Arg {
Arg::new("minimum-release-age")
.long("minimum-release-age")
Copy link
Member Author

Choose a reason for hiding this comment

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

Probably --minimum-dependency-age, though it's a mouthful.

@dsherret
Copy link
Member Author

How about supporting both absolute and relative timestamps using the ISO 8601 duration format?

absolute: 2025-09-16T10:48:01+0900
relative: P1D

@petamoriken Yes, that sounds like a good idea.

Also, just saw your issue. Will make sure this works with update and outdated before merging.

@dsherret dsherret changed the title feat(unstable): ability to only install npm packages older than a certain amount of time feat(unstable): ability to only install dependencies older than a certain date Sep 21, 2025
@dsherret dsherret force-pushed the feat_unstable_minimum_release_cutoff_date branch from df3613f to e5247a6 Compare September 24, 2025 00:13
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.

suggestion: add a release age policy option to deno update and deno outdated
2 participants