|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
/** @import { Context } from '../types' */
|
|
|
|
|
import { dev, is_ignored } from '../../../../state.js';
|
|
|
|
|
import * as b from '#compiler/builders';
|
|
|
|
|
import { get_rune } from '../../../scope.js';
|
|
|
|
|
import { get_rune, UNKNOWN } from '../../../scope.js';
|
|
|
|
|
import { transform_inspect_rune } from '../../utils.js';
|
|
|
|
|
import { should_proxy } from '../utils.js';
|
|
|
|
|
|
|
|
|
@ -82,7 +82,9 @@ export function CallExpression(node, context) {
|
|
|
|
|
['debug', 'dir', 'error', 'group', 'groupCollapsed', 'info', 'log', 'trace', 'warn'].includes(
|
|
|
|
|
node.callee.property.name
|
|
|
|
|
) &&
|
|
|
|
|
node.arguments.some((arg) => arg.type === 'SpreadElement' || !context.state.scope.evaluate(arg).is_known)
|
|
|
|
|
node.arguments.some(
|
|
|
|
|
(arg) => arg.type === 'SpreadElement' || !context.state.scope.evaluate(arg).values.has(UNKNOWN)
|
|
|
|
|
)
|
|
|
|
|
) {
|
|
|
|
|
return b.call(
|
|
|
|
|
node.callee,
|
|
|
|
|