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

fix: make datastore OS agnostic (path things) #13

Merged
merged 6 commits into from
Nov 3, 2017
Merged

Conversation

daviddias
Copy link
Member

No description provided.

Copy link
Member Author

@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.

@richardschneider A couple of nitpicks, otherwise LGTM.

src/key.js Outdated
const pathSepS = path.sep
const pathSep = new Buffer(pathSepS, 'utf8')[0]
const pathSepS = '/'
const pathSepB = new Buffer(pathSepS, 'utf8')
Copy link
Member Author

Choose a reason for hiding this comment

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

needs to change to Buffer.from

Copy link
Contributor

Choose a reason for hiding this comment

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

see the following comment

Copy link
Member Author

Choose a reason for hiding this comment

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

What I'm referencing here is the linting issue https://travis-ci.org/ipfs/interface-datastore/jobs/296689734#L2153


const Key = require('../src').Key

const pathSep = path.sep
const n = (p) => path.normalize(p)
const pathSep = '/'
Copy link
Member Author

Choose a reason for hiding this comment

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

If this is defined in multiple places, it would be better to have a src/constants.js file

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not happy with the names, just dealing with the current code. You will note that pathSep is a Buffer in one and a string in another!

Copy link
Member Author

Choose a reason for hiding this comment

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

You are welcome to change that :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@richardschneider you should be able to fetch this branch and push commits to it.

@codecov
Copy link

codecov bot commented Nov 3, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@3806665). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #13   +/-   ##
=========================================
  Coverage          ?   91.85%           
=========================================
  Files             ?        5           
  Lines             ?      393           
  Branches          ?        0           
=========================================
  Hits              ?      361           
  Misses            ?       32           
  Partials          ?        0
Impacted Files Coverage Δ
src/key.js 87.67% <100%> (ø)
src/tests.js 94.44% <100%> (ø)

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 3806665...358dbda. Read the comment docs.

@richardschneider
Copy link
Contributor

@diasdavid Is the codecov error a false positive?

@daviddias
Copy link
Member Author

@richardschneider it is just because it is the first time it is running on this repo. It's fine :)

Copy link
Contributor

@richardschneider richardschneider left a comment

Choose a reason for hiding this comment

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

LGTM

@daviddias daviddias merged commit 5697173 into master Nov 3, 2017
@daviddias daviddias deleted the windows-interop branch November 3, 2017 13:25
@daviddias
Copy link
Member Author

@richardschneider released as 0.4.0. You can now update in the remaining PR's \o/

@richardschneider
Copy link
Contributor

Cool, thanks for all help

@daviddias
Copy link
Member Author

No, thank you for making it happen!! ❤️

@pvh
Copy link

pvh commented Nov 3, 2017

Looks great guys, I'll take it for a spin today and let you know if I see any other trouble.

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