-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor schema to withSchema (#223)
- Loading branch information
1 parent
c4d274c
commit 87ce75d
Showing
4 changed files
with
130 additions
and
67 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
'renoun': minor | ||
--- | ||
|
||
Moves the `Directory` `schema` option to `<Directory>.withSchema`. This aligns with the recent refactor of the `getImport` option to `<Directory>.withModule`. | ||
|
||
### Breaking Changes | ||
|
||
Update the `schema` option to `withSchema`: | ||
|
||
```diff | ||
export const posts = new Directory<{ mdx: PostType }>({ | ||
path: 'posts', | ||
-- schema: { mdx: { frontmatter: frontmatterSchema.parse } }, | ||
}) | ||
++ .withSchema('mdx', { frontmatter: frontmatterSchema.parse }) | ||
``` |
This file contains 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
This file contains 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
This file contains 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