Skip to content

feat(cli): Community add-ons no longer require scoped package names - #1216

Open
sacrosanctic wants to merge 11 commits into
sveltejs:mainfrom
sacrosanctic:cute-peacock
Open

feat(cli): Community add-ons no longer require scoped package names#1216
sacrosanctic wants to merge 11 commits into
sveltejs:mainfrom
sacrosanctic:cute-peacock

Conversation

@sacrosanctic

@sacrosanctic sacrosanctic commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Closes #1101

Description

It currently accepts @<org>, <pkg>, and @<org>/<pkg>. Also went a little overboard with the name validation. We can pare it down.

Checklist

  • Update snapshots (if applicable)
  • Add a changeset (if applicable)
  • Allow maintainers to edit this PR
  • I care about what I'm doing, no matter the tool I use (Notepad, Sublime, VSCode, AI...)

@pkg-svelte-dev

pkg-svelte-dev Bot commented Aug 1, 2026

Copy link
Copy Markdown

Install the latest version of sv from d312d4b:

pnpm add https://pkg.svelte.dev/sv/c/d312d4b78cbdf04386e04f10573c04d21b866093

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/cli/pr/1216

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Aug 1, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d312d4b

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

@sacrosanctic
sacrosanctic marked this pull request as ready for review August 3, 2026 14:06
Comment on lines +65 to 69
{
projectName: 'my-addon',
template: 'addon',
args: []
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need a test for this? (Right now, CI is failing probably because snapshots are missing).

I think that having 1 test for addon is ok (if it's only the name update)

@@ -0,0 +1,32 @@
// https://npmx.dev/package/validate-npm-package-name#user-content-naming-rules
export const validateProjectName = (value: string | undefined): string | undefined => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This validation of package name is not really belonging to this PR (tests as well)

@jycouet

jycouet commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Here we would need to adjust docs & a changeset (patch) as it's a significative change.

@sacrosanctic sacrosanctic changed the title feat(cli): Organization no longer required feat(cli): Community add-ons no longer require scoped package names Aug 4, 2026
@sacrosanctic

Copy link
Copy Markdown
Contributor Author

Somebody with a bigger computer update the snapshots.

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.

npx sv create --template addon shouldn't require an organization

2 participants