Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jycouet
Copy link
Contributor

@jycouet jycouet commented Sep 1, 2025

Main topic

Links & notes along the way

Next step?

  • What about dependOn not only officials?

@changeset-bot
Copy link

changeset-bot bot commented Sep 1, 2025

🦋 Changeset detected

Latest commit: 2fbd7ea

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

This PR includes changesets to release 1 package
Name Type
sv Minor

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 1, 2025

Open in StackBlitz

npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@684
npx https://pkg.pr.new/sveltejs/cli/sv@684

commit: 2cf8f92

@svelte-docs-bot
Copy link

@kizivat

This comment was marked as resolved.

@jycouet

This comment was marked as resolved.

@kizivat

This comment was marked as resolved.

@jycouet

This comment was marked as resolved.

@kizivat

This comment was marked as resolved.

@jycouet

This comment was marked as resolved.

manuel3108

This comment was marked as resolved.

@jycouet jycouet force-pushed the feat/community-add-on-draft-0 branch from 0630be5 to 7cf5b27 Compare December 7, 2025 23:24
@jycouet

This comment was marked as outdated.

@jycouet jycouet marked this pull request as ready for review December 21, 2025 18:26
Copy link
Member

@manuel3108 manuel3108 left a comment

Choose a reason for hiding this comment

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

Rest will come at a later point.

title: sv
---

TODO... Yes, I know it's empty, but it's a work in progress!
Copy link
Member

Choose a reason for hiding this comment

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

Todo, so we don't forget.

Copy link
Member

@manuel3108 manuel3108 left a comment

Choose a reason for hiding this comment

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

This is so cool finally seeing progress in that direction!!! At this point this is only a code review, I havn't tested or played around with anything yet.

Random thought: Addon's for migrations? Obviously not something we should implement here, but we should check that we don't block any imports. But using sv/core and sv/testing seems totally future-proof, so we should be good to go.

Automated testing for community addons? How can we check that we don't break anything for community addons? We should be pretty fine as they are using more or less exactly the same api as the official addons, but maybe you have a crazy idea that could help with that. (I saw the snapshot test, I think im currently more concerned about type missmatches and stuff, although this is a great starging point)

'sv': minor
---

feat: community addons are now in preview
Copy link
Member

Choose a reason for hiding this comment

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

Are we already at the point where we want to publicize this? I was wondering if we should hide it away for a few releases, so that we can sneak in a few api changes before making that public. Not sure what those are exactly, but i'm sure we will find something.

Apart from that we should consider hiding the create template for community addons. Although I wouldn't consider this that important.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking "preview" with "minor" to really state that stuff can still change (Maybe we can update the message?).
All this having in mind that a lot of stuff are already taken care of in this PR.

But we can also do a silent merge (later), and continue tweaking before saying it's preview.
In that case, I would hide the community add-on in prompt not in args, like this we can still play :)

- run: pnpm exec playwright install chromium
- run: pnpm build
- run: pnpm test
preview-release:
Copy link
Member

Choose a reason for hiding this comment

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

I think we should revert this here. I found it always helpful that the preview release get's published before all of the testing is completed after roughly 5 minutes. Also has nothing to do with community addons.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

+1 it's not directly linked with community addons 🫣

It's not after all tests, Just after build & lint (1min)
Because I had a few update of pkg while it was not even building... so everything was broken in pkg

Maybe was just unfortunate?!

revert? no revert? Let me know

- [`tailwindcss`](tailwind)
- [`vitest`](vitest)

## Community add-ons
Copy link
Member

Choose a reason for hiding this comment

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

We should consider extracting this into a separate page, as most of this is relevant for sv add as well.

Also, the docs about the file: protocol should be in the creating addons developer section, not in the user section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how to organise all this! :o But yeah, we can move things 👍

I'm using file: protocol as a scaffolding tool. It's not "all users", but I'm sure some people could find this cool and have some usecases. No?

title: add-on
---

Typically, an `add-on` looks like this:
Copy link
Member

Choose a reason for hiding this comment

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

You showed a recording that displayed a lot more info than this is currently doing. I guess you still have some additional progress locally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The rest is more in svelte.dev repo.
One thing is sveltejs/svelte.dev#1720 as a minimal step.
Other thing are locally in my svelte.dev repo... We need to speak ;)

Let's keep it open

// from internals
export { defineAddon, defineAddonOptions } from './core/addon/config.ts';
export { color } from './cli/add/utils.ts';
// TODO JYC: move to utils all these bellow?
Copy link
Member

Choose a reason for hiding this comment

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

Todo!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To speak! :D

Comment on lines +28 to +32
export const svelte = {
ensureScript: ensureScript as typeof ensureScript,
addSlot: addSlot as typeof addSlot,
addFragment: addFragment as typeof addFragment
};
Copy link
Member

Choose a reason for hiding this comment

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

Why is this not the same as for the other langs? I thought they were setup identically

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was a test, yes!
Doing this enable to have JSDoc comments that can be used in doc! and in code when user will import svelte 👍

So in core.ts we should never export *. I did only a few JSDoc test and wanted to speak with you do to more ^^

* const { ast, generateCode } = parse.toml('name = "John"');
* const { ast, generateCode } = parse.yaml('name: John');
* ```
* @jsdocfocus
Copy link
Member

Choose a reason for hiding this comment

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

Not sure what this is? I couldn't find any information on this online.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good that you spoted this!

It's also a tentative that I did for doc. When type doesn't really help, I wanted to have a special tag to tell svelte.dev to not display the type, but just the JSDoc.
I didn't manage... But now that I did more on svelte.dev I think I would do it.

Now... Is it useful?! I don't really know :D

jycouet and others added 5 commits December 29, 2025 18:09
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.

5 participants