-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
LockFile Feature #1748
LockFile Feature #1748
Conversation
…dependencies in the existing lock file
…for save to update lockfile
@sheerun - So, when running |
@sheerun bump for the question above... 😄 |
@kodypeterson Sorry for the delay. Yes, indeed it should do the same as |
@sheerun any thoughts on the lock file being .bower.lock instead of bower.lock? Just wondering if we really want to make it a non-dot file... |
Also, I noticed that most of the update tests are invalid as they call tempDir.prepare({JSON}) after the install. Which .prepare will remove all of the contents in the directory. So, when update runs, it is running against an empty directory with no dependencies installed, so it just acts like |
How should bower link be handled, it in turn calls bower update? Should it follow the same rules as bower update? |
I think we don't need to worry about it. |
@kodypeterson Great work on this. As @sheerun mentioned before, is it possible to squash this into meaningful commits and rebase against master? It's hard to review in its current state. |
@Utsav2 Could you do it instead and send another PR? |
If you need any help with testing, please feel free to message me. |
For what it's worth shrinkwrap functionality is available using bower-shrinkwrap-resolver. You might find it useful until this PR gets merged in. |
Alright @sheerun what are we going to do with this one? We missed the birthday celebration of this PR... Soon, it will be 2 years old. It now has a bunch of conflicts, which I can work to resolve. Are the requirements above still accurate? If so, I can work to get a new PR started. If not, can we get a new issue opened with the correct requirements laid out so I can get to work on it. We need to get this functionality into bower. It is very obvious the demand for it, and I am here to make it happen! Just let me know what I can do to get this going again! PS: Sorry for dropping the ball on this PR, it sort of fell of my radar. |
@kodypeterson To release it as quickly as possible we'd need to put it in current 1.x version of bower, and make it backward compatible (opt-in). What sounds reasonable is:
If we ever release 2.0, we set As for lock itself, I see it contains few extra keys we don't want, especially they contain absolute paths:
Also, we need to put version of bower it was packaged with to
I've also encountered an error when installing local package without bower.json:
I can do more testing if we you manage to fix those. Thank you for being interested in continuing your work. |
@kodypeterson Also, then I did "bower install angular-route", only "angular-route" got saved to bower.lock, while it should also contain "angular". |
@sheerun I am on it, I will see what I can get through this weekend along with cleanup and such! |
@Utsav2 awesome! i will see what I can get from that. I have a feeling that both being so long ago the merge process is going to be a rough one. I might just need to cherry pick manually the changes in and maybe reorganize a bit. Thanks for the reference though! |
@kodypeterson need any help? |
Maybe a better route is to fix bower support in https://yarnpkg.com/ that already has file locking |
@sheerun I'm not entirely sure how practical that is; we're using PureScript which leverages Bower for dependency management and it looks like support for Bower in Yarn is really just in its infancy e.g. yarnpkg/yarn#896. Does this mean that you would no longer be willing to consider this patch? |
Maybe we could at least adopt lockfile format of yarn? |
For those who want to use lock feature before this PR merged, bower-locker is a workaround to generate lockfile and commit only Run following commands to achieve it:
or
then generate lock file based on existing
I want to express big thanks to @shawnlonas for writing this. Guys, let's give it stars if you find it useful https://github.com/infusionsoft/bower-locker |
Any news on this? Is it stalled out? |
Why is this PR open when there is #2100? |
Bower is depreacted now and we recommend switching to Yarn that supports version locking and more. Here's guide how to migrate: https://bower.io/blog/2017/how-to-migrate-away-from-bower/ |
Based on #1592