Skip to content

Commit ebbf426

Browse files
committed
display deprecation notices
1 parent f4d82d0 commit ebbf426

File tree

8 files changed

+90
-99
lines changed

8 files changed

+90
-99
lines changed

apps/svelte.dev/content/docs/svelte/04-runtime/03-lifecycle-hooks.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ If a function is returned from `onMount`, it will be called when the component i
4545
4646
## `onDestroy`
4747

48+
Schedules a callback to run immediately before the component is unmounted.
49+
50+
Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the
51+
only one that runs inside a server-side component.
52+
4853
<div class="ts-block">
4954

5055
```dts

apps/svelte.dev/content/docs/svelte/98-reference/20-svelte.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ import {
2828

2929
## afterUpdate
3030

31+
<blockquote class="tag deprecated">
32+
33+
Use `$effect` instead — see https://svelte-5-preview.vercel.app/docs/deprecations#beforeupdate-and-afterupdate
34+
35+
</blockquote>
36+
3137
Schedules a callback to run immediately after the component has been updated.
3238

3339
The first time the callback runs will be after the initial `onMount`.
@@ -46,6 +52,12 @@ function afterUpdate(fn: () => void): void;
4652

4753
## beforeUpdate
4854

55+
<blockquote class="tag deprecated">
56+
57+
Use `$effect.pre` instead — see https://svelte-5-preview.vercel.app/docs/deprecations#beforeupdate-and-afterupdate
58+
59+
</blockquote>
60+
4961
Schedules a callback to run immediately before the component is updated after any state change.
5062

5163
The first time the callback runs will be before the initial `onMount`.
@@ -64,6 +76,12 @@ function beforeUpdate(fn: () => void): void;
6476

6577
## createEventDispatcher
6678

79+
<blockquote class="tag deprecated">
80+
81+
Use callback props and/or the `$host()` rune instead — see https://svelte-5-preview.vercel.app/docs/deprecations#createeventdispatcher
82+
83+
</blockquote>
84+
6785
Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs#template-syntax-component-directives-on-eventname).
6886
Event dispatchers are functions that can take two arguments: `name` and `detail`.
6987

apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-compiler.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,11 @@ function preprocess(
148148

149149
## walk
150150

151+
<blockquote class="tag deprecated">
151152

153+
Replace this with `import { walk } from 'estree-walker'`
154+
155+
</blockquote>
152156

153157
<div class="ts-block">
154158

apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-easing.md

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ import {
4343

4444
## backIn
4545

46-
47-
4846
<div class="ts-block">
4947

5048
```dts
@@ -57,8 +55,6 @@ function backIn(t: number): number;
5755

5856
## backInOut
5957

60-
61-
6258
<div class="ts-block">
6359

6460
```dts
@@ -71,8 +67,6 @@ function backInOut(t: number): number;
7167

7268
## backOut
7369

74-
75-
7670
<div class="ts-block">
7771

7872
```dts
@@ -85,8 +79,6 @@ function backOut(t: number): number;
8579

8680
## bounceIn
8781

88-
89-
9082
<div class="ts-block">
9183

9284
```dts
@@ -99,8 +91,6 @@ function bounceIn(t: number): number;
9991

10092
## bounceInOut
10193

102-
103-
10494
<div class="ts-block">
10595

10696
```dts
@@ -113,8 +103,6 @@ function bounceInOut(t: number): number;
113103

114104
## bounceOut
115105

116-
117-
118106
<div class="ts-block">
119107

120108
```dts
@@ -127,8 +115,6 @@ function bounceOut(t: number): number;
127115

128116
## circIn
129117

130-
131-
132118
<div class="ts-block">
133119

134120
```dts
@@ -141,8 +127,6 @@ function circIn(t: number): number;
141127

142128
## circInOut
143129

144-
145-
146130
<div class="ts-block">
147131

148132
```dts
@@ -155,8 +139,6 @@ function circInOut(t: number): number;
155139

156140
## circOut
157141

158-
159-
160142
<div class="ts-block">
161143

162144
```dts
@@ -169,8 +151,6 @@ function circOut(t: number): number;
169151

170152
## cubicIn
171153

172-
173-
174154
<div class="ts-block">
175155

176156
```dts
@@ -183,8 +163,6 @@ function cubicIn(t: number): number;
183163

184164
## cubicInOut
185165

186-
187-
188166
<div class="ts-block">
189167

190168
```dts
@@ -197,8 +175,6 @@ function cubicInOut(t: number): number;
197175

198176
## cubicOut
199177

200-
201-
202178
<div class="ts-block">
203179

204180
```dts
@@ -211,8 +187,6 @@ function cubicOut(t: number): number;
211187

212188
## elasticIn
213189

214-
215-
216190
<div class="ts-block">
217191

218192
```dts
@@ -225,8 +199,6 @@ function elasticIn(t: number): number;
225199

