Skip to content

Commit 38bc989

Browse files
committed
Fix snapshots
1 parent ceddf50 commit 38bc989

21 files changed

+115
-114
lines changed

packages/core/babel/components.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { NodePath, Visitor } from '@babel/traverse';
22
import * as t from '@babel/types';
3-
import getImportIdentifier from './core/get-import-identifier';
3+
import { getImportIdentifier } from './core/get-import-identifier';
44
import type { State } from './core/types';
55

66
type ComponentImport = [name: string, source: string];
@@ -84,7 +84,7 @@ const COMPONENT_TRAVERSE: Visitor<State> = {
8484
},
8585
};
8686

87-
export default function transformComponents(
87+
export function transformComponents(
8888
state: State,
8989
path: NodePath,
9090
): void {

packages/core/babel/core/accessor-variable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type * as babel from '@babel/core';
22
import * as t from '@babel/types';
3-
import derefMemo from './deref-memo';
3+
import { derefMemo } from './deref-memo';
44
import { generateUniqueName } from './generate-unique-name';
55

6-
export default function accessorVariable(
6+
export function accessorVariable(
77
path: babel.NodePath,
88
accessorIdentifier: t.Identifier,
99
callee: t.Identifier,

packages/core/babel/core/assert.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
export default function assert<T extends Error>(
2-
cond: unknown,
3-
error: T,
4-
): asserts cond {
1+
export function assert<T extends Error>(cond: unknown, error: T): asserts cond {
52
if (!cond) {
63
throw error;
74
}

packages/core/babel/core/deferred-variable.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type * as babel from '@babel/core';
22
import * as t from '@babel/types';
3-
import accessorVariable from './accessor-variable';
4-
import getImportIdentifier from './get-import-identifier';
3+
import { accessorVariable } from './accessor-variable';
4+
import { getImportIdentifier } from './get-import-identifier';
55
import type { State } from './types';
66

7-
export default function deferredVariable(
7+
export function deferredVariable(
88
state: State,
99
path: babel.NodePath,
1010
deferredIdentifier: t.Identifier,

packages/core/babel/core/deref-memo-variable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type * as babel from '@babel/core';
22
import * as t from '@babel/types';
3-
import derefMemo from './deref-memo';
3+
import { derefMemo } from './deref-memo';
44
import { generateUniqueName } from './generate-unique-name';
55

6-
export default function derefMemoVariable(
6+
export function derefMemoVariable(
77
path: babel.NodePath,
88
memoIdentifier: t.Identifier,
99
stateIdentifier: t.Expression,

packages/core/babel/core/deref-memo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type * as babel from '@babel/core';
22
import * as t from '@babel/types';
3-
import assert from './assert';
3+
import { assert } from './assert';
44
import { unexpectedType } from './errors';
55
import { addProtoGetter } from './proto';
6-
import unwrapNode, { getProperParentPath } from './unwrap-node';
6+
import { getProperParentPath, unwrapNode } from './unwrap-node';
77

88
const REF_MEMO_CTF = '$refMemo';
99
const GET_CTF = '$get';
@@ -67,7 +67,7 @@ function transformReferencePath(
6767
return true;
6868
}
6969

70-
export default function derefMemo(
70+
export function derefMemo(
7171
path: babel.NodePath,
7272
memoIdentifier: t.Identifier,
7373
readIdentifier: t.Identifier,

packages/core/babel/core/deref-signal-variable.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type * as babel from '@babel/core';
22
import * as t from '@babel/types';
3-
import derefSignal from './deref-signal';
3+
import { derefSignal } from './deref-signal';
44
import { generateUniqueName } from './generate-unique-name';
55

6-
export default function derefSignalVariable(
6+
export function derefSignalVariable(
77
path: babel.NodePath,
88
signalIdentifier: t.Identifier,
99
stateIdentifier: t.Expression,

packages/core/babel/core/deref-signal.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import type * as babel from '@babel/core';
22
import * as t from '@babel/types';
3-
import assert from './assert';
3+
import { assert } from './assert';
44
import { unexpectedType } from './errors';
55
import { generateUniqueName } from './generate-unique-name';
6-
import isAwaited from './is-awaited';
7-
import isYielded from './is-yielded';
6+
import { isAwaited } from './is-awaited';
7+
import { isYielded } from './is-yielded';
88
import { addProtoGetter, addProtoProperty, addProtoSetter } from './proto';
9-
// import isInTypeScript from './is-in-typescript';
10-
import unwrapNode, { getProperParentPath, isPathValid } from './unwrap-node';
9+
import { getProperParentPath, isPathValid, unwrapNode } from './unwrap-node';
1110

1211
const REF_SIGNAL_CTF = '$refSignal';
1312
const GET_CTF = '$get';
@@ -220,7 +219,7 @@ function transformSignalWrite(
220219
}
221220
}
222221

223-
export default function derefSignal(
222+
export function derefSignal(
224223
path: babel.NodePath,
225224
signalIdentifier: t.Identifier,
226225
readIdentifier: t.Identifier,

packages/core/babel/core/destructure-variable.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import type * as babel from '@babel/core';
22
import * as t from '@babel/types';
3-
import derefMemo from './deref-memo';
3+
import { derefMemo } from './deref-memo';
44
import { unexpectedType } from './errors';
55
import { generateUniqueName } from './generate-unique-name';
6-
import getImportIdentifier from './get-import-identifier';
7-
import isStatic from './is-static';
6+
import { getImportIdentifier } from './get-import-identifier';
7+
import { isStatic } from './is-static';
88
import type { State } from './types';
9-
import unwrapNode from './unwrap-node';
9+
import { unwrapNode } from './unwrap-node';
1010

11-
export default function destructureVariable(
11+
export function destructureVariable(
1212
state: State,
1313
path: babel.NodePath,
1414
target: t.Expression,

packages/core/babel/core/is-awaited.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import * as t from '@babel/types';
22

3-
export default function isAwaited(
4-
node: t.Expression | t.SpreadElement,
5-
): boolean {
3+
export function isAwaited(node: t.Expression | t.SpreadElement): boolean {
64
// Default
75
if (t.isAwaitExpression(node)) {
86
return true;

0 commit comments

Comments
 (0)