Navigation Menu

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

Destiny only treat import paths that start with a dot #87

Closed
AnatoleLucet opened this issue Feb 28, 2020 · 2 comments · Fixed by #90
Closed

Destiny only treat import paths that start with a dot #87

AnatoleLucet opened this issue Feb 28, 2020 · 2 comments · Fixed by #90
Labels
bug Something isn't working released

Comments

@AnatoleLucet
Copy link
Collaborator

AnatoleLucet commented Feb 28, 2020

Our regex only match with import paths that start with a dot.

That's an issue because destiny is trying to resolve this import's package name as a path:

import '..something';
// or
import '.something';

Also I don't think npm is allowing dots in packages name. But destiny should probably ignore this kind of import anyway...

See:
https://regexr.com/4vc8q

@AnatoleLucet AnatoleLucet added the bug Something isn't working label Feb 28, 2020
@AnatoleLucet AnatoleLucet changed the title Destiny require a ./ or a ../ in the import. Destiny only treat import paths that start with a dot Feb 28, 2020
@sQVe
Copy link
Collaborator

sQVe commented Feb 29, 2020

That should be solved easily. A tougher problem are cases where the project uses specific paths to resolve internal paths like /src och @app. This is getting more and more common in large codebases and it's something we need to support.

sQVe added a commit that referenced this issue Mar 2, 2020
@sQVe sQVe closed this as completed in #90 Mar 3, 2020
github-actions bot pushed a commit that referenced this issue Mar 4, 2020
# [0.4.0](v0.3.1...v0.4.0) (2020-03-04)

### Bug Fixes

* ensure path correctness ([f22f07f](f22f07f)), closes [#81](#81)
* extend linting ([039cadf](039cadf))
* fix new linting issues ([c19f2e5](c19f2e5))
* Fix time complexity when searching for common parent dir ([ce9915e](ce9915e))
* improve regex path matching ([ff9b19b](ff9b19b)), closes [#87](#87)
* support paths in config via include ([c049ceb](c049ceb))

### Features

* Add CLI flag to rename single files ([2de9ff1](2de9ff1))
@github-actions
Copy link

github-actions bot commented Mar 4, 2020

🎉 This issue has been resolved in version 0.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants