Skip to content

fix: use correct datastore location in test environment#12640

Merged
ascorbic merged 1 commit into
mainfrom
datastore-dev
Dec 5, 2024
Merged

fix: use correct datastore location in test environment#12640
ascorbic merged 1 commit into
mainfrom
datastore-dev

Conversation

@ascorbic
Copy link
Copy Markdown
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

@changeset-bot
Copy link
Copy Markdown

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
@codspeed-hq
Copy link
Copy Markdown

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%

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