From f83d9c4ed8e6fe5fef7eb7605f3c83abdf29efa0 Mon Sep 17 00:00:00 2001 From: Andrey Yolkin Date: Sun, 27 Aug 2023 00:47:17 +0300 Subject: [PATCH] fix: typo in `normalizeComponentInfo` method name (#684) --- src/core/context.ts | 4 ++-- src/core/utils.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/context.ts b/src/core/context.ts index 26d8fd0b..c16ea096 100644 --- a/src/core/context.ts +++ b/src/core/context.ts @@ -6,7 +6,7 @@ import type { UpdatePayload, ViteDevServer } from 'vite' import { slash, throttle, toArray } from '@antfu/utils' import type { ComponentInfo, Options, ResolvedOptions, Transformer } from '../types' import { DIRECTIVE_IMPORT_PREFIX } from './constants' -import { getNameFromFilePath, matchGlobs, normalizeComponetInfo, parseId, pascalCase, resolveAlias } from './utils' +import { getNameFromFilePath, matchGlobs, normalizeComponentInfo, parseId, pascalCase, resolveAlias } from './utils' import { resolveOptions } from './options' import { searchComponents } from './fs/glob' import { writeDeclaration } from './declaration' @@ -239,7 +239,7 @@ export class Context { else { info = { as: name, - ...normalizeComponetInfo(result), + ...normalizeComponentInfo(result), } } if (type === 'component') diff --git a/src/core/utils.ts b/src/core/utils.ts index 660da5bc..0881b51d 100644 --- a/src/core/utils.ts +++ b/src/core/utils.ts @@ -86,7 +86,7 @@ export function stringifyImport(info: ImportInfo | string) { return `import ${info.as} from '${info.from}'` } -export function normalizeComponetInfo(info: ImportInfo | ImportInfoLegacy | ComponentInfo): ComponentInfo { +export function normalizeComponentInfo(info: ImportInfo | ImportInfoLegacy | ComponentInfo): ComponentInfo { if ('path' in info) { return { from: info.path,