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(adapter-next): support @prismicio/next v2 #1556

Merged
merged 3 commits into from
Mar 7, 2025
Merged

Conversation

angeloashmore
Copy link
Member

@angeloashmore angeloashmore commented Mar 6, 2025

Resolves: N/A

Description

This PR updates @slicemachine/adapter-next to support @prismicio/next v2.

Files generated by the project:init hook and page snippets generated by the documentation:read hook needed to be updated.

This PR also includes the following small enhancements:

  • Generate all slice library index files on project:init. Generating those files ensures importing @/slices does not throw in a new project. This behavior matches @slicemachine/adapter-sveltekit's behavior.
  • Update the page snippet to act as a homepage when a model is non-repeatable and its ID is homepage.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

npx create-next-app@latest
cd my-app
npx @slicemachine/[email protected]

How to QA 1

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

Copy link

vercel bot commented Mar 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
slice-machine ✅ Ready (Inspect) Visit Preview Mar 6, 2025 1:54am

@angeloashmore angeloashmore marked this pull request as ready for review March 6, 2025 00:49
@angeloashmore angeloashmore requested a review from a team as a code owner March 6, 2025 00:49
@angeloashmore angeloashmore changed the title fix(adapter-next): update snippets to support @prismicio/next v2 fix(adapter-next): support @prismicio/next v2 Mar 6, 2025
Copy link
Contributor

@levimykel levimykel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I left one question.

@levimykel levimykel merged commit 66e8ab0 into main Mar 7, 2025
33 checks passed
@levimykel levimykel deleted the aa/prismicio-next-v2 branch March 7, 2025 10:14
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.

2 participants