Skip to content

Commit a7e0c84

Browse files
committed
unused
1 parent ffc1f6b commit a7e0c84

File tree

9 files changed

+14
-15
lines changed

9 files changed

+14
-15
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ import { UpdateExpression } from './visitors/UpdateExpression.js';
5959
import { UseDirective } from './visitors/UseDirective.js';
6060
import { AttachTag } from './visitors/AttachTag.js';
6161
import { VariableDeclaration } from './visitors/VariableDeclaration.js';
62-
import { Memoizer } from './visitors/shared/utils.js';
6362

6463
/** @type {Visitors} */
6564
const visitors = {

packages/svelte/src/compiler/phases/3-transform/server/visitors/SvelteBoundary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** @import { BlockStatement, Expression } from 'estree' */
1+
/** @import { BlockStatement } from 'estree' */
22
/** @import { AST } from '#compiler' */
33
/** @import { ComponentContext } from '../types' */
44
import { BLOCK_CLOSE, BLOCK_OPEN } from '../../../../../internal/server/hydration.js';

packages/svelte/src/internal/client/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const USER_EFFECT = 1 << 20;
2222

2323
// Flags used for async
2424
export const REACTION_IS_UPDATING = 1 << 21;
25-
export const EFFECT_ASYNC = 1 << 22;
25+
export const ASYNC = 1 << 22;
2626

2727
export const ERROR_VALUE = 1 << 23;
2828

packages/svelte/src/internal/client/dev/debug.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
CLEAN,
88
DERIVED,
99
EFFECT,
10-
EFFECT_ASYNC,
10+
ASYNC,
1111
MAYBE_DIRTY,
1212
RENDER_EFFECT,
1313
ROOT_EFFECT
@@ -40,7 +40,7 @@ export function log_effect_tree(effect, depth = 0) {
4040
label = 'boundary';
4141
} else if ((flags & BLOCK_EFFECT) !== 0) {
4242
label = 'block';
43-
} else if ((flags & EFFECT_ASYNC) !== 0) {
43+
} else if ((flags & ASYNC) !== 0) {
4444
label = 'async';
4545
} else if ((flags & BRANCH_EFFECT) !== 0) {
4646
label = 'branch';

packages/svelte/src/internal/client/dev/tracing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { UNINITIALIZED } from '../../../constants.js';
33
import { snapshot } from '../../shared/clone.js';
44
import { define_property } from '../../shared/utils.js';
5-
import { DERIVED, EFFECT_ASYNC, PROXY_PATH_SYMBOL, STATE_SYMBOL } from '#client/constants';
5+
import { DERIVED, ASYNC, PROXY_PATH_SYMBOL, STATE_SYMBOL } from '#client/constants';
66
import { effect_tracking } from '../reactivity/effects.js';
77
import { active_reaction, captured_signals, set_captured_signals, untrack } from '../runtime.js';
88

@@ -26,7 +26,7 @@ function log_entry(signal, entry) {
2626
return;
2727
}
2828

29-
const type = (signal.f & (DERIVED | EFFECT_ASYNC)) !== 0 ? '$derived' : '$state';
29+
const type = (signal.f & (DERIVED | ASYNC)) !== 0 ? '$derived' : '$state';
3030
const current_reaction = /** @type {Reaction} */ (active_reaction);
3131
const dirty = signal.wv > current_reaction.wv || current_reaction.wv === 0;
3232
const style = dirty

packages/svelte/src/internal/client/reactivity/batch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
DESTROYED,
77
DIRTY,
88
EFFECT,
9-
EFFECT_ASYNC,
9+
ASYNC,
1010
INERT,
1111
RENDER_EFFECT,
1212
ROOT_EFFECT,
@@ -248,7 +248,7 @@ export class Batch {
248248
} else if (async_mode_flag && (flags & RENDER_EFFECT) !== 0) {
249249
this.#render_effects.push(effect);
250250
} else if (is_dirty(effect)) {
251-
if ((flags & EFFECT_ASYNC) !== 0) {
251+
if ((flags & ASYNC) !== 0) {
252252
var effects = effect.b?.pending ? this.#boundary_async_effects : this.#async_effects;
253253
effects.push(effect);
254254
} else {

packages/svelte/src/internal/client/reactivity/deriveds.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
STALE_REACTION,
1212
UNOWNED,
1313
DESTROYED,
14-
EFFECT_ASYNC
14+
ASYNC
1515
} from '#client/constants';
1616
import {
1717
active_reaction,
@@ -194,7 +194,7 @@ export function async_derived(fn, location) {
194194
if (DEV) {
195195
// add a flag that lets this be printed as a derived
196196
// when using `$inspect.trace()`
197-
signal.f |= EFFECT_ASYNC;
197+
signal.f |= ASYNC;
198198
}
199199

200200
return new Promise((fulfil) => {

packages/svelte/src/internal/client/reactivity/effects.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
BOUNDARY_EFFECT,
3535
STALE_REACTION,
3636
USER_EFFECT,
37-
EFFECT_ASYNC
37+
ASYNC
3838
} from '#client/constants';
3939
import * as e from '../errors.js';
4040
import { DEV } from 'esm-env';
@@ -332,7 +332,7 @@ export function legacy_pre_effect_reset() {
332332
* @returns {Effect}
333333
*/
334334
export function async_effect(fn) {
335-
return create_effect(EFFECT_ASYNC | EFFECT_PRESERVED, fn, true);
335+
return create_effect(ASYNC | EFFECT_PRESERVED, fn, true);
336336
}
337337

338338
/**

packages/svelte/src/internal/client/reactivity/sources.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
MAYBE_DIRTY,
2828
BLOCK_EFFECT,
2929
ROOT_EFFECT,
30-
EFFECT_ASYNC
30+
ASYNC
3131
} from '#client/constants';
3232
import * as e from '../errors.js';
3333
import { legacy_mode_flag, tracing_mode_flag } from '../../flags/index.js';
@@ -140,7 +140,7 @@ export function set(source, value, should_proxy = false) {
140140
// to ensure we error if state is set inside an inspect effect
141141
(!untracking || (active_reaction.f & INSPECT_EFFECT) !== 0) &&
142142
is_runes() &&
143-
(active_reaction.f & (DERIVED | BLOCK_EFFECT | EFFECT_ASYNC | INSPECT_EFFECT)) !== 0 &&
143+
(active_reaction.f & (DERIVED | BLOCK_EFFECT | ASYNC | INSPECT_EFFECT)) !== 0 &&
144144
!current_sources?.includes(source)
145145
) {
146146
e.state_unsafe_mutation();

0 commit comments

Comments
 (0)