Skip to content
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

[Content] Add astro sync type gen command #5647

Merged
merged 5 commits into from Dec 27, 2022
Merged

[Content] Add astro sync type gen command #5647

merged 5 commits into from Dec 27, 2022

Conversation

bholmesdev
Copy link
Contributor

@bholmesdev bholmesdev commented Dec 19, 2022

Changes

Add astro sync command for generating types. Includes content collections today, but could include other type gen processes in the future. Inspired by SvelteKit sync.

Testing

  • Test that types file is written on sync with astro:content module declaration

Docs

withastro/docs#2244 (review)

@changeset-bot
Copy link

changeset-bot bot commented Dec 19, 2022

🦋 Changeset detected

Latest commit: ff4bdf3

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) semver: minor Change triggers a `minor` release labels Dec 19, 2022
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@bholmesdev bholmesdev changed the title Add astro sync type gen command [Content] Add astro sync type gen command Dec 19, 2022
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

Nice addition!

Copy link
Member

@delucis delucis left a comment

Choose a reason for hiding this comment

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

Looks amasync to me! One question about errors.

packages/astro/src/cli/sync/index.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@sarah11918
Copy link
Member

Approving the content of the error message! (Just checking, we don't yet have any astro sync API docs themselves, though, right? Still TODO? That's why I'm not smashing the big Approve button.)

@bholmesdev bholmesdev merged commit d72da52 into main Dec 27, 2022
@bholmesdev bholmesdev deleted the feat/astro-sync branch December 27, 2022 16:04
@astrobot-houston astrobot-houston mentioned this pull request Dec 27, 2022
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) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants