diff --git a/index.js b/index.js deleted file mode 100644 index a736313..0000000 --- a/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = [require('./lib/plugin')] \ No newline at end of file diff --git a/lib/plugin.js b/lib/index.js similarity index 100% rename from lib/plugin.js rename to lib/index.js diff --git a/package.json b/package.json index 5943a6a..d2da2fe 100644 --- a/package.json +++ b/package.json @@ -12,9 +12,13 @@ "main": "index.js", "files": [ "*.js", - "lib/*.js", - "compat/*.js" + "lib/*.js" ], + "exports": { + ".": { + "require": "./lib/index.js" + } + }, "type": "commonjs", "engines": { "node": ">=16" diff --git a/test/feed-sync.test.js b/test/feed-sync.test.js index 59e6fa8..4deba8c 100644 --- a/test/feed-sync.test.js +++ b/test/feed-sync.test.js @@ -12,7 +12,7 @@ const { generateKeypair } = require('./util') const createPeer = SecretStack({ appKey: caps.shs }) .use(require('ppppp-db')) .use(require('ssb-box')) - .use(require('../')) + .use(require('../lib')) const ALICE_DIR = path.join(os.tmpdir(), 'dagsync-alice') const BOB_DIR = path.join(os.tmpdir(), 'dagsync-bob') diff --git a/test/thread-sync.test.js b/test/thread-sync.test.js index 982ef46..beab1ee 100644 --- a/test/thread-sync.test.js +++ b/test/thread-sync.test.js @@ -10,7 +10,7 @@ const { generateKeypair } = require('./util') const createSSB = SecretStack({ appKey: caps.shs }) .use(require('ppppp-db')) .use(require('ssb-box')) - .use(require('../')) + .use(require('../lib')) const ALICE_DIR = path.join(os.tmpdir(), 'dagsync-alice') const BOB_DIR = path.join(os.tmpdir(), 'dagsync-bob')