JamieMason / JamieMason/ts-import-types-cli

How to submit failing / unexpected transforms

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
42
Forks
3
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Start by reproducing the reported TypeScript CLI transforms, then separate the parsing, restricted-path, duplicate-import, lost-member, lost namespace-import, and comment behaviors into distinct cases. Done means each case has clear expected and actual behavior suitable for a focused ticket.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.