Skip to content

Commit f72d1a6

Browse files
committed
merge
2 parents 1a42fc8 + 2342c87 commit f72d1a6

File tree

13 files changed

+49
-17
lines changed

13 files changed

+49
-17
lines changed

.changeset/rude-drinks-relate.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

documentation/docs/07-misc/07-v5-migration-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,9 @@ Svelte 5 is more strict about the HTML structure and will throw a compiler error
833833

834834
Assignments to destructured parts of a `@const` declaration are no longer allowed. It was an oversight that this was ever allowed.
835835

836-
### :is(...) and :where(...) are scoped
836+
### :is(...), :has(...), and :where(...) are scoped
837837

838-
Previously, Svelte did not analyse selectors inside `:is(...)` and `:where(...)`, effectively treating them as global. Svelte 5 analyses them in the context of the current component. As such, some selectors may now be treated as unused if they were relying on this treatment. To fix this, use `:global(...)` inside the `:is(...)/:where(...)` selectors.
838+
Previously, Svelte did not analyse selectors inside `:is(...)`, `:has(...)`, and `:where(...)`, effectively treating them as global. Svelte 5 analyses them in the context of the current component. As such, some selectors may now be treated as unused if they were relying on this treatment. To fix this, use `:global(...)` inside the `:is(...)/:has(...)/:where(...)` selectors.
839839

840840
When using Tailwind's `@apply` directive, add a `:global` selector to preserve rules that use Tailwind-generated `:is(...)` selectors:
841841

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@
1515
},
1616
"scripts": {
1717
"build": "pnpm -r --filter=./packages/* build",
18-
"build:sites": "pnpm -r --filter=./sites/* build",
19-
"preview-site": "npm run build --prefix sites/svelte-5-preview",
2018
"check": "cd packages/svelte && pnpm build && cd ../../ && pnpm -r check",
2119
"lint": "eslint && prettier --check .",
2220
"format": "prettier --write .",
2321
"test": "vitest run",
24-
"test-output": "vitest run --coverage --reporter=json --outputFile=sites/svelte-5-preview/src/routes/status/results.json",
2522
"changeset:version": "changeset version && pnpm -r generate:version && git add --all",
2623
"changeset:publish": "changeset publish",
2724
"bench": "node --allow-natives-syntax ./benchmarking/run.js",

packages/svelte/CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# svelte
22

3+
## 5.33.14
4+
5+
### Patch Changes
6+
7+
- Revert "feat: enable TS autocomplete for Svelte HTML element definitions" ([#16063](https://github.com/sveltejs/svelte/pull/16063))
8+
9+
- fix: destructuring snippet arguments ([#16068](https://github.com/sveltejs/svelte/pull/16068))
10+
11+
## 5.33.13
12+
13+
### Patch Changes
14+
15+
- fix: avoid recursion error in `EachBlock` visitor ([#16058](https://github.com/sveltejs/svelte/pull/16058))
16+
17+
## 5.33.12
18+
19+
### Patch Changes
20+
21+
- fix: correctly transform reassignments to class fields in SSR mode ([#16051](https://github.com/sveltejs/svelte/pull/16051))
22+
323
## 5.33.11
424

525
### Patch Changes

packages/svelte/elements.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,7 @@ export interface SvelteHTMLElements {
20662066
failed?: import('svelte').Snippet<[error: unknown, reset: () => void]>;
20672067
};
20682068

2069-
[name: string & {}]: { [name: string]: any };
2069+
[name: string]: { [name: string]: any };
20702070
}
20712071

20722072
export type ClassValue = string | import('clsx').ClassArray | import('clsx').ClassDictionary;

packages/svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "svelte",
33
"description": "Cybernetically enhanced web apps",
44
"license": "MIT",
5-
"version": "5.33.11",
5+
"version": "5.33.14",
66
"type": "module",
77
"types": "./types/index.d.ts",
88
"engines": {

packages/svelte/src/compiler/phases/2-analyze/visitors/EachBlock.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ export function EachBlock(node, context) {
7777
* @returns {void}
7878
*/
7979
function collect_transitive_dependencies(binding, bindings) {
80+
if (bindings.has(binding)) {
81+
return;
82+
}
8083
bindings.add(binding);
8184

8285
if (binding.kind === 'legacy_reactive') {

packages/svelte/src/compiler/phases/3-transform/client/visitors/SnippetBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function SnippetBlock(node, context) {
5757
for (const path of paths) {
5858
const name = /** @type {Identifier} */ (path.node).name;
5959
const needs_derived = path.has_default_value; // to ensure that default value is only called once
60-
const fn = b.thunk(/** @type {Expression} */ (context.visit(path.expression)));
60+
const fn = b.thunk(/** @type {Expression} */ (context.visit(path.expression, child_state)));
6161

6262
declarations.push(b.let(path.node, needs_derived ? b.call('$.derived_safe_equal', fn) : fn));
6363

packages/svelte/src/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* The current version, as set in package.json.
55
* @type {string}
66
*/
7-
export const VERSION = '5.33.11';
7+
export const VERSION = '5.33.14';
88
export const PUBLIC_VERSION = '5';

packages/svelte/svelte-html.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as svelteElements from './elements.js';
88
/**
99
* @internal do not use
1010
*/
11-
type HTMLProps<Property extends keyof svelteElements.SvelteHTMLElements, Override> = Omit<
11+
type HTMLProps<Property extends string, Override> = Omit<
1212
import('./elements.js').SvelteHTMLElements[Property],
1313
keyof Override
1414
> &
@@ -250,7 +250,7 @@ declare global {
250250
};
251251
// don't type svelte:options, it would override the types in svelte/elements and it isn't extendable anyway
252252

253-
[name: string & {}]: { [name: string]: any };
253+
[name: string]: { [name: string]: any };
254254
}
255255
}
256256
}

0 commit comments

Comments
 (0)