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

[WIP] Implement the thing #1

Merged
merged 5 commits into from
Sep 2, 2017
Merged

[WIP] Implement the thing #1

merged 5 commits into from
Sep 2, 2017

Conversation

magik6k
Copy link
Contributor

@magik6k magik6k commented Aug 25, 2017

No description provided.

@magik6k magik6k force-pushed the feat/implement branch 6 times, most recently from 1c5d19d to e0c8c96 Compare August 28, 2017 13:16
@magik6k magik6k force-pushed the feat/implement branch 3 times, most recently from 05d7b30 to 8491b57 Compare August 29, 2017 17:50
@magik6k magik6k force-pushed the feat/implement branch 4 times, most recently from b7bfc49 to 42b886f Compare August 31, 2017 22:18
@daviddias
Copy link
Member

👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽👏🏽 @magik6k :D

Does this work in ipld-resolver with tests that use actual git objects?

@magik6k
Copy link
Contributor Author

magik6k commented Sep 2, 2017

@diasdavid done in ipld/js-ipld#97, the tests there pass locally for me, though this needs to be reviewed/merged/released first.

Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

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

There is a ton of good work here! Really impressed and I would not say that you are not used to JS :)

Added some comments for small changes. Otherwise LGTM

let head = data.slice(0, headLen).toString()
let typeLen = head.match(/([^ ]+) (\d+)/)
if (!typeLen) {
setImmediate(() => callback(new Error('invalid object header'), null))
Copy link
Member

Choose a reason for hiding this comment

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

You gotta say return otherwise the rest of the function will be executed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

src/resolver.js Outdated
]

if (node.tagger) {
paths = paths.concat(personInfoPaths.map(e => 'tagger/' + e))
Copy link
Member

Choose a reason for hiding this comment

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

Add the parenthesis to the arrow function: `.map((e) => 'tagger/' + e))

'type',
'tag',
'message'
]
Copy link
Member

Choose a reason for hiding this comment

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

Are these constants? Move to a Constants file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These few paths are there for every tag, I'm not really sure if it'd really be worth having a separate file for that.

'name',
'email',
'date'
]
Copy link
Member

Choose a reason for hiding this comment

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

Are these constants? Move to a constant file

package.json Outdated
"multihashes": "^0.4.8",
"multihashing-async": "^0.4.6",
"smart-buffer": "^3.0.3",
"traverse": "^0.6.6"
Copy link
Member

Choose a reason for hiding this comment

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

Replace the ^ for ~ for any module that is below 1.0.0

@daviddias daviddias merged commit 51a9b5e into master Sep 2, 2017
@daviddias daviddias deleted the feat/implement branch September 2, 2017 20:47
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.

2 participants