Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: robustify interop of exports and props #11064

Merged
merged 5 commits into from
Apr 6, 2024
Merged

Conversation

dummdidumm
Copy link
Member

  • don't throw a dev time error when binding to an export (fixes false positive bind error  #11008)
  • remove bindings that are for component exports (this also includes when you pass a regular property; we could try to check if there's a setter to keep normal props with the same name as exports, but I doubt it matters in practise)
  • throw an error when using a component export with the same name as a property

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests and linting

  • Run the tests with pnpm test and lint the project with pnpm lint

- don't throw a dev time error when binding to an export (fixes #11008)
- remove bindings that are for component exports
- throw an error when using a component export with the same name as a property
Copy link

changeset-bot bot commented Apr 4, 2024

🦋 Changeset detected

Latest commit: a36973d

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

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

fix: robustify interop of exports and props
Copy link
Member

Choose a reason for hiding this comment

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

should this be considered a breaking change?

Suggested change
fix: robustify interop of exports and props
breaking: robustify interop of exports and props

Copy link
Member Author

Choose a reason for hiding this comment

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

Mhm true - in runes mode at least this is a breaking change, so I should also note that in the docs

Copy link
Member

@Rich-Harris Rich-Harris left a comment

Choose a reason for hiding this comment

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

LGTM aside from the question about the changeset

@trueadm
Copy link
Contributor

trueadm commented Apr 6, 2024

There appears to be some TS issues with the docs that is causing the CI to fail on the svelte-5-preview build.

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.

false positive bind error
3 participants