From f0b16890ee000b677b41fa05a58c66fac25cc315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20STEUNOU?= Date: Fri, 12 Jul 2024 11:45:39 +0200 Subject: [PATCH] fix: transformer signature has changed --- packages/vue/src/compiler/transformer.ts | 2 +- packages/vue/src/extractor/extractor.ts | 2 +- packages/vue/src/test/utils.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vue/src/compiler/transformer.ts b/packages/vue/src/compiler/transformer.ts index 4789916ce..a0ebecfd6 100644 --- a/packages/vue/src/compiler/transformer.ts +++ b/packages/vue/src/compiler/transformer.ts @@ -22,7 +22,7 @@ export type LinguiTransformerOptions = { * */ export const transformer = - (options: LinguiTransformerOptions): NodeTransform => + (options: LinguiTransformerOptions = {}): NodeTransform => (node, context) => { if ( node.type === NodeTypes.ROOT && diff --git a/packages/vue/src/extractor/extractor.ts b/packages/vue/src/extractor/extractor.ts index 32cd66776..718f2a90a 100644 --- a/packages/vue/src/extractor/extractor.ts +++ b/packages/vue/src/extractor/extractor.ts @@ -42,7 +42,7 @@ export const vueExtractor: ExtractorType = { comments: true, isTS: isTsBlock(descriptor.script) || isTsBlock(descriptor.scriptSetup), - nodeTransforms: [transformer], + nodeTransforms: [transformer()], }, }) diff --git a/packages/vue/src/test/utils.ts b/packages/vue/src/test/utils.ts index 60ef287a9..59376c84d 100644 --- a/packages/vue/src/test/utils.ts +++ b/packages/vue/src/test/utils.ts @@ -24,7 +24,7 @@ export function run(source: string) { bindingMetadata: { Trans: BindingTypes.SETUP_MAYBE_REF, }, - nodeTransforms: [transformer], + nodeTransforms: [transformer()], }, }) }