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

Duplicated brackets are generated in data collections. #11274

Closed
1 task done
syhily opened this issue Jun 17, 2024 · 2 comments · Fixed by #11275
Closed
1 task done

Duplicated brackets are generated in data collections. #11274

syhily opened this issue Jun 17, 2024 · 2 comments · Fixed by #11275
Labels
needs triage Issue needs to be triaged

Comments

@syhily
Copy link
Contributor

syhily commented Jun 17, 2024

Astro Info

Astro                    v4.10.3
Node                     v22.3.0
System                   macOS (arm64)
Package Manager          npm
Output                   server
Adapter                  @astrojs/node
Integrations             @astrojs/mdx

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

The latest release astro doesn't generate the JSON schema correctly. A duplicated }; is introduced for each yaml data file. I think this bug is introduced by the #11249

image

What's the expected result?

Valid schema json.

Link to Minimal Reproducible Example

https://github.com/syhily/yufan.me

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Jun 17, 2024
@syhily
Copy link
Contributor Author

syhily commented Jun 17, 2024

IIUC, the line in the belowing PR shouldn't be moved into the for-loop. It should be kept in the original place.

https://github.com/withastro/astro/pull/11249/files#diff-7e9b96084af9c6f79604dd4aaba392dc11ebb3e64f5a47f2d5c1ce67cb8abb79R452

@markgaze
Copy link
Contributor

Apologies, this was my fault! Like I said on the PR comment, I'll have a look to see if I can add some tests around this because I made an assumption that the tests passing meant everything was fine with the types but that wasn't the case, unfortunately!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants