You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: kubo 0.38 interop and pin name support (#343)
* feat: add pin name support
- add name parameter to pin.add and pin.addAll
- add names flag to pin.ls (auto-enabled with name filter)
- filter undefined/null values in URL parameters
- handle mixed arrays in normalise-input
- add validation for conflicting options
- add comprehensive tests
* test: verify metadata is stored in UnixFS
update test to check metadata (mode/mtime) is properly sent to API
and stored in UnixFS structure, retrievable via DAG API
* fix: resolve kubo import warnings
- change kubo imports from named to default imports (CommonJS module)
- fix import order for ipfs-unixfs in test file
* fix: handle missing ProvideBufLen in bitswap stat response
kubo API doesn't return ProvideBufLen field in JSON response,
default to 0 when missing to fix test failure
* fix: update config.set tests to use valid config keys
- replace arbitrary 'Fruit' key with 'Gateway.RootRedirect'
- replace removed 'Discovery.MDNS.Interval' with 'Gateway.MaxConcurrentRequests'
- add test for unknown config key rejection
- kubo no longer allows arbitrary config keys
* test: use IPFS_GO_EXEC for custom kubo binary
- respect IPFS_GO_EXEC env var in interface tests
- document IPFS_GO_EXEC usage in README
- add version logging to track which binary is used
allows testing with development versions of kubo
* chore: update kubo to 0.38.0-rc1
see https://github.com/ipfs/kubo/releases/tag/v0.38.0-rc1
* fix: remove console.log from test to fix lint error
removed debug console.log statement that was causing eslint no-console rule violation
* chore: update kubo to 0.38.0
* refactor: simplify pin input normalization with toPinnable helper
We run tests by executing `npm test` in a terminal window. This will run both Node.js and Browser tests, both in Chrome and PhantomJS. To ensure that the module conforms with the [`interface-ipfs-core`](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core) spec, we run the batch of tests provided by the interface module, which can be found [here](https://github.com/ipfs/js-ipfs/tree/master/packages/interface-ipfs-core/src).
391
391
392
+
#### Testing with Custom Kubo Binary
393
+
394
+
By default, tests use the kubo binary from `node_modules`. To test with a custom kubo binary (e.g., a development version), use the `IPFS_GO_EXEC` environment variable:
395
+
396
+
```bash
397
+
# Test with a custom kubo binary
398
+
IPFS_GO_EXEC=/path/to/custom/kubo npm test
399
+
400
+
# Example: testing with locally built kubo
401
+
IPFS_GO_EXEC=/home/user/kubo/cmd/ipfs/ipfs npm test
402
+
```
403
+
404
+
This is particularly useful when developing features that require changes to both kubo and this client.
405
+
392
406
## Historical context
393
407
394
408
This module started as a direct mapping from the go-ipfs cli to a JavaScript implementation, although this was useful and familiar to a lot of developers that were coming to IPFS for the first time, it also created some confusion on how to operate the core of IPFS and have access to the full capacity of the protocol. After much consideration, we decided to create `interface-ipfs-core` with the goal of standardizing the interface of a core implementation of IPFS, and keep the utility functions the IPFS community learned to use and love, such as reading files from disk and storing them directly to IPFS.
0 commit comments