Merge mozilla/dispensary into this project#4006
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4006 +/- ##
==========================================
+ Coverage 98.72% 98.73% +0.01%
==========================================
Files 52 55 +3
Lines 2658 2683 +25
Branches 802 808 +6
==========================================
+ Hits 2624 2649 +25
Misses 34 34
Continue to review full report at Codecov.
|
|
On second thought, I think this is great and makes mozilla/dispensary#864 much easier. The problem in that issue was how to deal with the change of package type on |
|
Requesting pre-reviews to answer a few questions:
|
|
This looks good to me overall. I'm all for simplifying things, the command stuff was a bit hard to read if you aren't familiar with the code. Let's also try and keep this low effort. |
Thanks. Yeah, I am not sure we need to keep the existing CLI stuff. We might not even need |
a1f71b7 to
30cb87c
Compare
The second commit should do what you're describing here. |
0591c80 to
c0a2f9a
Compare
Ah I see, that makes sense to me. There are only two commands, of which the |
fregante
left a comment
There was a problem hiding this comment.
The second commit should do what you're describing here.
Yessss, LGTM. If merged, it would close:
|
The third commit simplifies the dispensary "updater". |
I can probably write some more tests to reach 100%. |
|
@wagnerand @rpl this is now ready for a review. Each commit should be self-contained, which should help understand which changes have been made (the first one being almost 1:1 as mentioned in the PR description). The subsequent changes were actually useful to reduce the overall diff. |
wagnerand
left a comment
There was a problem hiding this comment.
Looks great to me overall, got a few questions here and there.
Great job! 👏 🏆
85bedb0 to
eab90bb
Compare
|
(rebased) |
rpl
left a comment
There was a problem hiding this comment.
@willdurand Thank you so much for having looked into this, I'm looking forward to the reductions of the node_modules/ size in web-ext too as a side effect of this changes 🥳
This looks pretty great to me, I do have only two small changes to request described below (the one related to the list of urls in the README does not really matter that much, the other two are the ones I mainly care about, they should both require only some small tweaks to what is already in this PR).
1154859 to
9dd20ee
Compare
|
I think I addressed all the comments (correctly). The command continues to work, tests pass, all other checks seem OK too. r? |
a02f0bf to
17713d8
Compare
Fixes #869
Closes mozilla/dispensary#864
Closes #3601
First commit: This is an almost 1:1 import of mozilla/dispensary, with tests, docs and the CLI (
scripts/dispensary). Except one test case indispensary/test.index.js(for the cached libraries, rewritten using async/await and jest spyOn), only Prettier has been applied and paths have been adjusted. There is no other code change.Second commit: Split the logic of the dispensary so that we have a "runtime" piece for addons-linter and another piece (updater) to update the dispensary hashes using
scripts/dispensary.Third commit: Simplify the dispensary updater to only do one thing: compute the hashes for the libraries in the json file, and output that to stdout.
Fourth commit: Removes
requestdep, replaced bynode-fetch.Fifth commit: Improves test coverage. Should be good now.
Last commit: add npm script to update the hashes.txt file