Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
hasNamedImportInImportDeclaration
util to check all named impor…
…ts (#2060) <!-- How to write a good PR title: - Follow [the Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). - Give as much context as necessary and as little as possible - Prefix it with [WIP] while it’s a work in progress --> ## Self Checklist - [x] I wrote a PR title in **English** and added an appropriate **label** to the PR. - [x] I wrote the commit message in **English** and to follow [**the Conventional Commits specification**](https://www.conventionalcommits.org/en/v1.0.0/). - [x] I [added the **changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md) about the changes that needed to be released. (or didn't have to) - [x] I wrote or updated **documentation** related to the changes. (or didn't have to) - [x] I wrote or updated **tests** related to the changes. (or didn't have to) - [x] I tested the changes in various browsers. (or didn't have to) - Windows: Chrome, Edge, (Optional) Firefox - macOS: Chrome, Edge, Safari, (Optional) Firefox ## Related Issue <!-- Please link to issue if one exists --> <!-- Fixes #0000 --> - None ## Summary <!-- Please brief explanation of the changes made --> - `hasNamedImportInImportDeclaration` 함수는 특정 import 문에서 named import 가 있는지 확인하는 함수입니다. 그런데 가장 첫번째로 나오는 import 문만 확인하고 있어서 아래처럼 import 문이 2번 나오는 경우에는 결과가 잘못 나오는 버그가 있어서 이를 수정합니다. ```tsx import { type IconProps } from '@channel.io/bezier-react' import { OverlayPosition } from '@channel.io/bezier-react' console.log(hasNamedImportInImportDeclaration(sourceFile, 'OverlayPosition', '@channel.io/bezier-react') // false, but should be true ``` ### Breaking change? (Yes/No) <!-- If Yes, please describe the impact and migration path for users --> - No ## References <!-- Please list any other resources or points the reviewer should be aware of --> - None
- Loading branch information