Skip to content

Commit 8d5a708

Browse files
committed
chore: move store and rename signal to utils
1 parent 945a99e commit 8d5a708

26 files changed

+62
-62
lines changed

packages/qwik/src/core/client/vnode-diff.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ import {
9191
import { mapApp_findIndx } from './util-mapArray';
9292
import { mapArray_set } from './util-mapArray';
9393
import { getNewElementNamespaceData } from './vnode-namespace';
94-
import { isSignal } from '../reactive-primitives/signal';
94+
import { isSignal } from '../reactive-primitives/utils';
9595
import type { Signal } from '../reactive-primitives/signal.public';
9696
import { executeComponent } from '../shared/component-execution';
9797
import { isSlotProp } from '../shared/utils/prop';
9898
import { escapeHTML } from '../shared/utils/character-escaping';
99-
import { clearAllEffects } from '../reactive-primitives/signal-cleanup';
99+
import { clearAllEffects } from '../reactive-primitives/cleanup';
100100
import { serializeAttribute } from '../shared/utils/styles';
101101
import { QError, qError } from '../shared/error/error';
102102
import { getFileLocationFromJsx } from '../shared/utils/jsx-filename';

packages/qwik/src/core/debug.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { isQrl } from '../server/prefetch-strategy';
22
import { isJSXNode } from './shared/jsx/jsx-runtime';
33
import { isTask } from './use/use-task';
44
import { vnode_getProp, vnode_isVNode } from './client/vnode';
5-
import { isSignal } from './reactive-primitives/signal';
6-
import { isStore } from './reactive-primitives/store';
5+
import { isSignal } from './reactive-primitives/utils';
6+
import { isStore } from './reactive-primitives/impl/store';
77
import { DEBUG_TYPE } from './shared/types';
88
import { ComputedSignalImpl } from './reactive-primitives/impl/computed-signal-impl';
99
import { WrappedSignalImpl } from './reactive-primitives/impl/wrapped-signal-impl';

packages/qwik/src/core/reactive-primitives/signal-cleanup.ts renamed to packages/qwik/src/core/reactive-primitives/cleanup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ensureMaterialized, vnode_isElementVNode, vnode_isVNode } from '../clie
22
import type { Container } from '../shared/types';
33
import { SignalImpl } from './impl/signal-impl';
44
import { WrappedSignalImpl } from './impl/wrapped-signal-impl';
5-
import { StoreHandler, getStoreHandler } from './store';
5+
import { StoreHandler, getStoreHandler } from './impl/store';
66
import {
77
EffectSubscriptionProp,
88
_EFFECT_BACK_REF,

packages/qwik/src/core/reactive-primitives/impl/computed-signal-impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import type { Container } from '../../shared/types';
55
import { ChoreType } from '../../shared/util-chore-type';
66
import { isPromise } from '../../shared/utils/promises';
77
import { tryGetInvokeContext } from '../../use/use-core';
8-
import { throwIfQRLNotResolved } from '../signal';
9-
import type { BackRef } from '../signal-cleanup';
8+
import { throwIfQRLNotResolved } from '../utils';
9+
import type { BackRef } from '../cleanup';
1010
import { getSubscriber } from '../subscriber';
1111
import type { ComputeQRL, EffectSubscription } from '../types';
1212
import { _EFFECT_BACK_REF, EffectProperty, NEEDS_COMPUTATION, SignalFlags } from '../types';

packages/qwik/src/core/reactive-primitives/impl/serializer-signal-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { qwikDebugToString } from '../../debug';
22
import type { QRLInternal } from '../../shared/qrl/qrl-class';
33
import type { Container } from '../../shared/types';
44
import { trackSignal } from '../../use/use-core';
5-
import { throwIfQRLNotResolved } from '../signal';
5+
import { throwIfQRLNotResolved } from '../utils';
66
import type { SerializerArg } from '../types';
77
import { EffectProperty, NEEDS_COMPUTATION, SignalFlags, type ComputeQRL } from '../types';
88
import { ComputedSignalImpl } from './computed-signal-impl';

packages/qwik/src/core/reactive-primitives/impl/signal-impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ensureContainsBackRef,
1111
ensureContainsSubscription,
1212
triggerEffects,
13-
} from '../signal';
13+
} from '../utils';
1414
import type { Signal } from '../signal.public';
1515
import { SignalFlags, type EffectSubscription } from '../types';
1616

packages/qwik/src/core/reactive-primitives/signal.unit.tsx renamed to packages/qwik/src/core/reactive-primitives/impl/signal.unit.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
import { $, isBrowser, type ValueOrPromise } from '@qwik.dev/core';
22
import { createDocument, getTestPlatform } from '@qwik.dev/core/testing';
33
import { afterEach, beforeEach, describe, expect, expectTypeOf, it } from 'vitest';
4-
import { getDomContainer } from '../client/dom-container';
5-
import { implicit$FirstArg } from '../shared/qrl/implicit_dollar';
6-
import { inlinedQrl } from '../shared/qrl/qrl';
7-
import { type QRLInternal } from '../shared/qrl/qrl-class';
8-
import { type QRL } from '../shared/qrl/qrl.public';
9-
import { ChoreType } from '../shared/util-chore-type';
10-
import type { Container, HostElement } from '../shared/types';
11-
import { isPromise } from '../shared/utils/promises';
12-
import { invoke, newInvokeContext } from '../use/use-core';
13-
import { Task } from '../use/use-task';
4+
import { getDomContainer } from '../../client/dom-container';
5+
import { implicit$FirstArg } from '../../shared/qrl/implicit_dollar';
6+
import { inlinedQrl } from '../../shared/qrl/qrl';
7+
import { type QRLInternal } from '../../shared/qrl/qrl-class';
8+
import { type QRL } from '../../shared/qrl/qrl.public';
9+
import { ChoreType } from '../../shared/util-chore-type';
10+
import type { Container, HostElement } from '../../shared/types';
11+
import { isPromise } from '../../shared/utils/promises';
12+
import { invoke, newInvokeContext } from '../../use/use-core';
13+
import { Task } from '../../use/use-task';
1414
import {
1515
EffectProperty,
1616
SignalFlags,
1717
type InternalReadonlySignal,
1818
type InternalSignal,
19-
} from './types';
19+
} from '../types';
2020
import {
2121
createComputed$,
2222
createComputedQrl,
@@ -25,8 +25,8 @@ import {
2525
type ComputedSignal,
2626
type SerializerSignal,
2727
type Signal,
28-
} from './signal.public';
29-
import { getSubscriber } from './subscriber';
28+
} from '../signal.public';
29+
import { getSubscriber } from '../subscriber';
3030

3131
class Foo {
3232
constructor(public val: number = 0) {}

packages/qwik/src/core/reactive-primitives/store.ts renamed to packages/qwik/src/core/reactive-primitives/impl/store.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import { pad, qwikDebugToString } from '../debug';
2-
import { assertTrue } from '../shared/error/assert';
3-
import { tryGetInvokeContext } from '../use/use-core';
4-
import { isSerializableObject } from '../shared/utils/types';
5-
import type { Container } from '../shared/types';
1+
import { pad, qwikDebugToString } from '../../debug';
2+
import { assertTrue } from '../../shared/error/assert';
3+
import { tryGetInvokeContext } from '../../use/use-core';
4+
import { isSerializableObject } from '../../shared/utils/types';
5+
import type { Container } from '../../shared/types';
66
import {
77
addQrlToSerializationCtx,
88
ensureContainsBackRef,
99
ensureContainsSubscription,
1010
triggerEffects,
11-
} from './signal';
11+
} from '../utils';
1212
import {
1313
STORE_ALL_PROPS,
1414
STORE_HANDLER,
1515
STORE_TARGET,
1616
StoreFlags,
1717
type EffectSubscription,
1818
type StoreTarget,
19-
} from './types';
19+
} from '../types';
2020

2121
const DEBUG = false;
2222

packages/qwik/src/core/reactive-primitives/store.unit.tsx renamed to packages/qwik/src/core/reactive-primitives/impl/store.unit.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { getDomContainer, implicit$FirstArg, type QRL } from '@qwik.dev/core';
22
import { createDocument, getTestPlatform } from '@qwik.dev/core/testing';
33
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
4-
import type { Container, HostElement } from '../shared/types';
4+
import type { Container, HostElement } from '../../shared/types';
55
import { getOrCreateStore, isStore } from './store';
6-
import { EffectProperty, StoreFlags } from './types';
7-
import { invoke } from '../use/use-core';
8-
import { newInvokeContext } from '../use/use-core';
9-
import { ChoreType } from '../shared/util-chore-type';
10-
import type { QRLInternal } from '../shared/qrl/qrl-class';
11-
import { Task } from '../use/use-task';
12-
import { getSubscriber } from './subscriber';
6+
import { EffectProperty, StoreFlags } from '../types';
7+
import { invoke } from '../../use/use-core';
8+
import { newInvokeContext } from '../../use/use-core';
9+
import { ChoreType } from '../../shared/util-chore-type';
10+
import type { QRLInternal } from '../../shared/qrl/qrl-class';
11+
import { Task } from '../../use/use-task';
12+
import { getSubscriber } from '../subscriber';
1313

1414
describe('v2/store', () => {
1515
const log: any[] = [];

packages/qwik/src/core/reactive-primitives/impl/wrapped-signal-impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { QError, qError } from '../../shared/error/error';
33
import type { Container, HostElement } from '../../shared/types';
44
import { ChoreType } from '../../shared/util-chore-type';
55
import { trackSignal } from '../../use/use-core';
6-
import { triggerEffects } from '../signal';
7-
import type { BackRef } from '../signal-cleanup';
6+
import { triggerEffects } from '../utils';
7+
import type { BackRef } from '../cleanup';
88
import type { AllSignalFlags, EffectSubscription } from '../types';
99
import {
1010
_EFFECT_BACK_REF,

0 commit comments

Comments
 (0)