Merged
Conversation
🦋 Changeset detectedLatest commit: e4b5509 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 |
1 task
a6474d7 to
3ee391e
Compare
3ee391e to
e4b5509
Compare
bholmesdev
approved these changes
Apr 15, 2022
Contributor
bholmesdev
left a comment
There was a problem hiding this comment.
Finally unenc(n)umbered by bad type checks 👏
natemoo-re
approved these changes
Apr 15, 2022
Member
natemoo-re
left a comment
There was a problem hiding this comment.
Nice QoL improvement! LGTM.
Merged
1 task
1 task
Pimm
added a commit
to Pimm/astro
that referenced
this pull request
Nov 27, 2022
A PR merged back in April changed the type of Params, allowing numbers to be provided in addition to strings. See withastro#3087. However, as said PR changed the type of Params instead of GetStaticPathsItem, it also affects Astro.params. This commit moves the change to GetStaticPathsItem, reverting the type of Astro.params.
Pimm
added a commit
to Pimm/astro
that referenced
this pull request
Nov 28, 2022
A PR merged back in April changed the type of Params, allowing numbers to be provided in addition to strings. See withastro#3087. However, as said PR changed the type of Params instead of GetStaticPathsItem, it also affects Astro.params. This commit moves the change to GetStaticPathsItem, reverting the type of Astro.params.
matthewp
pushed a commit
that referenced
this pull request
Nov 28, 2022
A PR merged back in April changed the type of Params, allowing numbers to be provided in addition to strings. See #3087. However, as said PR changed the type of Params instead of GetStaticPathsItem, it also affects Astro.params. This commit moves the change to GetStaticPathsItem, reverting the type of Astro.params.
SiriousHunter
pushed a commit
to SiriousHunter/astro
that referenced
this pull request
Feb 3, 2023
* adding support for numeric params in getStaticPaths() * chore: adding changeset * ignore undefined params in type validation
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Adds support for numeric route parameters in
getStaticPaths(), for example when including years/months/days in a blog post URLThis also adds type validation for route parameters to throw an error when
getStaticPaths()is given a parameter that isn't a string or numberTesting
getStaticPaths()test updated to include a route using a number for theyearparameterDocs
Related docs PR #345