Skip to content

Export defineCollection from astro/config#13814

Merged
ascorbic merged 4 commits into
live-loadersfrom
ll-define-export
May 19, 2025
Merged

Export defineCollection from astro/config#13814
ascorbic merged 4 commits into
live-loadersfrom
ll-define-export

Conversation

@ascorbic

Copy link
Copy Markdown
Contributor

Changes

Moves defineCollection into astro/config. There is a re-export from astro:content too, but it will throw if used for live collecitons. This is because importing from there will cause a circular dependency.

Testing

Adds a load of tests

Docs

I will update the RFC

@github-actions github-actions Bot added the pkg: astro Related to the core `astro` package (scope) label May 16, 2025
@changeset-bot

changeset-bot Bot commented May 16, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 9a5c550

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

return match?.[1] ?? undefined;
}

// This needs to be in sync with ImageMetadata

@ascorbic ascorbic May 16, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything below this line has been moved from runtime.ts and content.d.ts. The only changes are those needed to move types from a .d.ts to a .ts file

@ematipico ematipico left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@ascorbic
ascorbic merged commit 578ff42 into live-loaders May 19, 2025
@ascorbic
ascorbic deleted the ll-define-export branch May 19, 2025 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants