improve package.json files and exports

This commit is contained in:
Andre Staltz 2023-04-21 14:56:32 +03:00
parent 39c6fd00a2
commit 80168f77cc
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
5 changed files with 8 additions and 5 deletions

View File

@ -1 +0,0 @@
module.exports = [require('./lib/plugin')]

View File

@ -12,9 +12,13 @@
"main": "index.js", "main": "index.js",
"files": [ "files": [
"*.js", "*.js",
"lib/*.js", "lib/*.js"
"compat/*.js"
], ],
"exports": {
".": {
"require": "./lib/index.js"
}
},
"type": "commonjs", "type": "commonjs",
"engines": { "engines": {
"node": ">=16" "node": ">=16"

View File

@ -12,7 +12,7 @@ const { generateKeypair } = require('./util')
const createPeer = SecretStack({ appKey: caps.shs }) const createPeer = SecretStack({ appKey: caps.shs })
.use(require('ppppp-db')) .use(require('ppppp-db'))
.use(require('ssb-box')) .use(require('ssb-box'))
.use(require('../')) .use(require('../lib'))
const ALICE_DIR = path.join(os.tmpdir(), 'dagsync-alice') const ALICE_DIR = path.join(os.tmpdir(), 'dagsync-alice')
const BOB_DIR = path.join(os.tmpdir(), 'dagsync-bob') const BOB_DIR = path.join(os.tmpdir(), 'dagsync-bob')

View File

@ -10,7 +10,7 @@ const { generateKeypair } = require('./util')
const createSSB = SecretStack({ appKey: caps.shs }) const createSSB = SecretStack({ appKey: caps.shs })
.use(require('ppppp-db')) .use(require('ppppp-db'))
.use(require('ssb-box')) .use(require('ssb-box'))
.use(require('../')) .use(require('../lib'))
const ALICE_DIR = path.join(os.tmpdir(), 'dagsync-alice') const ALICE_DIR = path.join(os.tmpdir(), 'dagsync-alice')
const BOB_DIR = path.join(os.tmpdir(), 'dagsync-bob') const BOB_DIR = path.join(os.tmpdir(), 'dagsync-bob')