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

fix: reload content on collections change #966

Merged
merged 5 commits into from
Oct 16, 2024
Merged

Conversation

Princesseuh
Copy link
Member

@Princesseuh Princesseuh commented Oct 7, 2024

Changes

This reworks a bit how we handle reloading schemas and add support for reloading the entire collections config. This PR focuses on fixing the language server handling of it, the TypeScript plugin part isn't as problematic, the only thing it doesn't handle is new collections being added, file updates works correctly (since they only care about the .ts part, not the schema)

Testing

I added a (1) test, this is generally hard to test because there's so many moving parts to it, the editor seeing the file changes, Astro reloading the file etc.

The one test should at least make sure the general idea for updating schemas works

Docs

N/A

Copy link

changeset-bot bot commented Oct 7, 2024

🦋 Changeset detected

Latest commit: 534da57

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

This PR includes changesets to release 3 packages
Name Type
@astrojs/language-server Patch
@astrojs/ts-plugin Patch
astro-vscode Patch

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

@Princesseuh Princesseuh marked this pull request as ready for review October 15, 2024 23:13
@Princesseuh Princesseuh merged commit 8673fa5 into main Oct 16, 2024
4 checks passed
@Princesseuh Princesseuh deleted the fix/watch-content branch October 16, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants