ts-import-types-cli icon indicating copy to clipboard operation
ts-import-types-cli copied to clipboard

How to submit failing / unexpected transforms

Open jfsiii opened this issue 3 years ago • 0 comments

I ran this on a project recently and hit a few types of failing or unexpected behavior. I don't know how best to iterate on this so I figured I'll submit a few steps & screenshots and we can decide split them into new tickets or whatever.

  1. After working around #1, it ran successfully Screen Shot 2021-02-26 at 10 28 47 AM

  2. but failed a lint check with 2 types of errorsScreen Shot 2021-02-26 at 11 15 48 AM

  3. The parsing error was due to this (note import { "path/to/file" ...)Screen Shot 2021-02-26 at 11 17 12 AM

  4. The "restricted path" errors were because a transform lost a comment that was above it Screen Shot 2021-02-26 at 11 25 38 AM

After that, I went through the changes and found a found a few patterns of errors

Duplicate/repeated member imports Screen Shot 2021-02-26 at 12 25 31 PM Screen Shot 2021-02-26 at 11 46 04 AM Screen Shot 2021-02-26 at 11 53 19 AM

Lost members Screen Shot 2021-02-26 at 12 01 02 PM

Lost `import * as` Screen Shot 2021-02-26 at 11 51 28 AM Screen Shot 2021-02-26 at 12 09 19 PM Screen Shot 2021-02-26 at 12 11 31 PM

I'm not sure what correct behavior is for 4. It wasn't hard to fix, just pointing it out. That said,

I don't understand this comment move Screen Shot 2021-02-26 at 12 07 15 PM

There might be 5-20 different examples for the lost import and duplicated members patterns. There might be some others, but let's start with these few. Let me know where and how best I can help and I'm glad to do it.

Thanks for this. Even with these issues it was still very useful.

jfsiii avatar Mar 03 '21 16:03 jfsiii