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

fix: syntax issues in next.js JS blog template #4952

Merged
merged 2 commits into from
Sep 29, 2023

Conversation

plsrd
Copy link
Member

@plsrd plsrd commented Sep 26, 2023

Description

This PR corrects schema errors that were previously present when initializing a new project inside of a Next app using the default blog template without Typescript.

What to review

In packages/@sanity/cli/src/actions/init-project/templates/nextjs/schemas/blog.ts, the following changes have been made:

  1. All schemas ending in JS have been changed from export default <name> to export const <name>
  2. blogSchemaJS has been changed to use named imports where they previously use default imports.
  3. Removes errant ) in postJS

Notes for release

Fixes syntax errors in schema files when initializing a blog template without Typescript in a Next.js app.

@plsrd plsrd requested a review from rexxars as a code owner September 26, 2023 21:23
@vercel
Copy link

vercel bot commented Sep 26, 2023

You must have Developer access to commit code to Sanity on Vercel. If you contact an administrator and receive Developer access, commit again to see your changes.

Learn more: https://vercel.com/docs/concepts/teams/roles-and-permissions#enterprise-team-account-roles

@github-actions
Copy link
Contributor

No changes to documentation

@github-actions
Copy link
Contributor

github-actions bot commented Sep 26, 2023

Component Testing Report Updated Sep 29, 2023 1:42 PM (UTC)

File Status Duration Passed Skipped Failed
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 11s 3 0 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 16s 9 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 55s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 7s 3 0 0

@rexxars rexxars changed the title Fix schema in no TS blog template in Next fix: syntax issues in next.js JS blog template Sep 27, 2023
@bjoerge bjoerge force-pushed the feat/fix-no-ts-nextjs-blog-template branch from c8ade2e to 2107e90 Compare September 29, 2023 13:33
@bjoerge bjoerge merged commit c672253 into next Sep 29, 2023
11 checks passed
@bjoerge bjoerge deleted the feat/fix-no-ts-nextjs-blog-template branch September 29, 2023 13:35
bjoerge pushed a commit that referenced this pull request Oct 2, 2023
* Fix schema in no TS blog template in Next

* remove errant ) in postJS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants