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 fs read instead of JSON import #105

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

Skn0tt
Copy link
Contributor

@Skn0tt Skn0tt commented Dec 18, 2023

Changes

Closes #104.

We were crashing when importing the adapter because importing JSON isn't supported on all versions of Node.js. This PR replaces it with readFile instead. We could've used import assertions instead, but then we'd also need to change some typescript settings which is risky.

Testing

tested locally.

Docs

no docs needed, it's a fix.

Copy link

changeset-bot bot commented Dec 18, 2023

🦋 Changeset detected

Latest commit: dee9936

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

This PR includes changesets to release 2 packages
Name Type
@astrojs/netlify Patch
@test/netlify-hosted-astro-project 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

@ematipico ematipico merged commit 755058d into withastro:main Dec 19, 2023
8 checks passed
@github-actions github-actions bot mentioned this pull request Dec 19, 2023
@alexanderniebuhr
Copy link
Member

@Skn0tt Thanks for the fix. I'm cutting a patch release now. Just a general information, we tend to keep the format of the changeset in the present tense (sometimes we don't catch that in reviews, and it is not a hard rule), but just so you know:

---
'@astrojs/netlify': patch
---

Fixes a regression introduced by v4, which caused a crash in some node versions

@Skn0tt
Copy link
Contributor Author

Skn0tt commented Dec 20, 2023

Thanks for letting me know, will try to remember it next time :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants