Skip to content

Commit 8083aae

Browse files
committed
chore: update parcel
1 parent b0db319 commit 8083aae

File tree

10 files changed

+20
-16
lines changed

10 files changed

+20
-16
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ docs
44
test/repo-tests*
55
**/bundle.js
66
.cache
7+
.parcel-cache
78

89
# Logs
910
logs

examples/libp2p-in-the-browser/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "libp2p-in-browser",
33
"version": "1.0.0",
44
"description": "A libp2p node running in the browser",
5-
"main": "index.js",
5+
"main": "dist/index.html",
66
"browserslist": [
77
"last 2 Chrome versions"
88
],
@@ -29,6 +29,6 @@
2929
"babel-plugin-syntax-async-functions": "^6.13.0",
3030
"babel-plugin-transform-regenerator": "^6.26.0",
3131
"babel-polyfill": "^6.26.0",
32-
"parcel-bundler": "1.12.3"
32+
"parcel": "next"
3333
}
3434
}

examples/libp2p-in-the-browser/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ async function run() {
1717
const out = chunk.toString()
1818

1919
if (out.includes('Server running at')) {
20-
url = out.replace('Server running at ', '')
20+
url = out.split('Server running at ')[1]
2121
}
2222

23-
if (out.includes('Built in ')) {
23+
if (out.includes('Built in')) {
2424
try {
2525
const browser = await chromium.launch();
2626
const page = await browser.newPage();

examples/webrtc-direct/package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "0.0.1",
44
"private": true,
55
"description": "",
6+
"main": "dist/index.html",
67
"scripts": {
78
"test": "echo \"Error: no test specified\" && exit 1",
89
"build": "parcel build index.html",
@@ -15,7 +16,8 @@
1516
"babel-plugin-syntax-async-functions": "^6.13.0",
1617
"babel-plugin-transform-regenerator": "^6.26.0",
1718
"babel-polyfill": "^6.26.0",
18-
"parcel-bundler": "1.12.3"
19+
"parcel-bundler": "1.12.3",
20+
"util": "^0.12.3"
1921
},
2022
"dependencies": {
2123
"libp2p": "../../",

examples/webrtc-direct/test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ async function test () {
5050
const out = chunk.toString()
5151

5252
if (out.includes('Server running at')) {
53-
dialerUrl = out.replace('Server running at ', '')
53+
dialerUrl = out.split('Server running at ')[1]
5454
}
5555

56-
if (out.includes('✨ Built in ')) {
56+
57+
if (out.includes('Built in ')) {
58+
5759
try {
5860
const browser = await chromium.launch();
5961
const page = await browser.newPage();

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"src"
1919
],
2020
"scripts": {
21-
"prepare": "aegir build --no-bundle",
2221
"lint": "aegir lint",
2322
"build": "aegir build",
2423
"test": "aegir test",
@@ -90,7 +89,7 @@
9089
"it-protocol-buffers": "^0.2.0",
9190
"it-take": "1.0.0",
9291
"libp2p-crypto": "^0.19.0",
93-
"libp2p-interfaces": "libp2p/js-libp2p-interfaces#chore/update-types",
92+
"libp2p-interfaces": "^0.9.0",
9493
"libp2p-utils": "libp2p/js-libp2p-utils#feat/add-types",
9594
"mafmt": "^8.0.0",
9695
"merge-options": "^3.0.4",

src/content-routing/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const { pipe } = require('it-pipe')
1616
* @typedef {import('peer-id')} PeerId
1717
* @typedef {import('multiaddr')} Multiaddr
1818
* @typedef {import('cids')} CID
19-
* @typedef {import('libp2p-interfaces/src/content-routing/types').ContentRouting} ContentRoutingModule
19+
* @typedef {import('libp2p-interfaces/src/content-routing/types')} ContentRoutingModule
2020
*/
2121

2222
/**

src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ const { updateSelfPeerRecord } = require('./record/utils')
4343
* @typedef {import('libp2p-interfaces/src/stream-muxer/types').MuxedStream} MuxedStream
4444
* @typedef {import('libp2p-interfaces/src/transport/types').TransportFactory<any, any>} TransportFactory
4545
* @typedef {import('libp2p-interfaces/src/stream-muxer/types').MuxerFactory} MuxerFactory
46-
* @typedef {import('libp2p-interfaces/src/content-routing/types').ContentRouting} ContentRoutingModule
47-
* @typedef {import('libp2p-interfaces/src/peer-discovery/types').PeerDiscovery} PeerDiscoveryModule
48-
* @typedef {import('libp2p-interfaces/src/peer-routing/types').PeerRouting} PeerRoutingModule
46+
* @typedef {import('libp2p-interfaces/src/content-routing/types')} ContentRoutingModule
47+
* @typedef {import('libp2p-interfaces/src/peer-discovery/types')} PeerDiscoveryModule
48+
* @typedef {import('libp2p-interfaces/src/peer-routing/types')} PeerRoutingModule
4949
* @typedef {import('libp2p-interfaces/src/crypto/types').Crypto} Crypto
5050
* @typedef {import('libp2p-interfaces/src/pubsub')} Pubsub
5151
* @typedef {import('libp2p-interfaces/src/pubsub').PubsubOptions} PubsubOptions

src/peer-routing.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const {
2525
/**
2626
* @typedef {import('peer-id')} PeerId
2727
* @typedef {import('multiaddr')} Multiaddr
28-
* @typedef {import('libp2p-interfaces/src/peer-routing/types').PeerRouting} PeerRoutingModule
28+
* @typedef {import('libp2p-interfaces/src/peer-routing/types')} PeerRoutingModule
2929
*/
3030

3131
/**

src/registrar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict'
22

33
const debug = require('debug')
4-
const log = Object.assign(debug('libp2p:peer-store'), {
5-
error: debug('libp2p:peer-store:err')
4+
const log = Object.assign(debug('libp2p:registrar'), {
5+
error: debug('libp2p:registrar:err')
66
})
77
const errcode = require('err-code')
88

0 commit comments

Comments
 (0)