226200
## elasticInOut
227201

228-
229-
230202
<div class="ts-block">
231203

232204
```dts
@@ -239,8 +211,6 @@ function elasticInOut(t: number): number;
239211

240212
## elasticOut
241213

242-
243-
244214
<div class="ts-block">
245215

246216
```dts
@@ -253,8 +223,6 @@ function elasticOut(t: number): number;
253223

254224
## expoIn
255225

256-
257-
258226
<div class="ts-block">
259227

260228
```dts
@@ -267,8 +235,6 @@ function expoIn(t: number): number;
267235

268236
## expoInOut
269237

270-
271-
272238
<div class="ts-block">
273239

274240
```dts
@@ -281,8 +247,6 @@ function expoInOut(t: number): number;
281247

282248
## expoOut
283249

284-
285-
286250
<div class="ts-block">
287251

288252
```dts
@@ -295,8 +259,6 @@ function expoOut(t: number): number;
295259

296260
## linear
297261

298-
299-
300262
<div class="ts-block">
301263

302264
```dts
@@ -309,8 +271,6 @@ function linear(t: number): number;
309271

310272
## quadIn
311273

312-
313-
314274
<div class="ts-block">
315275

316276
```dts
@@ -323,8 +283,6 @@ function quadIn(t: number): number;
323283

324284
## quadInOut
325285

326-
327-
328286
<div class="ts-block">
329287

330288
```dts
@@ -337,8 +295,6 @@ function quadInOut(t: number): number;
337295

338296
## quadOut
339297

340-
341-
342298
<div class="ts-block">
343299

344300
```dts
@@ -351,8 +307,6 @@ function quadOut(t: number): number;
351307

352308
## quartIn
353309

354-
355-
356310
<div class="ts-block">
357311

358312
```dts
@@ -365,8 +319,6 @@ function quartIn(t: number): number;
365319

366320
## quartInOut
367321

368-
369-
370322
<div class="ts-block">
371323

372324
```dts
@@ -379,8 +331,6 @@ function quartInOut(t: number): number;
379331

380332
## quartOut
381333

382-
383-
384334
<div class="ts-block">
385335

386336
```dts
@@ -393,8 +343,6 @@ function quartOut(t: number): number;
393343

394344
## quintIn
395345

396-
397-
398346
<div class="ts-block">
399347

400348
```dts
@@ -407,8 +355,6 @@ function quintIn(t: number): number;
407355

408356
## quintInOut
409357

410-
411-
412358
<div class="ts-block">
413359

414360
```dts
@@ -421,8 +367,6 @@ function quintInOut(t: number): number;
421367

422368
## quintOut
423369

424-
425-
426370
<div class="ts-block">
427371

428372
```dts
@@ -435,8 +379,6 @@ function quintOut(t: number): number;
435379

436380
## sineIn
437381

438-
439-
440382
<div class="ts-block">
441383

442384
```dts
@@ -449,8 +391,6 @@ function sineIn(t: number): number;
449391

450392
## sineInOut
451393

452-
453-
454394
<div class="ts-block">
455395

456396
```dts
@@ -463,8 +403,6 @@ function sineInOut(t: number): number;
463403

464404
## sineOut
465405

466-
467-
468406
<div class="ts-block">
469407

470408
```dts

apps/svelte.dev/content/docs/svelte/98-reference/21-svelte-legacy.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ import {
2525

2626
## asClassComponent
2727

28+
<blockquote class="tag deprecated">
29+
30+
Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
31+
32+
</blockquote>
33+
2834
Takes the component function and returns a Svelte 4 compatible component constructor.
2935

3036
<div class="ts-block">
@@ -50,6 +56,12 @@ function asClassComponent<
5056

5157
## createBubbler
5258

59+
<blockquote class="tag deprecated">
60+
61+
Use this only as a temporary solution to migrate your automatically delegated events in Svelte 5.
62+
63+
</blockquote>
64+
5365
Function to create a `bubble` function that mimic the behavior of `on:click` without handler available in svelte 4.
5466

5567
<div class="ts-block">
@@ -66,6 +78,12 @@ function createBubbler(): (
6678

6779
## createClassComponent
6880

81+
<blockquote class="tag deprecated">
82+
83+
Use this only as a temporary solution to migrate your imperative component code to Svelte 5.
84+
85+
</blockquote>
86+
6987
Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
7088

7189
<div class="ts-block">
@@ -179,6 +197,12 @@ function preventDefault(
179197

180198
## run
181199

200+
<blockquote class="tag deprecated">
201+
202+
Use this only as a temporary solution to migrate your component code to Svelte 5.
203+
204+
</blockquote>
205+
182206
Runs the given function once immediately on the server, and works like `$effect.pre` on the client.
183207

184208
<div class="ts-block">

0 commit comments

Comments
 (0)