-
-
Notifications
You must be signed in to change notification settings - Fork 3k
feat: add deprecation warning for v4 content collections in v5 #14928
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
base: main
Are you sure you want to change the base?
Conversation
Emit console warning when collections are defined without a loader, signaling that they're using deprecated v4 backwards compatibility mode. This helps users discover and migrate their legacy collections before upgrading to v6, where the escape hatch will require explicit opt-in with legacy.collectionsBackwardsCompat flag. Warning only shows in dev mode (NODE_ENV !== 'production') to avoid spam in production builds.
|
Emit console warning when collections are defined without a loader, signaling that they're using deprecated v4 backwards compatibility mode. This helps users discover and migrate their legacy collections before upgrading to v6, where the escape hatch will require explicit opt-in with legacy.collectionsBackwardsCompat flag. Warning only shows in dev mode (NODE_ENV !== 'production') to avoid spam in production builds.
Add actual enforcement of the contentCollectionsStrict experimental flag. When enabled, throws an error if any collections use the deprecated v4 API (type: 'content' or type: 'data') without a loader. This allows users to test their migration in v5 by enabling strict mode and getting immediate feedback on what needs to be fixed.
CodSpeed Performance ReportMerging #14928 will not alter performanceComparing Summary
|
|
Just to get the ball rolling, I guess the idea would be in a first step to throw an error when any of the possible reasons why automatic backwards compatibility might be enabled are detected. Not sure yet which error/format would be best suited for this but I assume that's something we can figure out on the way. Regarding the possible reasons, from my understanding, automatic backwards compatibility might be enabled based on the list of reasons we have gathered in the v6 upgrade guide so far:
|
Changes
Emit console warning when collections are defined without a loader, signaling that they're using deprecated v4 backwards compatibility mode.
This helps users discover and migrate their legacy collections before upgrading to v6, where the escape hatch will require explicit opt-in with legacy.collectionsBackwardsCompat flag.
Testing
No changes
Docs
Not yet