Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix a couple ofno-cycle bugs#2083

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ljharb merged 2 commits intoimport-js:masterfromcherryblossom000:no-cycle-fixes
May 18, 2021
Merged

Fix a couple ofno-cycle bugs#2083

ljharb merged 2 commits intoimport-js:masterfromcherryblossom000:no-cycle-fixes
May 18, 2021

Conversation

cherryblossom000
Copy link
Contributor

This fixes these two bugs:

// a.ts// false positive: reports a cycle even though b.ts is only importing typesimport{foo}from'./b'// b.tsimporttype{Bar}from'./a'
// a.js//@flow// false negative: doesn't report a cycle even though b.js is importing the value barimport{foo}from'./b'// b.js//@flowimport{bar,typeBaz}from'./a'

There isn't an open issue for these, but these issues were relatively quick and easy for me to fix so I don't really mind if this PR gets rejected. Also, these bugs were introduced by me in#1974 (oops), so I wanted to fix them.

If you would like me to split these two bug fixes into two PRs, I'm more than happy to do that as well.

raycharius, ljharb, and Nokel81 reacted with thumbs up emoji
…es of importing fileThis fixes this situation:`a.ts`:```tsimport { foo } from './b'````b.ts`:```tsimport type { Bar } from './a'```Previously, `no-cycle` would have incorrectly reported a dependency cycle for the import in `a.ts`,even though `b.ts` is only importing types from `a.ts`.
…mporting a value in FlowThis fixes this situation:`a.js`:```jsimport { foo } from './b'````b.js`:```js//@flowimport { bar, type Baz } from './a'```Previously, `no-cycle` would have not reported a dependency cycle for the import in `a.js`, eventhough `b.js` is importing `bar`, which is not a type import, from `a.js`. This commit fixes that.
@coveralls
Copy link

coveralls commentedMay 17, 2021
edited
Loading

Coverage Status

Coverage increased (+1.0%) to 82.434% when pulling72b9c3d on cherryblossom000:no-cycle-fixes into3cf913d on benmosher:master.

Copy link
Member

@ljharbljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Seems good, thanks!

@ljharbljharb merged commit72b9c3d intoimport-js:masterMay 18, 2021
@cherryblossom000cherryblossom000 deleted the no-cycle-fixes branchMay 18, 2021 21:20
@Nokel81
Copy link
Contributor

I am wondering when a new patch release will happen. I would like to useno-cycle in my codebase but we would rely heavily on this bug fix. Thanks.

@ljharb
Copy link
Member

v2.23.3 is released.

Nokel81 and cherryblossom000 reacted with hooray emoji

@Nokel81
Copy link
Contributor

Thank you very much

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ljharbljharbljharb approved these changes

Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@cherryblossom000@coveralls@Nokel81@ljharb

[8]ページ先頭

©2009-2025 Movatter.jp