pngwn / MDsveX

A markdown preprocessor for Svelte.
https://mdsvex.pngwn.io
MIT License
2.27k stars 96 forks source link

allow svelte 5 in peerDependencies #599

Closed jasonstitt closed 1 month ago

jasonstitt commented 2 months ago

Adds Svelte 5. Currently, this may only be installed alongside Svelte 5 with --legacy-peer-deps or --force

See https://github.com/pngwn/MDsveX/issues/555

Users on that issue report being able to use the library with Svelte 5, except for the peer dependency issue. I also recently implemented a blog with "mdsvex": "^0.11.0" and "svelte": "^5.0.0-next.1".

It looks like testing happens with Svelte 4. If desired I could try to matrix the version.

changeset-bot[bot] commented 2 months ago

⚠️ No Changeset found

Latest commit: a322d2a89741cab13515dccfa88386a5ce08f65d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

travisdmathis commented 1 month ago

👏 ❤️

pngwn commented 1 month ago

Sorry for the delay! Released now https://github.com/pngwn/MDsveX/releases/tag/mdsvex%400.11.1

travisdmathis commented 1 month ago

still getting a dependency error?

While resolving: sveltelaunch@0.0.1
npm error Found: svelte@5.0.0-next.149
npm error node_modules/svelte
npm error   dev svelte@"^5.0.0-next.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer svelte@">=3 <6" from mdsvex@0.11.1
npm error node_modules/mdsvex
npm error   mdsvex@"*" from the root project

@pngwn

techniq commented 1 month ago

I'm fairly certain <6 does not match hyphenated version (ex. 5.0.0-next.149). Not much detail on npm's semantic versioning page, and their semver tool doesn't always show -next versions unless checked without ||. There is a note on this semver cheatsheet though:

Note that suffixed versions (1.2.3-rc1) are not matched.


For Svelte UX and LayerChart, I went with:

"svelte": "^3.56.0 || ^4.0.0 || ^5.0.0-next.120"

and LayerCake uses:

"svelte": "3 - 5 || >=5.0.0-next.120"
pngwn commented 1 month ago

Thanks you @techniq!