Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

feat: new IPLD Format API #51

Merged
merged 1 commit into from
May 8, 2019
Merged

feat: new IPLD Format API #51

merged 1 commit into from
May 8, 2019

Conversation

vmx
Copy link
Member

@vmx vmx commented Apr 21, 2019

BREAKING CHANGE: The API is now async/await based

There are numerous changes, the most significant one is that the API
is no longer callback based, but it using async/await.

For the full new API please see the IPLD Formats spec.

@vmx vmx requested review from rvagg and magik6k April 21, 2019 23:46
@ghost ghost assigned vmx Apr 21, 2019
@ghost ghost added the status/in-progress In progress label Apr 21, 2019
@codecov
Copy link

codecov bot commented Apr 22, 2019

Codecov Report

Merging #51 into master will decrease coverage by 7.75%.
The diff coverage is 84.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
- Coverage    92.3%   84.55%   -7.76%     
==========================================
  Files           7        7              
  Lines         325      259      -66     
==========================================
- Hits          300      219      -81     
- Misses         25       40      +15
Impacted Files Coverage Δ
src/util/util.js 92.3% <100%> (-1.18%) ⬇️
src/index.js 100% <100%> (ø) ⬆️
src/util/commit.js 62.16% <64.28%> (-33.79%) ⬇️
src/util/tree.js 94.44% <71.42%> (-0.16%) ⬇️
src/util.js 90% <83.33%> (+1.32%) ⬆️
src/util/tag.js 95.34% <87.5%> (ø) ⬆️
src/resolver.js 95.65% <95.65%> (+8.5%) ⬆️

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 784c464...970df33. Read the comment docs.

@@ -115,5 +113,7 @@ exports.deserialize = (data, callback) => {
}
}

setImmediate(() => callback(null, res))
visibility.removeEnumerableProperties(res, ['gitType'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are only 2 uses of visibility and they both have this one property, they (and visibility.js) could be replaced with Object.defineProperty(res, 'gitType', { enumerable: false }). I'll leave that call up to you though, I think you know my thoughts on the defineProperty() use and the re-use of visibility.js across the projects.

BREAKING CHANGE: The API is now async/await based

There are numerous changes, the most significant one is that the API
is no longer callback based, but it using async/await.

For the full new API please see the [IPLD Formats spec].

[IPLD Formats spec]: https://github.com/ipld/interface-ipld-format
@vmx vmx merged commit e39a7d9 into master May 8, 2019
@vmx vmx deleted the ipld-format-cleanup branch May 8, 2019 13:06
@ghost ghost removed the status/in-progress In progress label May 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants