Skip to content

fix(addon): relax community addon requirements - #1224

Open
sacrosanctic wants to merge 3 commits into
sveltejs:mainfrom
sacrosanctic:relax-dependencies
Open

fix(addon): relax community addon requirements#1224
sacrosanctic wants to merge 3 commits into
sveltejs:mainfrom
sacrosanctic:relax-dependencies

Conversation

@sacrosanctic

@sacrosanctic sacrosanctic commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Closes #1210

Description

My initial take is to just relax the check for multi export repos. This doesn't really flag the problem if the addon dev decides to use those dependencies.

I considered static analysis, but it seems complicated to do.

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 5, 2026

Copy link
Copy Markdown

Install the latest version of sv from 93f2002:

pnpm add https://pkg.svelte.dev/sv/c/93f2002da43d3ca0e2469f34fb61ce1aa3d83cc6

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

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 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 93f2002

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

This PR includes changesets to release 1 package
Name Type
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

`Invalid add-on package detected: '${specifier}'\nCommunity add-ons should not have any 'dependencies'. Use 'peerDependencies' for 'sv' and bundle everything else`
dedent`
Invalid add-on package detected: '${specifier}'
Standalone add-ons must not have 'dependencies' in package.json. Everything should be bundled with your add-on.`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This check long predates the ./sv export condition. Now that add-ons can co-exist with other libraries in the same package, this check is very much out-of-date.

I think it would be best to just remove this check altogether. However, it would also be nice to add it elsewhere. Perhaps our add-on template can have a post-build check built into it to help guide add-on devs in the right direction?

@sacrosanctic sacrosanctic Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

a post-build check

like a warning? I was thinking we could have an sv validate cmd for this

@AdrianGonz97

Copy link
Copy Markdown
Member

@sacrosanctic opened #1225 as an alternate way of checking for unbundled deps. this is a different approach from #1224 (comment)

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