bump dependencies and use lib0 exports feature
This commit is contained in:
parent
d549c4599f
commit
e1ee781651
6 changed files with 21 additions and 30 deletions
20
package-lock.json
generated
20
package-lock.json
generated
|
@ -105,9 +105,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/simple-peer": {
|
"@types/simple-peer": {
|
||||||
"version": "9.6.3",
|
"version": "9.11.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/simple-peer/-/simple-peer-9.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/simple-peer/-/simple-peer-9.11.3.tgz",
|
||||||
"integrity": "sha512-zrXEBch9tF4NgkZDsGR3c1D0kq99M1bBCjzEyL0PVfEWzCIXrK64TuxRz3XKOx1B0KoEQ9kTs+AhMDuQaHy5RQ==",
|
"integrity": "sha512-GHrZSrLBqaa/puFQdLnhepOvPiqlDnHXbTbTMx4JdIzhnSJ9tg7iu795aPnMPV9QpQ5h7CR5XqfqORY1P2qehw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
|
@ -2544,9 +2544,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "3.9.9",
|
"version": "3.9.10",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
|
||||||
"integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==",
|
"integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"union": {
|
"union": {
|
||||||
|
@ -2705,12 +2705,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yjs": {
|
"yjs": {
|
||||||
"version": "13.5.6",
|
"version": "13.5.20",
|
||||||
"resolved": "https://registry.npmjs.org/yjs/-/yjs-13.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/yjs/-/yjs-13.5.20.tgz",
|
||||||
"integrity": "sha512-0ebPpLB/zizJbWaFUDRarWbXiXYD0OMDOCa8ZqkVVWQzeIoMRbmbNwB3suZ9YwD0bV4Su9RLn8M/bvGzIwX3hA==",
|
"integrity": "sha512-VZuxhu0V6ILtAHi+7JmCxhkzvffLzpH70Nso4zTGj3qeq1ZuqZhLRjQZwBbFHlBTZD0PvpsFk20BlG5XDScr/w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"lib0": "^0.2.41"
|
"lib0": "^0.2.42"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,15 +63,15 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^11.1.0",
|
"@rollup/plugin-commonjs": "^11.1.0",
|
||||||
"@rollup/plugin-node-resolve": "^7.1.3",
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
||||||
"@types/simple-peer": "^9.6.3",
|
"@types/simple-peer": "^9.11.3",
|
||||||
"concurrently": "^5.3.0",
|
"concurrently": "^5.3.0",
|
||||||
"http-server": "^0.12.3",
|
"http-server": "^0.12.3",
|
||||||
"rollup": "^1.32.1",
|
"rollup": "^1.32.1",
|
||||||
"rollup-cli": "^1.0.9",
|
"rollup-cli": "^1.0.9",
|
||||||
"rollup-plugin-terser": "^5.3.1",
|
"rollup-plugin-terser": "^5.3.1",
|
||||||
"standard": "^14.3.4",
|
"standard": "^14.3.4",
|
||||||
"typescript": "^3.9.9",
|
"typescript": "^3.9.10",
|
||||||
"yjs": "^13.5.6"
|
"yjs": "^13.5.20"
|
||||||
},
|
},
|
||||||
"peerDependenies": {
|
"peerDependenies": {
|
||||||
"yjs": "^13.5.6"
|
"yjs": "^13.5.6"
|
||||||
|
|
|
@ -95,15 +95,7 @@ export default [
|
||||||
name: 'y-webrtc',
|
name: 'y-webrtc',
|
||||||
file: 'dist/y-webrtc.cjs',
|
file: 'dist/y-webrtc.cjs',
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
sourcemap: true,
|
sourcemap: true
|
||||||
paths: path => {
|
|
||||||
if (/^lib0\//.test(path)) {
|
|
||||||
return `lib0/dist${path.slice(4)}.cjs`
|
|
||||||
} else if (/^y-protocols\//.test(path)) {
|
|
||||||
return `y-protocols/dist${path.slice(11)}.cjs`
|
|
||||||
}
|
|
||||||
return path
|
|
||||||
}
|
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -358,7 +358,7 @@ export class Room {
|
||||||
encoding.writeVarUint8Array(encoderAwareness, awarenessProtocol.encodeAwarenessUpdate(this.awareness, changedClients))
|
encoding.writeVarUint8Array(encoderAwareness, awarenessProtocol.encodeAwarenessUpdate(this.awareness, changedClients))
|
||||||
broadcastRoomMessage(this, encoding.toUint8Array(encoderAwareness))
|
broadcastRoomMessage(this, encoding.toUint8Array(encoderAwareness))
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener('beforeunload', () => {
|
window.addEventListener('beforeunload', () => {
|
||||||
awarenessProtocol.removeAwarenessStates(this.awareness, [doc.clientID], 'window unload')
|
awarenessProtocol.removeAwarenessStates(this.awareness, [doc.clientID], 'window unload')
|
||||||
rooms.forEach(room => {
|
rooms.forEach(room => {
|
||||||
|
@ -370,7 +370,6 @@ export class Room {
|
||||||
connect () {
|
connect () {
|
||||||
this.doc.on('update', this._docUpdateHandler)
|
this.doc.on('update', this._docUpdateHandler)
|
||||||
this.awareness.on('update', this._awarenessUpdateHandler)
|
this.awareness.on('update', this._awarenessUpdateHandler)
|
||||||
|
|
||||||
// signal through all available signaling connections
|
// signal through all available signaling connections
|
||||||
announceSignalingInfo(this)
|
announceSignalingInfo(this)
|
||||||
const roomName = this.name
|
const roomName = this.name
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
import * as cryptutils from '../src/crypto.js'
|
import * as cryptutils from '../src/crypto'
|
||||||
import * as t from 'lib0/testing.js'
|
import * as t from 'lib0/testing'
|
||||||
import * as prng from 'lib0/prng.js'
|
import * as prng from 'lib0/prng'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {t.TestCase} tc
|
* @param {t.TestCase} tc
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
|
||||||
import * as crypto from './crypto.test.js'
|
import * as crypto from './crypto.test.js'
|
||||||
|
|
||||||
import { runTests } from 'lib0/testing.js'
|
import { runTests } from 'lib0/testing'
|
||||||
import { isBrowser, isNode } from 'lib0/environment.js'
|
import { isBrowser, isNode } from 'lib0/environment'
|
||||||
import * as log from 'lib0/logging.js'
|
import * as log from 'lib0/logging'
|
||||||
|
|
||||||
if (isBrowser) {
|
if (isBrowser) {
|
||||||
log.createVConsole(document.body)
|
log.createVConsole(document.body)
|
||||||
|
|
Loading…
Reference in a new issue