Skip to content

Commit a755f2d

Browse files
d-gubertclaude
andcommitted
fix(apps): resolve dangling acorn type imports in node-runtime
After the declaration shims were removed, operations.ts still imported two names that only existed in those shims: `AcornFunction` (the real acorn export is `Function`) and `FullAncestorWalkerCallbackWithState` (the real acorn-walk export is `FullAncestorWalkerCallback`). Point the imports at the real package exports so the AST module typechecks. Types-only change; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 0376b25 commit a755f2d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

packages/apps/node-runtime/src/lib/ast/operations.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import type {
22
AnyNode,
33
AssignmentExpression,
4-
AcornFunction as Function,
4+
Function,
55
AwaitExpression,
66
Expression,
77
Identifier,
88
MethodDefinition,
99
Property,
1010
} from 'acorn';
11-
import type { FullAncestorWalkerCallbackWithState } from 'acorn-walk';
11+
import type { FullAncestorWalkerCallback } from 'acorn-walk';
1212

1313
export type WalkerState = {
1414
isModified: boolean;
@@ -107,7 +107,7 @@ export function asyncifyScope(ancestors: AnyNode[], state: WalkerState) {
107107
state.functionIdentifiers.add(identifier);
108108
}
109109

110-
export function buildFixModifiedFunctionsOperation(functionIdentifiers: Set<string>): FullAncestorWalkerCallbackWithState<WalkerState> {
110+
export function buildFixModifiedFunctionsOperation(functionIdentifiers: Set<string>): FullAncestorWalkerCallback<WalkerState> {
111111
return function _fixModifiedFunctionsOperation(node, state, ancestors) {
112112
if (node.type !== 'CallExpression') return;
113113

@@ -146,7 +146,7 @@ export function buildFixModifiedFunctionsOperation(functionIdentifiers: Set<stri
146146
};
147147
}
148148

149-
export const checkReassignmentOfModifiedIdentifiers: FullAncestorWalkerCallbackWithState<WalkerState> = (
149+
export const checkReassignmentOfModifiedIdentifiers: FullAncestorWalkerCallback<WalkerState> = (
150150
node,
151151
{ functionIdentifiers },
152152
_ancestors,
@@ -190,7 +190,7 @@ export const checkReassignmentOfModifiedIdentifiers: FullAncestorWalkerCallbackW
190190
}
191191
};
192192

193-
export const fixLivechatIsOnlineCalls: FullAncestorWalkerCallbackWithState<WalkerState> = (node, state, ancestors) => {
193+
export const fixLivechatIsOnlineCalls: FullAncestorWalkerCallback<WalkerState> = (node, state, ancestors) => {
194194
if (node.type !== 'MemberExpression' || node.computed) return;
195195

196196
if ((node.property as Identifier).name !== 'isOnline') return;
@@ -222,7 +222,7 @@ export const fixLivechatIsOnlineCalls: FullAncestorWalkerCallbackWithState<Walke
222222
state.isModified = true;
223223
};
224224

225-
export const fixRoomUsernamesCalls: FullAncestorWalkerCallbackWithState<WalkerState> = (node, state, ancestors) => {
225+
export const fixRoomUsernamesCalls: FullAncestorWalkerCallback<WalkerState> = (node, state, ancestors) => {
226226
if (node.type !== 'MemberExpression' || node.computed) return;
227227

228228
if ((node.property as Identifier).name !== 'usernames') return;

0 commit comments

Comments
 (0)