Skip to content

chore: set bun minimumReleaseAge to 7 days - #78

Merged
macalinao merged 1 commit into
masterfrom
bun-min-release-age
Aug 1, 2026
Merged

chore: set bun minimumReleaseAge to 7 days#78
macalinao merged 1 commit into
masterfrom
bun-min-release-age

Conversation

@macalinao

@macalinao macalinao commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Adds a root bunfig.toml setting Bun's install-time minimum release age to 7 days (604800 seconds).

[install]
minimumReleaseAge = 604800

With this set, bun install will refuse to resolve npm package versions published less than 7 days ago, falling back to the newest version that is old enough. This is a supply-chain mitigation: compromised releases are typically caught and yanked within hours to days of publication, so a cooldown window keeps freshly-published malicious versions out of the dependency graph.

No exclusions (minimumReleaseAgeExcludes) are configured.

Verified with bun install --dry-run (bun 1.3.13) — resolves cleanly, no lockfile changes.

Summary by Sourcery

Build:

  • Add root bunfig.toml with install.minimumReleaseAge set to 7 days to enforce a release age cooldown for dependencies.

Summary by CodeRabbit

  • Chores
    • Updated package installation settings to require dependencies to be at least seven days old before installation.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: bc6270ab-8ebc-4bb2-b5cc-7d11bd18dd3a

📥 Commits

Reviewing files that changed from the base of the PR and between da538e6 and 7bb6bde.

📒 Files selected for processing (1)
  • bunfig.toml

Walkthrough

Bun installation now requires package versions to be at least seven days old.

Changes

Bun installation policy

Layer / File(s) Summary
Configure minimum package release age
bunfig.toml
The Bun [install] configuration sets minimumReleaseAge to 604800 seconds.

Estimated code review effort: 1 (Trivial) | ~2 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bun-min-release-age

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Aug 1, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds a root Bun configuration (bunfig.toml) to enforce a 7-day minimum age for npm package releases during bun install as a supply-chain mitigation.

Sequence diagram for bun install minimumReleaseAge behavior

sequenceDiagram
  actor Developer
  participant BunCLI as Bun
  participant NpmRegistry

  Developer->>BunCLI: bun install
  BunCLI->>NpmRegistry: resolve package versions
  NpmRegistry-->>BunCLI: available_versions
  alt [version_age >= minimumReleaseAge]
    BunCLI->>BunCLI: select newest_eligible_version
  else [no eligible version]
    BunCLI->>Developer: fail install (too recent releases)
  end
  BunCLI-->>Developer: dependencies installed using cooled versions
Loading

File-Level Changes

Change Details Files
Configure Bun installs to only resolve npm package versions at least 7 days old.
  • Introduce a new root Bun configuration file with an [install] section.
  • Set the minimumReleaseAge to 604800 seconds (7 days) to gate acceptable package versions.
  • Document the intent with an inline comment explaining the 7-day age requirement.
  • Verified via bun install --dry-run that dependencies resolve without altering the lockfile.
bunfig.toml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@macalinao
macalinao marked this pull request as ready for review August 1, 2026 18:49
@macalinao
macalinao merged commit 0d81dc7 into master Aug 1, 2026
10 of 11 checks passed
@macalinao
macalinao deleted the bun-min-release-age branch August 1, 2026 18:49

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant