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

Make build/preview/sync API accept AstroInlineConfig #7811

Merged
merged 6 commits into from
Jul 27, 2023
Merged

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Jul 26, 2023

Changes

Note: This PR merges into the js-api branch

  • Make build/preview/sync API accept AstroInlineConfig.
  • Mostly moving code around without logic change.

The JS API is almost done! This finishes the APIs above besides check and add as those will be refactored in 3.0. Two more things to clean up in later PRs:

  1. Initial config loading error handling can be improved.
  2. logging can be tucked into settings so the user don't have to pass that in.

Testing

Existing tests should pass. Also tested locally for the commands to all work.

Docs

n/a. internal refactor.

@bluwy bluwy requested a review from a team as a code owner July 26, 2023 10:00
@changeset-bot
Copy link

changeset-bot bot commented Jul 26, 2023

⚠️ No Changeset found

Latest commit: 18ec698

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Jul 26, 2023
export async function syncCli(
settings: AstroSettings,
{ logging, fs, flags }: { logging: LogOptions; fs: typeof fsMod; flags?: Arguments }
export async function sync(
Copy link
Member

Choose a reason for hiding this comment

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

Will this be the official API? Just trying to understand where we are going

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I think it would be nice to make this public. I also noticed the PR description had a typo. It's besides check and add that I had not refactored, not sync and add 😅 Will update that.

Copy link
Member

Choose a reason for hiding this comment

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

Perfect, thank you. I am excited to see the final result!

@bluwy bluwy merged commit 4473b88 into js-api Jul 27, 2023
@bluwy bluwy deleted the js-api-rest branch July 27, 2023 14:26
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