Skip to content

feat(sv-utils): color.command now also accepts string[]#1024

Merged
jycouet merged 8 commits intosveltejs:mainfrom
sacrosanctic:desperate-flyingfish
Apr 2, 2026
Merged

feat(sv-utils): color.command now also accepts string[]#1024
jycouet merged 8 commits intosveltejs:mainfrom
sacrosanctic:desperate-flyingfish

Conversation

@sacrosanctic
Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: ab8afc2

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

This PR includes changesets to release 2 packages
Name Type
@sveltejs/sv-utils Patch
sv 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

@svelte-docs-bot
Copy link
Copy Markdown

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 1, 2026

Open in StackBlitz

npx https://pkg.pr.new/svelte-migrate@1024
npx https://pkg.pr.new/sv@1024
npx https://pkg.pr.new/@sveltejs/sv-utils@1024

commit: ab8afc2

@jycouet
Copy link
Copy Markdown
Contributor

jycouet commented Apr 1, 2026

@sacrosanctic what do you think about this? 👀
experiment!

@sacrosanctic
Copy link
Copy Markdown
Contributor Author

looks good, wish the fn name wasnt so long

@jycouet
Copy link
Copy Markdown
Contributor

jycouet commented Apr 2, 2026

looks good, wish the fn name wasnt so long

Same here !
What about formatCommand ? (and a small JSDoc)?

I'm not sure about your last 2 commits? 👀
Is it ok with intellisense? (I didn't check yet)

@sacrosanctic
Copy link
Copy Markdown
Contributor Author

What about formatCommand ? (and a small JSDoc)?

I feel like we have to keep it as resolveCommandArray. To discourage similar types of interface changing behaviour.

I'm not sure about your last 2 commits? 👀

They're non functional changes, feel free to reverse it, I like that the logic and data is now cleanly separated.

Is it ok with intellisense? (I didn't check yet)

Yes? What the problem?

@jycouet
Copy link
Copy Markdown
Contributor

jycouet commented Apr 2, 2026

With Record<string, ..., I could do color.hello("") and types will be happy.
I tried with as const or with satisfies, but none are working as we want.

Let's just go back to a simpler solution (adding a few characters)

@jycouet jycouet merged commit dd9c2f8 into sveltejs:main Apr 2, 2026
8 checks passed
@github-actions github-actions bot mentioned this pull request Apr 2, 2026
@sacrosanctic sacrosanctic deleted the desperate-flyingfish branch April 2, 2026 16:38
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