Skip to content

Commit 2dea058

Browse files
committed
fix: resolve kubo import warnings
- change kubo imports from named to default imports (CommonJS module) - fix import order for ipfs-unixfs in test file
1 parent 86801da commit 2dea058

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/files.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
import * as dagPB from '@ipld/dag-pb'
44
import { expect } from 'aegir/chai'
5-
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
65
import { UnixFS } from 'ipfs-unixfs'
6+
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
77
import { factory } from './utils/factory.js'
88
import type { KuboRPCClient } from '../src/index.js'
99

test/interface-tests.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-env mocha */
22

3-
import { path } from 'kubo'
3+
import kubo from 'kubo'
44
import { isWindows, isFirefox, isChrome } from './constants.js'
55
import * as tests from './interface-tests/src/index.js'
66
import { factory } from './utils/factory.js'
@@ -267,7 +267,7 @@ describe('kubo-rpc-client tests against kubo', function () {
267267
*/
268268
const commonFactory = factory({
269269
type: 'kubo',
270-
bin: path?.(),
270+
bin: kubo?.path(),
271271
test: true
272272
})
273273
describe('kubo RPC client interface tests', function () {

test/utils/factory.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createFactory, type Factory, type KuboNode, type KuboOptions } from 'ipfsd-ctl'
2-
import { path } from 'kubo'
2+
import kubo from 'kubo'
33
import mergeOpts from 'merge-options'
44
import { isNode } from 'wherearewe'
55
import { create } from '../../src/index.js'
@@ -11,7 +11,7 @@ const commonOptions: KuboOptions = {
1111
type: 'kubo',
1212
rpc: create,
1313
endpoint: process.env.IPFSD_SERVER,
14-
bin: isNode ? (process.env.IPFS_GO_EXEC ?? path()) : undefined
14+
bin: isNode ? (process.env.IPFS_GO_EXEC ?? kubo.path()) : undefined
1515
}
1616

1717
export const factory = (options: any = {}, overrides: any = {}): Factory<KuboNode> => createFactory(

0 commit comments

Comments
 (0)