Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: infinite wildcard export parse while circular reference occur #611

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KyLeoHC
Copy link
Contributor

@KyLeoHC KyLeoHC commented Feb 21, 2023

假如有以下3个文件:
文件1,导出A1和A2

// components/index.ts
export * from './A1';
export * from './A2';

文件A1

// A1.tsx
import React from "react";
export const A1 = () => <div>A1</div>;

文件A2

// A2.tsx
import React from "react";
import { A1 } from 'components';
export const A2 = () => <div>A2<A1/></div>;

此时A2和A1发生间接循环引用(中间是index.ts文件),原先处理export * from xxx的代码,针对这种场景会陷入死循环,需要判断处理下。

@vercel
Copy link

vercel bot commented Feb 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
garfish ✅ Ready (Inspect) Visit Preview Feb 21, 2023 at 9:36AM (UTC)

@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Base: 82.83% // Head: 82.80% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (07462f5) compared to base (375d420).
Patch coverage: 73.91% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #611      +/-   ##
==========================================
- Coverage   82.83%   82.80%   -0.04%     
==========================================
  Files          90       90              
  Lines       12387    12400      +13     
  Branches     1906     1907       +1     
==========================================
+ Hits        10261    10268       +7     
- Misses       2109     2115       +6     
  Partials       17       17              
Impacted Files Coverage Δ
packages/core/src/module/esModule.ts 85.44% <73.91%> (-1.02%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant