-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: pin API #1045
feat: pin API #1045
Commits on Jun 18, 2018
-
feat: jsipfs pin improvements (#1249)
* initial sweep through to understand how pin works. Did make some changes but mostly minor. * refactor pb schema to it's own file * fix: don't pin files during files.add if opts.pin === false * feat: add some http qs parsing, http route/resources cleanup, cleanup core/utils.parseIpfsPath * feat: expand pin tests. \nFirst draft. still needs some further work. * feat: Add logging for entry/exit of pins: add/rm/flush/load. Clean some documentation. * feat: add --pin to files.add, fix: improper pin option parsing in core. * feat: Use ipfs.files.add to add init-docs instead of directly using the unix-fs importer. * feat(tests): Add tests for cli --pin option. I know this should be more of an integration test. Should be written in /core. Maybe talk with Victor about testing different layers * feat: use isIPFS to valiate a multihash.
Configuration menu - View commit details
-
Copy full SHA for 0662cd8 - Browse repository at this point
Copy the full SHA 0662cd8View commit details -
revert: default assets are not added when running on a browser
refactor: change pin.flush logging message
Configuration menu - View commit details
-
Copy full SHA for ee813eb - Browse repository at this point
Copy the full SHA ee813ebView commit details -
feat(test): add tests for failure cases of normalizeHashes
fix: don't need to cast the object.get result with toJSON revert: use interface-datastore.Key for datastore pin storage The proper change would be that datastore-level automatically casts operations into Keys fix: do not invoke callback within a try/catch feat(test): make cli pin tests more robust By using files that aren't added on IPFS initialization. Still needs work on files.rm (direct) and ipfs ls (indirect). fix: remove commented code, traced test failures to pin-set Got to go for the night, though, so will checkpoint here and address tomorrow. feat: parseIpfsPath now throws errors for consistency feat: resolveIpfsPaths error message lists the relative path that failed feat: use follow.bind instead of mutating the links Also decided not show relative paths. Less human friendly but probably cleaner otherwise. refactor: resolveIpfsPaths -> resolvePaths feat: promisify resolvePaths test: change parseIpfsPath failure tests to use try/catch docs: edit resolvePath doc revert: accidentally deleted commands/pin.js
Configuration menu - View commit details
-
Copy full SHA for f847f98 - Browse repository at this point
Copy the full SHA f847f98View commit details -
fix: add some changes missed during rebase, syntax fixes, etc
I think my original rebase for this branch 2 weeks ago might have changed history for the intervening commits, indirectly causing some of these missed changes. or I just rebase onto the wrong oldparent. fix: some onlyHash and pin tests broke after merging onlyHash and pin interact: shouldn't pin when --only-hash. fix: trim output for 'pin ls when no hash is passed' test: indirect pins supersede direct pins: turns out we had a bug feat: add expectTimeout test utility feat: promisify some additional pin utils
Configuration menu - View commit details
-
Copy full SHA for be8747e - Browse repository at this point
Copy the full SHA be8747eView commit details -
test: initial work testing the core/pin.js implementation
I think I'll end up moving most tests here. test: add tests for pin.ls and pin.rm Based tests on other pin fixtures, need to migrate the isPinned* tests to them as well. fix: direct pins are now deleted by a default pin.rm(hash) test: prepare for pin.add tests 'indirect supersedes direct' test exposes a bug in pin.ls feat: switch away from multihashes for isPinned* tests test: impl pin.add tests fix: add fixture files only once test: add test for a potential bug, clean isPinned* tests refactor: remove a test that's no longer needed fix: pin.ls, indirect pins should supersede direct pins test: naive pin.load, pin.flush tests feat: remove most pin cli tests as functionality is tested in pin core tests refactor: rename solarSystem
Configuration menu - View commit details
-
Copy full SHA for beead9a - Browse repository at this point
Copy the full SHA beead9aView commit details -
refactor: move pin http-api tests to http-api/inject
fix: attempt to find a way to use http-api/inject test structure for pin tests test: fix pin.rm http-api tests test: fix pin.add http-api tests docs: docs and cleanup of http-api pin tests refactor: renaming fix: lint errors fix: resolvePaths tests are failing on CI, it might be long ops, testing a timeout bump fix: add files explicitly before testing resolvePaths fix: remove mocha.only from resolvePaths. let's hope tests pass, they are passing CI now fix: rename test/core/utils.spec.js -> utils.js so it's not run during browser tests
Configuration menu - View commit details
-
Copy full SHA for 868570a - Browse repository at this point
Copy the full SHA 868570aView commit details -
test: first draft of pin-set tests
Need to leave computer, this is a checkpoint. test: add sanity test for walkItems and hasChild, clean others These tests are more descriptive than really pushing the impl. I'd love others' thoughts on what else should be hit and how. I also need to compare go's pinset impl against ours fix: stop daemons feat: documentation and multihash buffer handling for dag.get fix: lint
Configuration menu - View commit details
-
Copy full SHA for 066c113 - Browse repository at this point
Copy the full SHA 066c113View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90dad57 - Browse repository at this point
Copy the full SHA 90dad57View commit details -
feat: rename vars, fix _depth default value, add docs
fix: pinset.hasChild buffer check feat: hardcode expected length for flush/load tests
Configuration menu - View commit details
-
Copy full SHA for 17b81ea - Browse repository at this point
Copy the full SHA 17b81eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 753f618 - Browse repository at this point
Copy the full SHA 753f618View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92b3d2f - Browse repository at this point
Copy the full SHA 92b3d2fView commit details -
fix: re-add pin interface tests
I must have missed a commit during a rebase.
Configuration menu - View commit details
-
Copy full SHA for a5c556c - Browse repository at this point
Copy the full SHA a5c556cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f7de05 - Browse repository at this point
Copy the full SHA 8f7de05View commit details -
Configuration menu - View commit details
-
Copy full SHA for 408d2bc - Browse repository at this point
Copy the full SHA 408d2bcView commit details -
chore: rebase a month of changes, resolve minor issues from that
fix: yarg arugment naming for pin cli commands fix: convert file multihashes to a b58 string fix: another way of checking for CID-ness fix: lint fix: toB58String handles non-buffers fix: key-exchange core tests now shutdown daemon.
Configuration menu - View commit details
-
Copy full SHA for f77a379 - Browse repository at this point
Copy the full SHA f77a379View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3013ee - Browse repository at this point
Copy the full SHA e3013eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c29a3d - Browse repository at this point
Copy the full SHA 6c29a3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a1b9b93 - Browse repository at this point
Copy the full SHA a1b9b93View commit details -
refactor: use lodash.flattenDeep
refactor: pinset.hasChild -> pinset.hasDescendent fix: invoke someCb if we've seen the hash before refactor: async patterns in dag._getRecursive refactor: pinset.hasDescendant refactor: pinset.storeItems async patterns refactor: pinset.loadSet and pin.walkItem async patterns docs: add link to go-ipfs' fanout bin implementation refactor: async patterns of pin.load/flush refactor: lint refactor: privatize internal pin key storage refactor: change encapsulation of ipfs.pin, fix resulting issues fix: lint fix: 'files add --pin=false' test was giving a false positive refactor: use is-ipfs to check CID-ability of a string refactor: remove last instance of 'once' in the pin code
Configuration menu - View commit details
-
Copy full SHA for 10f40ca - Browse repository at this point
Copy the full SHA 10f40caView commit details -
refactor: do not expose pinTypes
They're simple enough, documented elsewhere, and not used by any exposed functionality.
Configuration menu - View commit details
-
Copy full SHA for a7a55b9 - Browse repository at this point
Copy the full SHA a7a55b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0b4a0c - Browse repository at this point
Copy the full SHA d0b4a0cView commit details