Skip to content

Avoid having to deal with JSON imports#274

Merged
lukasIO merged 4 commits intomainfrom
lukas/fix-import-assertion
Jan 26, 2023
Merged

Avoid having to deal with JSON imports#274
lukasIO merged 4 commits intomainfrom
lukas/fix-import-assertion

Conversation

@lukasIO
Copy link
Copy Markdown
Contributor

@lukasIO lukasIO commented Jan 26, 2023

The lack of the assertion was causing crashes on nodeJS versions > 17.5 due to import assertions being mandatory https://nodejs.org/api/esm.html#import-assertions

First attempt to fix was to just add the assert {type: 'json'}. In order to maximise support across nodejs environments for the packages I then just replaced the dependency with a different one that's not using JSON as an export format.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 26, 2023

🦋 Changeset detected

Latest commit: 5bdea59

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

This PR includes changesets to release 2 packages
Name Type
@livekit/components-core Patch
@livekit/components-react 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

@lukasIO lukasIO requested a review from Ocupe January 26, 2023 15:18
Copy link
Copy Markdown
Contributor

@Ocupe Ocupe left a comment

Choose a reason for hiding this comment

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

👍🏼

@lukasIO lukasIO merged commit cb9e2b6 into main Jan 26, 2023
@lukasIO lukasIO deleted the lukas/fix-import-assertion branch January 26, 2023 15:31
@github-actions github-actions bot mentioned this pull request Jan 26, 2023
@lukasIO lukasIO changed the title Add import assertion for json import Avoid having to deal with JSON imports Jan 26, 2023
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