Skip to content
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: remove automatic flattening of getStaticPaths result #7845

Merged
merged 2 commits into from
Jul 27, 2023

Conversation

Princesseuh
Copy link
Member

Changes

Early in Astro we tended to do some cute magic things for users, for convenience. And while it is nice in some cases, we shifted away from this and instead prefer that users be fully conscious of what they are doing.

This PR removes a .flat() call we did on getStaticPaths return value and adds an error if the user tries to return an unflattened array

Testing

Updated tests!

Docs

Will be part of the 3.0 Migration Guide

@Princesseuh Princesseuh requested a review from a team as a code owner July 27, 2023 18:35
@changeset-bot
Copy link

changeset-bot bot commented Jul 27, 2023

🦋 Changeset detected

Latest commit: 60a73e3

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jul 27, 2023
@Princesseuh Princesseuh merged commit 963d31e into next Jul 27, 2023
14 checks passed
@Princesseuh Princesseuh deleted the feat/no-automatic-flat branch July 27, 2023 18:49
ematipico pushed a commit that referenced this pull request Jul 31, 2023
* feat: remove automatic flattening of `getStaticPaths` result

* chore: changeset
ematipico pushed a commit that referenced this pull request Aug 1, 2023
* feat: remove automatic flattening of `getStaticPaths` result

* chore: changeset
ematipico pushed a commit that referenced this pull request Aug 1, 2023
* feat: remove automatic flattening of `getStaticPaths` result

* chore: changeset
ematipico pushed a commit that referenced this pull request Aug 3, 2023
* feat: remove automatic flattening of `getStaticPaths` result

* chore: changeset
ematipico pushed a commit that referenced this pull request Aug 8, 2023
* feat: remove automatic flattening of `getStaticPaths` result

* chore: changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants