-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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: allow member access on directives #9462
fix: allow member access on directives #9462
Conversation
🦋 Changeset detectedLatest commit: 5cf47d1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@paoloricciuti is attempting to deploy a commit to the Svelte Team on Vercel. A member of the Team first needs to authorize it. |
I think I'd prefer it if we adjust the code inside |
That's were I started to look...should I move the same logic there? Also by moving it there you actually need to add it to every directive that can accept a member access |
Which ones do? All of them? |
Ok moving them there...not all of them in theory. Just updating the tests now and pushing again |
@dummdidumm i moved the tests to snapshots now is that the right place? Also in theory the snapshot for the server is not needed, there's a way to exclude that? |
In |
Uh defintely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This closes #9445
What i've done is update the parser so that it splits the directive on
.
and reconcatenate them with [''] so that basicallynested.access
becomesnested['access']
. It seems to work fine but i leave the decision to you to see if this is actually the best approach.Svelte 5 rewrite
Please note that the Svelte codebase is currently being rewritten for Svelte 5. Changes should target Svelte 5, which lives on the default branch (
main
).If your PR concerns Svelte 4 (including updates to svelte.dev.docs), please ensure the base branch is
svelte-4
and notmain
.Before submitting the PR, please make sure you do the following
feat:
,fix:
,chore:
, ordocs:
.Tests and linting
pnpm test
and lint the project withpnpm lint