Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add backwards compatibility and more tests #138

Merged
merged 5 commits into from
Jun 27, 2017
Merged

Conversation

dignifiedquire
Copy link
Member

@dignifiedquire dignifiedquire commented Jun 4, 2017

There were some issues introduced with #136. This should be reverted for now, until it is cleared to not cause any issues.

@daviddias
Copy link
Member

Me and @dignifiedquire had a quick chat yesterday, but unfortunately, I wasn't able to follow-up at the time as I was entering a flight.

I've run js-ipfs tests with latest ipfs-repo and they finished successfully, this was a false positive because as @dignifiedquire points out, there were breaking changes with regards to the options object, but since everyone repo uses ipfs-repo defaults, it felt like an internal breaking change.

What we should do in this situation is add backward's compatibility to the old options object, this will enable old custom configs to work if anyone is using any. @dignifiedquire can you refactor your PR to be that?

With regards to other possible breaking changes. I'm still unsure what those might be as there are no tests that capture those. Mind creating an issue to enumerate those? We should have tests for them in the first place.

@daviddias daviddias mentioned this pull request Jun 5, 2017
@daviddias
Copy link
Member

daviddias commented Jun 5, 2017

@daviddias daviddias changed the title fix: revert renaming refactor fix: add backwards compatibility and more tests Jun 16, 2017
@pgte pgte self-assigned this Jun 27, 2017
@@ -40,7 +43,7 @@
},
"devDependencies": {
"aegir": "^11.0.2",
"chai": "^4.0.1",
Copy link
Member

Choose a reason for hiding this comment

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

Interesting, why the downgrade?

package.json Outdated
"lock-me": "^1.0.2",
"multiaddr": "^2.3.0",
"safe-buffer": "^5.1.0"
"safe-buffer": "^5.0.1"
Copy link
Member

Choose a reason for hiding this comment

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

Ah, it was generalized. Mind doing a ncu -a?

Copy link
Member Author

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

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

One note other than looks good

src/index.js Outdated
@@ -43,21 +44,15 @@ class IpfsRepo {
constructor (repoPath, options) {
assert.equal(typeof repoPath, 'string', 'missing repoPath')

if (options == null) {
options = require('./default-options')
Copy link
Member Author

Choose a reason for hiding this comment

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

Changing this means that any module bundle will include the default options in the browser always. Not sure this could be an issue or not

Copy link
Contributor

Choose a reason for hiding this comment

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

Since webpack and browserify extract dependencies using static analysis, this is always going to get included in the bundle, with or without these lines.

@daviddias daviddias merged commit 60e0da7 into master Jun 27, 2017
@daviddias daviddias deleted the revert-refactor branch June 27, 2017 15:44
@daviddias daviddias removed the status/in-progress In progress label Jun 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants