-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Local packages named by *.git extension are handled as remote sources instead local ones. #3670
Comments
I'm going to try to work on this issue on the next week. |
Hey, I'm also one other person that's helping with the bug. The problem seems to be with /util/git.js. However, I can't reproduce the bug in the state that the reported sent it. Now, it seems that it tries to run ls-remote first. We've since tried to fix it, but it seems we're not getting consistent results. See here: https://github.com/rafaeldamasceno/yarn/commit/d17a77b1d8bce6e209a309ea176e6a1a9e853b70 It seems that with these changes, we now can successfully clone the repository, but there were some instances where we had some errors and we aren't quite sure how to fix them. Also, it seems that after yarn caches the repository, it doesn't quite verify if it has been updated. Maybe this is intended behaviour and it only checks for versions bumps? We'd like some input before we submit a pull request. |
Allow "git_file:" dependency protocol to use a local un-pushed git repo as a dependency. Fix bug where local directories named "*.git" were treated as git dependencies fixes yarnpkg#3670 yarnpkg#5017
Isn't this issue closed by the above PR? |
@tiagoboldt the above PR is for my own fork's branch. #5026 is still pending review for merging into master. |
* First step in fixing local repositories ended with .git * Corrected comment and removed unnecessary hostname. * Readd hostname. * Add unit test for local .git repositories. * Use FILE_PROTOCOL const. * feat(resolution): When using a local git repo, use `git show-ref` instead of `ls-remote` When using a local git repo, use `git show-ref` instead of `ls-remote` so that un-pushed refs can be found. fixes #5017 * Restore full path for local repositories. * Update test to match logic. * feat(resolution): Allow "git+file:" dependency url protocol. Allow "git_file:" dependency protocol to use a local un-pushed git repo as a dependency. Fix bug where local directories named "*.git" were treated as git dependencies fixes #3670 #5017 * fix a failing test * fix(test): Remove invalid test
Do you want to request a feature or report a bug?
This is a bug report.
What is the current behavior?
In package.json:
"myBackendModule": "file:../myBackendModule.git"
Renaming the folder to myBackendModule.got, it works. But on next checkout, it fails again, because the repos are named *.git.
If the current behavior is a bug, please provide the steps to reproduce.
Link a local package which name has git as extension.
In our enterprise, the git extension is default to show that the package comes from our git repository.
What is the expected behavior?
If the path is declared by "file" or if it's a relative path without server name, dont use the remote method but the local file access.
Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: