EMH333 / esbuild-svelte

An esbuild plugin to compile Svelte components
https://www.npmjs.com/package/esbuild-svelte
MIT License
228 stars 21 forks source link

Release plugin version 1.0.0 #204

Open EMH333 opened 10 months ago

EMH333 commented 10 months ago

I am planning to release v1.0.0 of this plugin once Svelte 5 is released. esbuild development seems to have mostly stabilized so I'm feeling okay moving forward without esbuild reaching v1.

Some changes that will likely happen:

gka commented 4 months ago

Would be useful if there was a pre-release of v1.0.0 at some point before Svelte 5 gets released.

EMH333 commented 4 months ago

Agreed, I intend to start a svelte-v5 branch in the near future. I also haven't been closely following Svelte 5 development, is there a timeline to release yet?

gka commented 4 months ago

Nothing official yet, other than "early 2024", which at this point probably means Q2. The closest to a timeline is probably this myserious tweet, though 😆

xelius commented 2 months ago

Svelte 5 reached RC now 🎉 and I would be really happy to see this great package support it.

FWIW Rich offering a few pointers on migrating libs in the Svelte5 RC release announcement

tgf9 commented 1 month ago

Svelte 5 is now in the Release Candidate phase. This means that the design of the framework is largely settled, with no anticipated breaking changes between now and the stable release, and that the most egregious bugs have been stomped. https://svelte.dev/blog/svelte-5-release-candidate

I'm starting a new Svelte project and I was hoping I would be able to start using Svelte 5... Hope esbuild-svelte adds support soon. :pray:

EMH333 commented 1 month ago

I've scoped out the changes for Svelte 5 and they seem fairly reasonable for simple support alongside Svelte 3 and 4. I'll look to get a non-breaking release supporting Svelte 5 out in the next few days

iskrisis commented 1 month ago

I've unsucessfuly tried to use version that's in the svelte-5 branch. Could you maybe give us some pointers how you test it or make pre-release? I am currently writing small Svelte 5 app using vite but always prefered your plugin. Seems like there would be few other testers. 🙏 🙏

EMH333 commented 1 month ago

@iskrisis Please try the svelte-5-compat branch used by #230 which is more geared towards graceful compatibility between Svelte 3, 4 and 5 instead of removing support for the lower version (I haven't touched the svelte-5 branch in a while). Building the dist/ folder with npm run build should be all that is required to output a working plugin for any Svelte version >= 3. I'll note that in compatibility testing, the svelte-5-compat branch is able to successfully compile files with Svelte 5.

If I can get a few :rocket: reactions or comments on that PR with folks who have been able to test it successfully, I'll go ahead and release it as 0.8.1. Otherwise, to avoid the risk breaking preexisting projects, I'll probably aim for a 0.9.0 release with more sweeping changes before 1.0.0 to coincide with Svelte 5.

Let's please move conversation about Svelte 5 compatibility to #234 (and with the prereleases to #235) since that will make it easier to track specific breakage/issues

(Also, can I say how awesome it is to see so much community involvement here?! As a single maintainer who started this project selfishly because I liked esbuild and Svelte, it is amazing to see the support that this plugin has. Y'all are great :heart: )

EMH333 commented 1 month ago

Version v0.8.1 has been released which relaxes the Svelte peer dependency version lock to include Svelte 5. Please give it a try!

tgf9 commented 1 month ago

I'm not sure if I'm doing something wrong, but I'm seeing this when I run npm install.

$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: project@undefined
npm ERR! Found: svelte@5.0.0-next.136
npm ERR! node_modules/svelte
npm ERR!   dev svelte@"^5.0.0-next.136" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer svelte@">=3.43.0 <6" from esbuild-svelte@0.8.1
npm ERR! node_modules/esbuild-svelte
npm ERR!   dev esbuild-svelte@"^0.8.1" from the root project

My package.json looks like this.

{
  "name": "project",
  "devDependencies": {
    "esbuild": "^0.21.0",
    "esbuild-svelte": "^0.8.1",
    "svelte": "^5.0.0-next.136"
  }
}

I updated to the latest esbuild-svelte and installed svelte@next.

EMH333 commented 1 month ago

I've opened #234 to track overall Svelte 5 compatibility and #235 to track compatibility with the prereleases. There are going to be several conversations happening at once and I want to keep it easy to follow what issues relate to which versions

@tgf9 I'm moving the resolution of your report (and the corresponding rabbit hole) to #235