1
0
mirror of synced 2026-04-03 06:28:35 +08:00

chore: 更新依赖

This commit is contained in:
roymondchen
2024-05-09 19:58:48 +08:00
parent c665bf3ccc
commit ff60d0238b
22 changed files with 2151 additions and 3321 deletions

View File

@@ -340,7 +340,7 @@ const getASTTokenByTraverse = ({ ast, indexPath }: { ast: any; indexPath: string
if (specifiers?.length === 1 && source.value) {
const name = specifiers?.[0].local?.name;
if (name) {
if (typeof name === 'string') {
importSpecifiersMap[name] = source.value as string;
}
}
@@ -352,14 +352,16 @@ const getASTTokenByTraverse = ({ ast, indexPath }: { ast: any; indexPath: string
const { specifiers, source, declaration } = node;
if (specifiers?.length === 1 && source?.value) {
const name = specifiers?.[0]?.exported.name.toLowerCase();
if (name) {
exportSpecifiersMap[name] = source.value as string;
const name = specifiers?.[0]?.exported.name;
if (typeof name === 'string') {
exportSpecifiersMap[name.toLowerCase()] = source.value as string;
}
} else {
specifiers?.forEach((specifier) => {
const name = specifier.exported.name.toLowerCase();
exportSpecifiersMap[name] = undefined;
const { name } = specifier.exported;
if (typeof name === 'string') {
exportSpecifiersMap[name.toLowerCase()] = undefined;
}
});
(declaration as any)?.declarations.forEach((declare: any) => {
const { id, init } = declare;