Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Make ipfs.files.add return DAGNodes - #261

Closed
hackergrrl wants to merge 4 commits into
ipfs:masterfrom
hackergrrl:files-add-dagnode
Closed

Make ipfs.files.add return DAGNodes#261
hackergrrl wants to merge 4 commits into
ipfs:masterfrom
hackergrrl:files-add-dagnode

Conversation

@hackergrrl

@hackergrrl hackergrrl commented May 23, 2016

Copy link
Copy Markdown
Contributor
  • transform file tuples into DAGNodes
  • use + pass interface-ipfs-core tests for files.add

NOTE: this breaks backwards compatibility for add and will require a major semver bump.

@jbenet jbenet added the status/in-progress In progress label May 23, 2016
@hackergrrl hackergrrl changed the title Make ipfs.files.add returns DAGNodes. Make ipfs.files.add return DAGNodes May 23, 2016
Comment thread src/core/ipfs/files.js Outdated
i.once('end', () => {
// Transform file info tuples to DAGNodes
i.pipe(through.obj(function transform (info, enc, next) {
console.log('info', info)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why console log in the core? What spec does this follow? Same for L31

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops -- debugging leftovers.

@hackergrrl
hackergrrl force-pushed the files-add-dagnode branch from 2dac5eb to be926ba Compare May 27, 2016 06:23
@hackergrrl

hackergrrl commented May 27, 2016

Copy link
Copy Markdown
Contributor Author

This PR blocked on major release on https://github.com/ipfs/js-ipfs-unixfs-engine and merge of ipfs-inactive/interface-js-ipfs-core#20. Please don't merge until all is green. :)

@daviddias

Copy link
Copy Markdown
Member
  • ipfs-unixfs-engine@0.9.0 released :)

@hackergrrl
hackergrrl force-pushed the files-add-dagnode branch from be926ba to 11a9b62 Compare May 31, 2016 20:16
Though one of these is a fix (using 'before' properly), the rest are
timing issues that are more noticeable on slower computers.
@hackergrrl
hackergrrl force-pushed the files-add-dagnode branch from 11a9b62 to 7b698b3 Compare May 31, 2016 23:30
@hackergrrl

Copy link
Copy Markdown
Contributor Author

Just waiting on ipfs-inactive/interface-js-ipfs-core#20 to get merged + published and we're good to go!

@daviddias

Copy link
Copy Markdown
Member

Did you check browser tests? Just ran them and got:

ERROR in ../interface-ipfs-core/test/files.js
Module build failed: Error: unsupported type for static module: VariableDeclarator
at expression:

fs = require('fs')

@nginnever

Copy link
Copy Markdown
Member

I got the same result when testing the interface-core tests through js-ipfs-api yesterday.

@dignifiedquire

Copy link
Copy Markdown
Member

that's a bug in brfs browserify/brfs#40

@daviddias daviddias closed this Jun 5, 2016
@jbenet jbenet removed the status/in-progress In progress label Jun 5, 2016
@hackergrrl

Copy link
Copy Markdown
Contributor Author

@diasdavid sorry could you please share more information before closing a PR?

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.

5 participants