-
Notifications
You must be signed in to change notification settings - Fork 80
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
Updating imports without moving files #70
Comments
Do you have an idea of how we could check who's importing a specific file from |
I think we need 2 inputs from the user
Sometimes these values are the same, sometimes they are different |
That looks like solving the issue. Input either as a config file or parameters. |
What if by default we check up to the root for a project, and run it for the top level It's a pretty sane default IMO. would work for these cases: # single repo
/home/user/documents/
project/
src/
# files...
tests/
# files..
package.json # monorepo
/home/user/documents/
project-monorepo/
packages/
project-1/
src/
# files...
tests/
# files..
package.json
project-2/
src/
# files...
tests/
# files..
package.json
package.json
|
I think we should only change files that the user allows us to change. If the user points at a path we should only take that path into consideration. |
I think that destiny should assume as much as possible and ask a few questions first time. Zeit now style Assume that root is package.json is but ask for conf. |
I would like this to be like the example I've mentioned, so it works with workspaces (searching up the tree for package.json).
And add a CLI flag, maybe
If everything can be moved, I thought it might be risky. But since the user will dry run first, it wouldn't be so risky I think that the CLI could display the folder structure it changes and then list all paths changes that aren't in the root. |
Just thought about a |
Hey 👋,
One issue we're having is that when you run
destiny
on thesrc
folder we fix the imports but not on other folders that also import those files like atest
folder. This issue is a bit tricky as one might argue that if we specify only thesrc
folder it should only restructure and fix thesrc
folder.I do think that most people would assume that the imports in test was fixed too. If you run
destiny
on itself you have to, in many cases, manually go and repair the test imports.The text was updated successfully, but these errors were encountered: