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(importType): Accept '@example' as internal #1493

Merged
merged 1 commit into from
Dec 6, 2019
Merged

fix(importType): Accept '@example' as internal #1493

merged 1 commit into from
Dec 6, 2019

Conversation

AamuLumi
Copy link
Contributor

@AamuLumi AamuLumi commented Oct 1, 2019

Hi !

Fix #1379

The bug was related to the internal regex which didn't accept a module with only one word.
This is the case in Typescript when you use the tconfig paths to accept the import of @myModule in replacement of /src/someFolder/myModule.

Thanks for developing this library!

@coveralls
Copy link

coveralls commented Oct 1, 2019

Coverage Status

Coverage decreased (-0.3%) to 96.162% when pulling 2d3d045 on AamuLumi:master into 0426f16 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.0%) to 96.32% when pulling ff8e516 on AamuLumi:master into 5e143b2 on benmosher:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+1.0%) to 96.32% when pulling ff8e516 on AamuLumi:master into 5e143b2 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.0%) to 96.32% when pulling ff8e516 on AamuLumi:master into 5e143b2 on benmosher:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.0%) to 96.32% when pulling ff8e516 on AamuLumi:master into 5e143b2 on benmosher:master.

src/core/importType.js Show resolved Hide resolved
@@ -96,7 +98,6 @@ describe('importType(name)', function () {
})

it("should return 'unknown' for any unhandled cases", function() {
expect(importType('@malformed', context)).to.equal('unknown')
Copy link
Member

Choose a reason for hiding this comment

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

why does this need to be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@malformed is not anymore an unhandled case. This is the purpose of this PR to accept @foo pattern.
The test has been replaced by this one.

@Menci

This comment has been minimized.

@ljharb

This comment has been minimized.

@Menci

This comment has been minimized.

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

Successfully merging this pull request may close these issues.

[import/order]: Typescript path incorrect groups
4 participants