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
[feat] return list of prerendered files when prerendering #2675
Conversation
🦋 Changeset detectedLatest commit: 2ad9d2e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@@ -83,15 +83,15 @@ const OK = 2; | |||
const REDIRECT = 3; | |||
|
|||
/** | |||
* @param {{ | |||
* @type {(opts: { |
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.
@type
is a bit uncommon. I'd make it @param
and @return
so you can add a description on the return value
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.
I've updated this, can you check it is correct? I'm not too familiar with jsdoc types but i think @returns
is correct.
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.
looks good, but I think it'd be nice to add a short description after the type of what it is that's being returned
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.
Done, also tweaked the early return value to ensure a consistent return value.
Tests have magically passed now, don't look it directly in the eye! |
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Returns an array fo written files from
prerender
. Similar to #2674, it is useful for adapters to know which files have been prerendered.@dummdidumm Also similar to #2674, would this be better an object return value for future proofing? There are probably things in here that we may want to return in the future. That said, I don't think anything really obvious comes to mind right now and we don't want to overcomplicate every signature 'just in case'. Easy change either way.