Skip to content

fix(@astrojs/rss): prevent an error when pubDate is missing - #12137

Merged
matthewp merged 2 commits into
withastro:mainfrom
ArmandPhilippot:fix/astro-rss-pubdate
Oct 7, 2024
Merged

matthewp merged 2 commits into
withastro:mainfrom
ArmandPhilippot:fix/astro-rss-pubdate

Conversation

@ArmandPhilippot

@ArmandPhilippot ArmandPhilippot commented Oct 6, 2024 •

Copy link
Copy Markdown
Member

This PR fixes an issue reported in Doc repository: pubDate is optional when generating RSS items since #9610 but if not provided an error is thrown (Invalid input (items.0.pubDate)).

I have not created a ticket, but I have a minimal reproduction (just delete one of the pubDate).

Changes

Testing

  • I added a test and an item without date: it was failing before, now it passes.
  • I tested manually with pnpm link with the minimal reproduction and the feed is now correctly generated

All previous tests still work!

Docs

I added two different changesets since there was two issues (the doc + the bug). Otherwise, I don't think we need more documentation, the current one is already up to date.

/cc @withastro/maintainers-docs for feedback!

@changeset-bot

changeset-bot Bot commented Oct 6, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 523c1c7

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@bluwy bluwy left a comment

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.

Looks great!

@matthewp
matthewp merged commit 50dd88b into withastro:main Oct 7, 2024
@astrobot-houston astrobot-houston mentioned this pull request Oct 7, 2024
@ArmandPhilippot
ArmandPhilippot deleted the fix/astro-rss-pubdate branch October 7, 2024 15:46
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.

4 participants