Skip to content

Commit ff80c53

Browse files
committed
Merge branch 'main' into pr/10221
2 parents b845535 + 5a81610 commit ff80c53

File tree

114 files changed

+2412
-2214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+2412
-2214
lines changed

.changeset/angry-plums-punch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
chore: improve should_proxy_or_freeze logic internally

.changeset/famous-falcons-melt.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: add back `derived` type overload

.changeset/gentle-spies-happen.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: more robust url equality check at dev time

.changeset/honest-buses-add.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: correct increment/decrement code generation

.changeset/hungry-boxes-relate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: sanitize component event names

.changeset/kind-rings-flash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: handle deep assignments to `$state()` class properties correctly

.changeset/many-trees-fix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: don't hoist function when already referenced in module scope

.changeset/pre.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"changesets": [
1212
"afraid-moose-matter",
1313
"angry-books-jam",
14+
"angry-plums-punch",
1415
"beige-flies-wash",
1516
"beige-rabbits-shave",
1617
"big-cars-serve",
@@ -50,6 +51,7 @@
5051
"empty-tools-share",
5152
"fair-crabs-check",
5253
"fair-pianos-talk",
54+
"famous-falcons-melt",
5355
"famous-knives-sneeze",
5456
"fast-weeks-clean",
5557
"few-mugs-fail",
@@ -64,6 +66,7 @@
6466
"friendly-lies-camp",
6567
"funny-wombats-argue",
6668
"gentle-sheep-hug",
69+
"gentle-spies-happen",
6770
"giant-moons-own",
6871
"giant-roses-press",
6972
"good-cars-visit",
@@ -75,7 +78,9 @@
7578
"healthy-planes-vanish",
7679
"heavy-ears-rule",
7780
"hip-balloons-begin",
81+
"honest-buses-add",
7882
"honest-icons-change",
83+
"hungry-boxes-relate",
7984
"hungry-dots-fry",
8085
"hungry-tips-unite",
8186
"hungry-trees-travel",
@@ -88,6 +93,7 @@
8893
"kind-baboons-approve",
8994
"kind-deers-lay",
9095
"kind-eagles-join",
96+
"kind-rings-flash",
9197
"large-clouds-carry",
9298
"large-turkeys-deny",
9399
"late-crabs-lay",
@@ -105,6 +111,7 @@
105111
"lovely-rules-eat",
106112
"lucky-schools-hang",
107113
"lucky-toes-begin",
114+
"many-trees-fix",
108115
"moody-frogs-exist",
109116
"moody-owls-cry",
110117
"nasty-lions-double",
@@ -139,9 +146,12 @@
139146
"rich-cobras-exist",
140147
"rich-sheep-burn",
141148
"rich-tables-sing",
149+
"rich-waves-mix",
142150
"rotten-bags-type",
143151
"rotten-buckets-develop",
152+
"selfish-dragons-knock",
144153
"selfish-tools-hide",
154+
"serious-kids-deliver",
145155
"serious-socks-cover",
146156
"serious-zebras-scream",
147157
"seven-deers-jam",
@@ -163,6 +173,7 @@
163173
"smart-zebras-pay",
164174
"soft-clocks-remember",
165175
"soft-geese-learn",
176+
"soft-months-grab",
166177
"soft-tigers-wink",
167178
"sour-forks-stare",
168179
"sour-rules-march",
@@ -177,10 +188,12 @@
177188
"sweet-mangos-beg",
178189
"sweet-pens-sniff",
179190
"swift-donkeys-perform",
191+
"swift-fans-stare",
180192
"swift-ravens-hunt",
181193
"swift-seahorses-deliver",
182194
"tall-books-grin",
183195
"tall-garlics-try",
196+
"tall-mugs-buy",
184197
"tall-shrimps-worry",
185198
"tall-tigers-wait",
186199
"tame-spies-drum",
@@ -194,7 +207,9 @@
194207
"thirty-flowers-sit",
195208
"thirty-ghosts-fix",
196209
"thirty-impalas-repair",
210+
"thirty-pears-hug",
197211
"thirty-wombats-relax",
212+
"three-camels-sell",
198213
"three-suits-grin",
199214
"tidy-buses-whisper",
200215
"tiny-kings-whisper",
@@ -211,6 +226,7 @@
211226
"wild-foxes-wonder",
212227
"wise-dancers-hang",
213228
"wise-donkeys-marry",
214-
"witty-camels-warn"
229+
"witty-camels-warn",
230+
"witty-steaks-dream"
215231
]
216232
}

.changeset/rich-waves-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: try-catch deep read during `$inspect`

.changeset/selfish-dragons-knock.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: allow ts casts in bindings

.changeset/serious-kids-deliver.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: allow `:global(..)` in compound selectors

.changeset/soft-months-grab.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: hydrate controlled each blocks correctly

.changeset/swift-fans-stare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
chore: improve $state static reference warning heuristics

.changeset/tall-mugs-buy.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: prevent false positive store error in module script

