-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: allow for async parsing in file loader #14932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2cd2666 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 |
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes |
Princesseuh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems fine to me! Any objection you see @ascorbic perhaps?
|
From a docs standpoint, just checking here: is this "allows the option for the Here's the existing docs for the This change is a little tricker than normal because the v6 docs have been significantly overhauled for content collections, and don't match up cleanly with our existing ones. So, I would also ask for a second docs PR made to the v6 branch too, so we can port the changes over smoothly for our revised documentation over there. Once we've clarified exactly what the impact of this change is, then @ArmandPhilippot and I can help with the changeset, and with suggesting what should happen in docs! |
Looking at the type, this is "allows" (nothing is required, unless there is an uncaught side effect somewhere in the implementation... but I don't think so, and this would be a bug). So, the user should not need to do any updates and I don't think this requires a lot of updates in docs. But, yes, we would need to update the which is bit long (3 lines on desktop view with my resolution, I think we have at least another type on 3 lines but this is not the most readable unfortunately). I wonder if it would make sense to have a public type alias for Which I think improves the readability. And we could use a link on |
Changes
parser()option on thefile()loader to return a Promise so that more complex processing can be done if needed.Testing
See included unit test.
Docs
/cc @withastro/maintainers-docs for feedback!
I'm happy to do a matching PR to the docs if preferred.