Skip to content

Add instructions on date serialization at astro-actions.mdx#12082

Merged
yanthomasdev merged 4 commits into
withastro:mainfrom
kaylaa0:update-astro-actions
Jul 28, 2025
Merged

Add instructions on date serialization at astro-actions.mdx#12082
yanthomasdev merged 4 commits into
withastro:mainfrom
kaylaa0:update-astro-actions

Conversation

@kaylaa0
Copy link
Copy Markdown
Contributor

@kaylaa0 kaylaa0 commented Jul 27, 2025

Description

This PR adds documentation regarding date serialization in Astro actions, including an example for the following description:

Actions use JSON.stringify() under the hood, which turns dates into their string representation. You can use z.coerce.date() instead.

Including this new example will help guide developers when they encounter issues with date interpolation.

Related issues & labels (optional)

@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 27, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 087a832
🔍 Latest deploy log https://app.netlify.com/projects/astro-docs-2/deploys/6887ccc3c9facf000850779a
😎 Deploy Preview https://deploy-preview-12082--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@astrobot-houston
Copy link
Copy Markdown
Contributor

astrobot-houston commented Jul 27, 2025

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/reference/modules/astro-actions.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@astrobot-houston
Copy link
Copy Markdown
Contributor

Hello! Thank you for opening your first PR to Astro’s Docs! 🎉

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any broken links you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Netlify 🥳.

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Thank you for this helpful addition, @kaylaa0 ! It led to a discussion with our team because we realized that we hadn't made it very clear that this list is not really about what is supported, but what we've added special handling for. So in fact, our introduction of this list wasn't technically correct, and that's why something like z.coerce.date() wasn't included in the first place!

I've update the wording (sorry, there's no good way on GitHub for me to just make a suggestion to parts of the document that you didn't change, so I had to edit/update the file directly) to both use your example so people will get the idea, but also clarify what the list is.

What do you think about this?

@kaylaa0
Copy link
Copy Markdown
Contributor Author

kaylaa0 commented Jul 28, 2025

Thank you for your in-depth explanation. I now have a better understanding of the issue. Your updates to the file are well worded and provide clear guidance for other developers as well.

I think it looks great!

Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

Great! I'm glad this works for you and addresses your initial intention @kaylaa0 !

Thank you again for taking the time to contribute, leading to this helpful docs improvement, and welcome to Team Docs! 🥳

@sarah11918 sarah11918 added improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)! labels Jul 28, 2025
Copy link
Copy Markdown
Member

@yanthomasdev yanthomasdev left a comment

Choose a reason for hiding this comment

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

LGTM! Good job @kaylaa0, welcome to Team Docs!

@yanthomasdev yanthomasdev merged commit e8dd82d into withastro:main Jul 28, 2025
10 checks passed
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) Merge Queue Approved and ready to be merged (wait for feature release if also labelled M-O-R)!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Actions input serialization

4 participants