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: use correct datastore location in test environment #12640

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Dec 5, 2024

Changes

The content layer needs to know if it is running in dev, so that it knows whether to find the datastore in the .astro folder (so it can be watched for changes) or in node_modules (so it is cached between builds in production environments). Previously it was incorrectly detecting this in the Vite plugin by using the isProduction flag, which reports as false in a test enviornment. This PR changes it to instead use the env.command.

Fixes #12612

Testing

Docs

Copy link

changeset-bot bot commented Dec 5, 2024

🦋 Changeset detected

Latest commit: d5e8a27

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 the pkg: astro Related to the core `astro` package (scope) label Dec 5, 2024
Copy link

codspeed-hq bot commented Dec 5, 2024

CodSpeed Performance Report

Merging #12640 will degrade performances by 20.49%

Comparing datastore-dev (d5e8a27) with main (6b6e18d)

Summary

❌ 1 regressions
✅ 5 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main datastore-dev Change
Rendering: streaming [false], .mdx file 854.1 ms 1,074.2 ms -20.49%

@ascorbic ascorbic merged commit 22e405a into main Dec 5, 2024
15 of 16 checks passed
@ascorbic ascorbic deleted the datastore-dev branch December 5, 2024 11:25
@astrobot-houston astrobot-houston mentioned this pull request Dec 5, 2024
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.

Content collections can't retrieve entries since Astro 5.0 during testing
2 participants