Conversation
BREAKING CHANGE: With v6 astro changed the way custom content loaders provide their schemas. Please check the official documentation for breaking changes.
BREAKING CHANGE: `improveTypes` is now always enabled, so the configuration option was removed entirely.
BREAKING CHANGE: astro does not automatically generate typescript types anymore, instead content loaders need to implement this logic themselves.
BREAKING CHANGE: The `experimentalPocketbaseLiveLoader` as been renamed to `pocketbaseLiveLoader`, incl. all it's option and filter types. The `liveTypesOnly` option for the base loader is still experimental though.
There was a problem hiding this comment.
Pull request overview
This pull request upgrades the package to support Astro v6, implementing breaking API changes required by the new version. The changes align with Astro v6's stable content loader API and remove experimental features.
- Updated Astro dependency from v5 to v6.0.0-alpha.1
- Replaced deprecated
ZodSchematype withZodTypethroughout the codebase - Removed
improveTypesoption (behavior now always enabled) - Stabilized live loader API by removing "experimental" prefix from types and exports
- Migrated from
schemamethod to newcreateSchemamethod that returns both schema and type definitions
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated Astro to v6.0.0-alpha.1, added zod-to-ts as dependency and peer dependency, removed npx prefix from scripts |
| package-lock.json | Updated dependency lock file for Astro v6 and related packages |
| src/pocketbase-loader.ts | Replaced schema method with createSchema that returns schema and types, removed experimental prefix from live loader function |
| src/index.ts | Updated exports to remove experimental prefixes |
| src/types/pocketbase-loader-options.type.ts | Removed improveTypes option, stabilized live loader types by removing experimental prefix |
| src/types/pocketbase-live-loader-filter.type.ts | Removed experimental prefixes and JSDoc tags |
| src/types/pocketbase-entry.type.ts | Simplified to use z.looseObject directly, removed intermediate base entry schema |
| src/schema/generate-schema.ts | Updated to use ZodType instead of ZodSchema, changed BASIC_SCHEMA to object, removed improveTypes parameter |
| src/schema/parse-schema.ts | Removed improveTypes option, made number and bool fields always required |
| src/schema/generate-type.ts | New file implementing type generation using zod-to-ts library |
| src/loader/*.ts | Updated type references to remove experimental prefixes |
| test/schema/*.ts | Updated all tests to remove improveTypes parameter, added type annotations, added new snapshot test for type generation |
| test/_mocks/create-live-loader-options.ts | Updated type references to remove experimental prefix |
| README.md | Updated documentation to reflect API changes, removed improveTypes section, removed experimental warnings for live loader |
| // oxlint-disable-next-line explicit-module-boundary-types | ||
| export function pocketbaseLoader(options: PocketBaseLoaderOptions) { |
There was a problem hiding this comment.
Return type was removed on purpose according to migration guide. Astro will now infer the type of the content collection according to createSchema. This also has effects downstream for createSchema and generateSchema
package.json
Outdated
| "@types/node": "24.10.1", | ||
| "@vitest/coverage-v8": "4.0.15", | ||
| "astro": "5.16.5", | ||
| "astro": "6.0.0-alpha.1", |
There was a problem hiding this comment.
Will be upgraded to 6.0.0 before the release
pawcoding
left a comment
There was a problem hiding this comment.
Self review looks good ✔️
📝 Changelog Preview3.0.0 (2026-01-17)⚠ BREAKING CHANGES
🚀 Features
📖 Documentation
🛠️ Code Refactoring
🏗 Dependency updates |
# [3.0.0-astro-v6.1](v2.10.1...v3.0.0-astro-v6.1) (2025-12-16) ### Build System * **deps:** upgrade to astro@v6 ([0dd4456](0dd4456)) ### Code Refactoring * **schema:** remove `improveTypes` option ([0cd6445](0cd6445)) * **schema:** update schema generation for astro@v6 ([f63c945](f63c945)) ### Features * **live-loader:** stabilize live content loader ([8e55b4c](8e55b4c)) ### BREAKING CHANGES * **live-loader:** The `experimentalPocketbaseLiveLoader` as been renamed to `pocketbaseLiveLoader`, incl. all it's option and filter types. The `liveTypesOnly` option for the base loader is still experimental though. * **schema:** astro does not automatically generate typescript types anymore, instead content loaders need to implement this logic themselves. * **schema:** `improveTypes` is now always enabled, so the configuration option was removed entirely. * **deps:** With v6 astro changed the way custom content loaders provide their schemas. Please check the official documentation for breaking changes.
## [3.0.0-astro-v6.2](v3.0.0-astro-v6.1...v3.0.0-astro-v6.2) (2026-01-17) ### 🏗 Dependency updates * **deps:** update dependencies ([f33c819](f33c819))
Changes
Summary:
improveTypesoptions (always enabled)ZodSchemawithZodTypeIssues
Related issues:
Dependencies
Depends on:
Testing
Test coverage:
Code Quality
Code review checklist:
Breaking Changes
Are there any breaking changes?
Migration notes:
improveTypesoptionexperimentalprefix from everything related to the live loaderSee changelog for more information