feat: remove feature flag from Type Builder enablement check#192
Open
angeloashmore wants to merge 1 commit into
Open
feat: remove feature flag from Type Builder enablement check#192angeloashmore wants to merge 1 commit into
angeloashmore wants to merge 1 commit into
Conversation
The Type Builder enablement check no longer depends on the dev-tools-types-builder-cloud Amplitude flag. It now relies solely on the repository's Slice Machine quota, keeping the existing PRISMIC_TYPE_BUILDER_ENABLED env override. Removes the now-unused getVariantData/getProfile calls and their imports. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Resolves: https://app.notion.com/p/prismic/Good-bye-Slice-Machine-3343bee0866980a2b112c9e05c606145?source=copy_link
Description
Allow migration from Slice Machine to Type Builder/CLI via
prismic init. This was allowed before, but only to repositories that had the feature flag enabled. Now, all repos can perform the migration.Checklist
Preview
How to QA 1
Run
prismic initin a Slice Machine project whose repository has the Slice Machine quota enabled but is not in thedev-tools-types-builder-cloudflag rollout. It should now proceed with the migration instead of failing with the "requires the Type Builder" error.🤖 Generated with Claude Code
Note
Low Risk
Narrows the gate to repository quota only and removes two API calls; behavior for non-quota repos is unchanged and there is no auth or data-model change.
Overview
Type Builder enablement no longer depends on the Amplitude
dev-tools-types-builder-cloudflag or a user profile lookup.checkIsTypeBuilderEnablednow only honorsPRISMIC_TYPE_BUILDER_ENABLEDwhen set, otherwise it fetches the repository and returns whetherquotas.sliceMachineEnabledis true.For
prismic initwith--repo(or a legacy Slice Machine config), repos with the Slice Machine quota can migrate to Type Builder/CLI even when they were outside the old flag rollout; repos without that quota still hitTypeBuilderRequiredError.Reviewed by Cursor Bugbot for commit be2582a. Bugbot is set up for automated code reviews on this repo. Configure here.
Footnotes
Please use these labels when submitting a review:
⚠️ #issue: Strongly suggest a change.
❓ #ask: Ask a question.
💡 #idea: Suggest an idea.
🎉 #nice: Share a compliment. ↩