Closed relekang closed 7 years ago
@mxstbr This is starting to take shape 🎉
I am thinking that we should switch the database mocking with the memory adapter. I think the new setup broke the jest mocking of flat-file-db.
Merging #69 into master will decrease coverage by
1.92%
. The diff coverage is88.88%
.
@@ Coverage Diff @@
## master #69 +/- ##
==========================================
- Coverage 77.21% 75.28% -1.93%
==========================================
Files 8 10 +2
Lines 158 259 +101
Branches 38 44 +6
==========================================
+ Hits 122 195 +73
- Misses 34 59 +25
- Partials 2 5 +3
Impacted Files | Coverage Δ | |
---|---|---|
packages/adapter-utils/src/filtering.js | 100% <ø> (ø) |
|
packages/micro-analytics-cli/src/utils.js | 76.47% <ø> (ø) |
|
packages/micro-analytics-cli/src/index.js | 0% <ø> (ø) |
|
packages/micro-analytics-cli/src/sse.js | 83.33% <ø> (ø) |
|
packages/adapter-utils/src/index.js | 0% <0%> (ø) |
|
packages/adapter-utils/src/unit-tests.js | 74.75% <100%> (ø) |
|
packages/micro-analytics-cli/src/db.js | 94.44% <100%> (ø) |
|
packages/micro-analytics-cli/src/healthcheck.js | 100% <100%> (ø) |
|
packages/micro-analytics-cli/src/handler.js | 71.42% <100%> (ø) |
|
packages/micro-analytics-cli/src/parseArgs.js | 95.83% <100%> (ø) |
|
... and 3 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 0428c85...7204f59. Read the comment docs.
Let's publish a canary version once tests are passing to make sure everything is working as expected?
This is ready for a review now :v:
There is one little problem were it uses the wrong file in adapter-utils in node 6. Not sure why it does not work. (https://github.com/micro-analytics/micro-analytics-cli/pull/69/files#diff-3c7d545fdc1d88cf431afbe629f0f29cR3)
Also, the canary releases works
~/dev/test-ma » yarn add micro-analytics-adapter-flat-file-db@1.3.0-alpha.13dcefb3 micro-analytics-adapter-memory@1.0.0-alpha.13dcefb3 micro-analytics-adapter-utils@0.0.1-alpha.13dcefb3 micro-analytics-cli@2.2.0-alpha.13dcefb3
yarn add v0.24.5
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "micro-analytics-adapter-flat-file-db@1.3.0-alpha.13dcefb3" has incorrect peer dependency "micro-analytics-cli@^1.2.0".
[4/4] 📃 Building fresh packages...
success Saved 0 new dependencies.
✨ Done in 0.68s.
------------------------------------------------------------
~/dev/test-ma » micro-analytics
micro-analytics listening on 0.0.0.0:3000
with adapter flat-file-db
with server side events
------------------------------------------------------------
~/dev/test-ma » micro-analytics --adapter memory
micro-analytics listening on 0.0.0.0:3000
with adapter memory
with server side events
------------------------------------------------------------
~/dev/test-ma » micro-analytics --adapter memory &
[1] 89003
------------------------------------------------------------
~/dev/test-ma » micro-analytics listening on 0.0.0.0:3000
with adapter memory
with server side events
------------------------------------------------------------
~/dev/test-ma » curl localhost:3000/test
{"views":1}
Finally got the build green 🎉 Do you think we can ship this @mxstbr?
Let's shipit!
Nice work, thanks for fighting through that!
This is a breaking change for micro-analytics-cli, since we moved adapter-utils to another package. Thus, we need to bump major for that package. I will release: micro-analytics-cli 3.0.0 micro-analytics-adapter-utils 1.0.0 micro-analytics-adapter-memory 1.0.1 micro-analytics-adapter-flat-file-db 1.3.1
and then for next release we can make lerna do all the work I think.
Fixes #38, #45