.changeset/thirty-pears-hug.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: allow type selector in `:global()` when it's at a start of a compound selector

.changeset/three-camels-sell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: correctly cleanup unowned derived dependency memory

.changeset/witty-steaks-dream.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"svelte": patch
3+
---
4+
5+
fix: ensure proxy is updated before notifying listeners

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@
2626
"changeset:publish": "changeset publish"
2727
},
2828
"devDependencies": {
29-
"@changesets/cli": "^2.26.1",
30-
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
29+
"@changesets/cli": "^2.27.1",
3130
"@sveltejs/eslint-config": "^6.0.4",
32-
"@types/node": "^18.18.8",
33-
"@typescript-eslint/eslint-plugin": "^5.22.0",
34-
"@vitest/coverage-v8": "^0.34.6",
35-
"concurrently": "^8.2.0",
31+
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
32+
"@types/node": "^20.11.5",
33+
"@typescript-eslint/eslint-plugin": "^6.19.0",
34+
"@vitest/coverage-v8": "^1.2.1",
35+
"concurrently": "^8.2.2",
3636
"cross-env": "^7.0.3",
37-
"eslint": "^8.49.0",
38-
"eslint-plugin-lube": "^0.1.7",
37+
"eslint": "^8.56.0",
38+
"eslint-plugin-lube": "^0.4.3",
3939
"jsdom": "22.0.0",
4040
"playwright": "^1.35.1",
41-
"prettier": "^3.1.1",
41+
"prettier": "^3.2.4",
4242
"prettier-plugin-svelte": "^3.1.2",
43-
"typescript": "^5.2.2",
44-
"vitest": "^0.34.6"
43+
"typescript": "^5.3.3",
44+
"vitest": "^1.2.1"
4545
},
4646
"pnpm": {
4747
"overrides": {

packages/svelte/CHANGELOG.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,52 @@
11
# svelte
22

3+
## 5.0.0-next.39
4+
5+
### Patch Changes
6+
7+
- fix: handle deep assignments to `$state()` class properties correctly ([#10289](https://github.com/sveltejs/svelte/pull/10289))
8+
9+
- fix: prevent false positive store error in module script ([#10291](https://github.com/sveltejs/svelte/pull/10291))
10+
11+
- fix: allow type selector in `:global()` when it's at a start of a compound selector ([#10287](https://github.com/sveltejs/svelte/pull/10287))
12+
13+
## 5.0.0-next.38
14+
15+
### Patch Changes
16+
17+
- chore: improve should_proxy_or_freeze logic internally ([#10249](https://github.com/sveltejs/svelte/pull/10249))
18+
19+
- fix: add back `derived` type overload ([`776ac3c1762da5f8147c457a997a417cfae67e4c`](https://github.com/sveltejs/svelte/commit/776ac3c1762da5f8147c457a997a417cfae67e4c))
20+
21+
- fix: more robust url equality check at dev time ([`14d7b26897cbfa129847c446b0ecf9557d77ef7c`](https://github.com/sveltejs/svelte/commit/14d7b26897cbfa129847c446b0ecf9557d77ef7c))
22+
23+
- fix: correct increment/decrement code generation ([`2861ad66e054d2b14f382aaada4512e3e5d56db8`](https://github.com/sveltejs/svelte/commit/2861ad66e054d2b14f382aaada4512e3e5d56db8))
24+
25+
- fix: sanitize component event names ([#10235](https://github.com/sveltejs/svelte/pull/10235))
26+
27+
- fix: don't hoist function when already referenced in module scope ([`1538264bd5ed431d3048d54efe9c83c4db7fb42a`](https://github.com/sveltejs/svelte/commit/1538264bd5ed431d3048d54efe9c83c4db7fb42a))
28+
29+
- fix: try-catch deep read during `$inspect` ([#10270](https://github.com/sveltejs/svelte/pull/10270))
30+
31+
- fix: allow ts casts in bindings ([#10181](https://github.com/sveltejs/svelte/pull/10181))
32+
33+
- fix: allow `:global(..)` in compound selectors ([#10266](https://github.com/sveltejs/svelte/pull/10266))
34+
35+
- fix: hydrate controlled each blocks correctly ([#10259](https://github.com/sveltejs/svelte/pull/10259))
36+
37+
- chore: improve $state static reference warning heuristics ([#10275](https://github.com/sveltejs/svelte/pull/10275))
38+
39+
- fix: correctly cleanup unowned derived dependency memory ([#10280](https://github.com/sveltejs/svelte/pull/10280))
40+
41+
- fix: ensure proxy is updated before notifying listeners ([#10267](https://github.com/sveltejs/svelte/pull/10267))
42+
343
## 5.0.0-next.37
444

545
### Patch Changes
646

747
- fix: skip certain slot validations for custom elements ([#10207](https://github.com/sveltejs/svelte/pull/10207))
848

9-
- fix: add compiler error for invalid <p> contents ([#10201](https://github.com/sveltejs/svelte/pull/10201))
49+
- fix: add compiler error for invalid `<p>` contents ([#10201](https://github.com/sveltejs/svelte/pull/10201))
1050

1151
- fix: correctly apply event.currentTarget ([#10216](https://github.com/sveltejs/svelte/pull/10216))
1252

packages/svelte/package.json

Lines changed: 9 additions & 9 deletions
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.0.0-next.37",
5+
"version": "5.0.0-next.39",
66
"type": "module",
77
"types": "./types/index.d.ts",
88
"engines": {
@@ -99,32 +99,32 @@
9999
"prepublishOnly": "pnpm build"
100100
},
101101
"devDependencies": {
102-
"@jridgewell/trace-mapping": "^0.3.19",
102+
"@jridgewell/trace-mapping": "^0.3.22",
103103
"@playwright/test": "^1.35.1",
104104
"@rollup/plugin-commonjs": "^25.0.7",
105105
"@rollup/plugin-node-resolve": "^15.2.3",
106106
"@rollup/plugin-terser": "^0.4.4",
107107
"@rollup/plugin-virtual": "^3.0.2",
108-
"@types/aria-query": "^5.0.3",
109-
"dts-buddy": "^0.4.3",
110-
"esbuild": "^0.19.2",
111-
"rollup": "^4.1.5",
108+
"@types/aria-query": "^5.0.4",
109+
"dts-buddy": "^0.4.4",
110+
"esbuild": "^0.19.11",
111+
"rollup": "^4.9.5",
112112
"source-map": "^0.7.4",
113113
"tiny-glob": "^0.2.9"
114114
},
115115
"dependencies": {
116116
"@ampproject/remapping": "^2.2.1",
117117
"@jridgewell/sourcemap-codec": "^1.4.15",
118118
"@types/estree": "^1.0.5",
119-
"acorn": "^8.10.0",
119+
"acorn": "^8.11.3",
120120
"acorn-typescript": "^1.4.13",
121121
"aria-query": "^5.3.0",
122122
"axobject-query": "^4.0.0",
123123
"esm-env": "^1.0.0",
124124
"esrap": "^1.2.1",
125-
"is-reference": "^3.0.1",
125+
"is-reference": "^3.0.2",
126126
"locate-character": "^3.0.0",
127-
"magic-string": "^0.30.4",
127+
"magic-string": "^0.30.5",
128128
"zimmerframe": "^1.1.0"
129129
}
130130
}

packages/svelte/src/compiler/errors.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const parse = {
7878
* @param {string} reason
7979
*/
8080
'invalid-closing-tag-after-autoclose': (name, reason) =>
81-
`</${name}> attempted to close element that was already automatically closed by <${reason}>`,
81+
`</${name}> attempted to close element that was already automatically closed by <${reason}> (cannot nest <${reason}> inside <${name}>)`,
8282
'invalid-dollar-binding': () =>
8383
`The $ name is reserved, and cannot be used for variables and imports`,
8484
'invalid-dollar-prefix': () =>
@@ -100,7 +100,7 @@ const css = {
100100
`:global(...) can be at the start or end of a selector sequence, but not in the middle`,
101101
'invalid-css-global-selector': () => `:global(...) must contain exactly one selector`,
102102
'invalid-css-global-selector-list': () =>
103-
`:global(...) cannot be used to modify a selector, or be modified by another selector`,
103+
`:global(...) must not contain type or universal selectors when used in a compound selector`,
104104
'invalid-css-selector': () => `Invalid selector`,
105105
'invalid-css-identifier': () => 'Expected a valid CSS identifier'
106106
};
@@ -435,10 +435,6 @@ const errors = {
435435
// code: 'illegal-declaration',
436436
// message: 'The $ prefix is reserved, and cannot be used for variable and import names'
437437
// },
438-
// illegal_subscription: {
439-
// code: 'illegal-subscription',
440-
// message: 'Cannot reference store value inside <script context="module">'
441-
// },
442438
// illegal_global: /** @param {string} name */ (name) => ({
443439
// code: 'illegal-global',
444440
// message: `${name} is an illegal variable name`
@@ -447,19 +443,6 @@ const errors = {
447443
// code: 'illegal-variable-declaration',
448444
// message: 'Cannot declare same variable name which is imported inside <script context="module">'
449445
// },
450-
// css_invalid_global_selector: {
451-
// code: 'css-invalid-global-selector',
452-
// message: ':global(...) must contain a single selector'
453-
// },
454-
// css_invalid_global_selector_position: {
455-
// code: 'css-invalid-global-selector-position',
456-
// message:
457-
// ':global(...) not at the start of a selector sequence should not contain type or universal selectors'
458-
// },
459-
// css_invalid_selector: /** @param {string} selector */ (selector) => ({
460-
// code: 'css-invalid-selector',
461-
// message: `Invalid selector "${selector}"`
462-
// }),
463446
// invalid_directive_value: {
464447
// code: 'invalid-directive-value',
465448
// message:

0 commit comments

Comments
 (0)