Repository navigation
fix: allow_all_components for CMS and faststore v3 - #3313
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
@faststore/api
@faststore/cli
@faststore/components
@faststore/core
@faststore/graphql-utils
@faststore/lighthouse
@faststore/sdk
@faststore/ui
commit: |
What's the purpose of this pull request?
ℹ️ The same was done for vtex.faststore@4 via #3312
Fix a bug where CMS content-types (Home, PDP, PLP, Search, Landing Page, Global Sections) had their sections field hardcoded to an explicit list of allowed components instead of using
$ALLOW_ALL_COMPONENTS.This prevented custom components from appearing in the CMS editor. Any store that created new sections would need to manually rewrite FastStore's schema, breaking the onboarding experience entirely.
Reported by Otavio and Caixeta. A patch was already shipped in v4.0.1 as a hotfix.
How it works?
FastStore's base.jsonc defines a
$ALLOW_ALL_COMPONENTSsentinel in $defs. This sentinel is replaced at build time (before sending to Schema Registry) with the full dynamic list of all registered components, including user-defined ones.Previously, the .jsonc files generated for each content type had the sections array expanded inline with a hardcoded anyOf list of known built-in components. This list was stale and excluded any custom component.
This PR removes the hardcoded anyOf blocks and replaces them with a reference to
$ALLOW_ALL_COMPONENTS, consistent with how 404, 500, and login content types already work. Also removes the now-obsoleteschema.jsonthat duplicated this data.How to test it?
Add a new custom component using the faststore@3 base. This new fixed version is already deployed in v3.99.1.
Checklist
You may erase this after checking them all 😉
PR Title and Commit Messages
feat,fix,chore,docs,style,refactor,ciandtestPR Description
breaking change,bug,contributing,performance,documentation..Dependencies
pnpm-lock.yamlfile when there were changes to the packagesDocumentation
@Mariana-Caetanoto review and update (Or submit a doc request)