Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
082fc52
feat: loader.getSchemaContext()
florian-lefebvre Nov 12, 2025
fc7a785
wip
florian-lefebvre Nov 12, 2025
865e64b
wip
florian-lefebvre Nov 12, 2025
144c791
wip
florian-lefebvre Nov 12, 2025
0ecc8d5
fix
florian-lefebvre Nov 13, 2025
85fb14a
chore: format
florian-lefebvre Nov 13, 2025
91a4d99
feat: error
florian-lefebvre Nov 13, 2025
a0e3f43
Discard changes to examples/blog/src/content.config.ts
florian-lefebvre Nov 13, 2025
652b78e
feat: backward compat
florian-lefebvre Nov 13, 2025
9a2f0ab
Merge branch 'next' into feat/content-loader-get-schema-context
florian-lefebvre Nov 13, 2025
6e26dcd
chore: remove unused dep
florian-lefebvre Nov 13, 2025
f998122
Merge branch 'feat/content-loader-get-schema-context' of https://gith…
florian-lefebvre Nov 13, 2025
67cb44f
fix: tests
florian-lefebvre Nov 13, 2025
b198c4c
test
florian-lefebvre Nov 13, 2025
6f3daaf
chore: todo
florian-lefebvre Nov 13, 2025
77b47e0
chore: changesets
florian-lefebvre Nov 13, 2025
b375c59
Discard changes to packages/astro/src/content/loaders/glob.ts
florian-lefebvre Nov 19, 2025
c7fd7a6
Discard changes to packages/astro/src/content/loaders/file.ts
florian-lefebvre Nov 19, 2025
09c6543
Apply suggestion from @ascorbic
florian-lefebvre Nov 19, 2025
9b53484
Merge branch 'next' into feat/content-loader-get-schema-context
florian-lefebvre Nov 19, 2025
a5a64cc
feedback
florian-lefebvre Nov 19, 2025
5bb7411
Apply suggestion from @florian-lefebvre
florian-lefebvre Nov 21, 2025
be1be6d
Merge branch 'next' into feat/content-loader-get-schema-context
florian-lefebvre Nov 21, 2025
8810bd3
fix
florian-lefebvre Nov 21, 2025
bde8ece
Merge branch 'next' into feat/content-loader-get-schema-context
florian-lefebvre Nov 27, 2025
c409b14
fix: test
florian-lefebvre Dec 3, 2025
d2c3fd8
feedback
florian-lefebvre Dec 3, 2025
d9b14c4
Apply suggestion from @florian-lefebvre
florian-lefebvre Dec 3, 2025
9057916
feat: rename getSchemaContext to createSchema
florian-lefebvre Dec 3, 2025
ad72298
Apply suggestions from code review
florian-lefebvre Dec 3, 2025
1e906b2
Update packages/astro/src/content/utils.ts
florian-lefebvre Dec 3, 2025
591eeb8
Update .changeset/fresh-rocks-sing.md
florian-lefebvre Dec 3, 2025
0c1b558
Apply suggestion from @florian-lefebvre
florian-lefebvre Dec 3, 2025
551dea9
Apply suggestion from @florian-lefebvre
florian-lefebvre Dec 3, 2025
e9f9ba7
Merge branch 'next' into feat/content-loader-get-schema-context
florian-lefebvre Dec 4, 2025
c0be1db
Merge branch 'next' into feat/content-loader-get-schema-context
florian-lefebvre Dec 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Discard changes to packages/astro/src/content/loaders/glob.ts
  • Loading branch information
florian-lefebvre authored Nov 19, 2025
commit b375c59107f644800a7e9516a1974e6af0908252
8 changes: 4 additions & 4 deletions packages/astro/src/content/loaders/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { glob as tinyglobby } from 'tinyglobby';
import type { ContentEntryRenderFunction, ContentEntryType } from '../../types/public/content.js';
import type { RenderedContent } from '../data-store.js';
import { getContentEntryIdAndSlug, posixRelative } from '../utils.js';
import { defineContentLoader } from './config.js';
import type { Loader } from './types.js';

interface GenerateIdOptions {
/** The path to the entry file, relative to the base directory. */
Expand Down Expand Up @@ -57,7 +57,7 @@ function checkPrefix(pattern: string | Array<string>, prefix: string) {
* @param pattern A glob pattern to match files, relative to the content directory.
*/

export function glob(globOptions: GlobOptions) {
export function glob(globOptions: GlobOptions): Loader {
if (checkPrefix(globOptions.pattern, '../')) {
throw new Error(
'Glob patterns cannot start with `../`. Set the `base` option to a parent directory instead.',
Expand All @@ -73,7 +73,7 @@ export function glob(globOptions: GlobOptions) {

const fileToIdMap = new Map<string, string>();

return defineContentLoader({
return {
name: 'glob-loader',
load: async ({ config, logger, watcher, parseData, store, generateDigest, entryTypes }) => {
const renderFunctionByContentType = new WeakMap<
Expand Down Expand Up @@ -315,5 +315,5 @@ export function glob(globOptions: GlobOptions) {
}
});
},
});
};
}
Loading