Last 12 weeks · 138 commits
6 of 6 standards met
Describe the bug I am referring to my previous issue #18491, which was closed by #18518. The problem is still there in the latest version (5.57.0). I tried to follow the explanation of the PR and played with adding and in various forms and I couldn't get it working. I tried to inspect the variables in inside the function and checking conditions, reversing orders, etc. but I couldn't find the root cause. Reproduction Since the reproduction can't work in the REPL, and since it is fairly small, I'll provide the files here. Start from the svelte template in , install , and edit only these two files: Then run it, go to devtools, and look at the location of the console.error message, it will be at the beginning of the script block, not at the actual location. Logs System Info Severity annoyance
This forces the user to use the custom renderer generated components using the custom condition OR the custom condition. The issue that this solves is that dual modules (like or or ) resolves to the server module even when executed compiling with if they are run with node. This is what #18505 was trying to solve but we decided to go the route of erroring out instead of re-exporting because otherwise too much would have to change in user code that uses or (and wouldn't even work with libraries). This is a bit more annoying for the users (you will need to run with ) but it's way better than having to rewrite the code. The bulk of the PR is to add a new vitest project so that I could actually test the error, the rest is mostly one line here and there.
This needs discussion, but Dominic and I had this idea. Deriveds are not deeply reactive, but even nowadays you can kinda achieve deep reactivity for deriveds by doing This is fine, but it's a bit boilerplatey. This PR is to allow a shorthand of this by allowing to be used in the of a derived. This basically gets compiled to So it works exactly the same. Point of discussions: 1. This is a solution, but it feels a bit weird...shouldn't this be a new rune instead? (I don't think we should add a new rune...just trying to think aloud) 2. While testing this, I've discovered a quirk of this approach (which was obvious in hindsight): since when you proxify a proxy, we just return the original proxy when the prop is and not you are actually mutating the parent However, this is also true for the original trick that we currently "kinda" recommend. I look at the server output, and it doesn't need any changes, since is just removed anyway. WDYT should we do this? 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 [x] Prefix your PR title with , , , or . [x] This message body should clearly illustrate what problems it solves. [x] Ideally, include a test that fails without this PR but passes with it. [x] If this PR changes code within , add a changeset (). Tests and linting [x] Run the tests with and lint the project with
This allows calls to be returned from a function, returning a proxy (if the argument can be proxied). In DEV, providing a unproxyable argument results in a runtime warning. Closes #14316 Before submitting the PR, please make sure you do the following [x] 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 [x] Prefix your PR title with , , , or . [x] This message body should clearly illustrate what problems it solves. [x] Ideally, include a test that fails without this PR but passes with it. [x] If this PR changes code within , add a changeset (). Tests and linting [x] Run the tests with and lint the project with
Repository: sveltejs/svelte. Description: web development for the rest of us Stars: 88049, Forks: 5236. Primary language: JavaScript. Languages: JavaScript (70.9%), Svelte (22.2%), TypeScript (4.9%), CSS (1.1%), HTML (0.8%). License: MIT. Homepage: https://svelte.dev Topics: compiler, template, ui. Latest release: svelte@5.57.0 (1w ago). Open PRs: 100, open issues: 953. Last activity: 1h ago. Community health: 87%. Top contributors: Rich-Harris, dummdidumm, Conduitry, github-actions[bot], trueadm, tanhauhau, paoloricciuti, benmccann, PuruVJ, baseballyama and others.