Skip to content

Add maxAgeDays option to contributor-mapping plugin to control contributors.json regeneration (speeds up npm run dev)#1078

Merged
maartenba merged 4 commits intomainfrom
mb/devmodemapping
Apr 28, 2026
Merged

Add maxAgeDays option to contributor-mapping plugin to control contributors.json regeneration (speeds up npm run dev)#1078
maartenba merged 4 commits intomainfrom
mb/devmodemapping

Conversation

@maartenba
Copy link
Copy Markdown
Member

No description provided.

…ributors.json regeneration (speeds up npm run dev)
@maartenba maartenba self-assigned this Apr 28, 2026
Copilot AI review requested due to automatic review settings April 28, 2026 08:08
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

Adds a caching option to the Astro contributor-mapping integration so contributors.json can be reused for some time instead of being regenerated on every run, reducing npm run dev startup cost.

Changes:

  • Add maxAgeDays option to ContributorMappingOptions (defaulting to 10 days).
  • Short-circuit contributor generation when the existing contributors.json is newer than maxAgeDays.
  • Wire the new option through the integration into generateContributors().

Comment thread astro/src/plugins/contributor-mapping.ts Outdated
Comment thread astro/src/plugins/contributor-mapping.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 08:20
@maartenba maartenba added the documentation Improvements or additions to documentation label Apr 28, 2026
@maartenba maartenba added this to the 2026-Q2 milestone Apr 28, 2026
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

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

Comment thread astro/src/plugins/contributor-mapping.ts Outdated
Comment thread astro/src/plugins/contributor-mapping.ts
Comment thread astro/astro.config.mjs Outdated
Copilot AI review requested due to automatic review settings April 28, 2026 08:29
@maartenba maartenba review requested due to automatic review settings April 28, 2026 08:29
@maartenba maartenba merged commit e40a104 into main Apr 28, 2026
4 checks passed
@maartenba maartenba deleted the mb/devmodemapping branch April 28, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants