bump dependencies and use lib0 exports feature

This commit is contained in:
Kevin Jahns 2021-11-10 10:01:48 +01:00
parent d549c4599f
commit e1ee781651
6 changed files with 21 additions and 30 deletions

20
package-lock.json generated
View file

@ -105,9 +105,9 @@
}
},
"@types/simple-peer": {
"version": "9.6.3",
"resolved": "https://registry.npmjs.org/@types/simple-peer/-/simple-peer-9.6.3.tgz",
"integrity": "sha512-zrXEBch9tF4NgkZDsGR3c1D0kq99M1bBCjzEyL0PVfEWzCIXrK64TuxRz3XKOx1B0KoEQ9kTs+AhMDuQaHy5RQ==",
"version": "9.11.3",
"resolved": "https://registry.npmjs.org/@types/simple-peer/-/simple-peer-9.11.3.tgz",
"integrity": "sha512-GHrZSrLBqaa/puFQdLnhepOvPiqlDnHXbTbTMx4JdIzhnSJ9tg7iu795aPnMPV9QpQ5h7CR5XqfqORY1P2qehw==",
"dev": true,
"requires": {
"@types/node": "*"
@ -2544,9 +2544,9 @@
"dev": true
},
"typescript": {
"version": "3.9.9",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.9.tgz",
"integrity": "sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==",
"version": "3.9.10",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.10.tgz",
"integrity": "sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==",
"dev": true
},
"union": {
@ -2705,12 +2705,12 @@
}
},
"yjs": {
"version": "13.5.6",
"resolved": "https://registry.npmjs.org/yjs/-/yjs-13.5.6.tgz",
"integrity": "sha512-0ebPpLB/zizJbWaFUDRarWbXiXYD0OMDOCa8ZqkVVWQzeIoMRbmbNwB3suZ9YwD0bV4Su9RLn8M/bvGzIwX3hA==",
"version": "13.5.20",
"resolved": "https://registry.npmjs.org/yjs/-/yjs-13.5.20.tgz",
"integrity": "sha512-VZuxhu0V6ILtAHi+7JmCxhkzvffLzpH70Nso4zTGj3qeq1ZuqZhLRjQZwBbFHlBTZD0PvpsFk20BlG5XDScr/w==",
"dev": true,
"requires": {
"lib0": "^0.2.41"
"lib0": "^0.2.42"
}
}
}

View file

@ -63,15 +63,15 @@
"devDependencies": {
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-node-resolve": "^7.1.3",
"@types/simple-peer": "^9.6.3",
"@types/simple-peer": "^9.11.3",
"concurrently": "^5.3.0",
"http-server": "^0.12.3",
"rollup": "^1.32.1",
"rollup-cli": "^1.0.9",
"rollup-plugin-terser": "^5.3.1",
"standard": "^14.3.4",
"typescript": "^3.9.9",
"yjs": "^13.5.6"
"typescript": "^3.9.10",
"yjs": "^13.5.20"
},
"peerDependenies": {
"yjs": "^13.5.6"

View file

@ -95,15 +95,7 @@ export default [
name: 'y-webrtc',
file: 'dist/y-webrtc.cjs',
format: 'cjs',
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
}
sourcemap: true
}]
}
]

View file

@ -358,7 +358,7 @@ export class Room {
encoding.writeVarUint8Array(encoderAwareness, awarenessProtocol.encodeAwarenessUpdate(this.awareness, changedClients))
broadcastRoomMessage(this, encoding.toUint8Array(encoderAwareness))
}
window.addEventListener('beforeunload', () => {
awarenessProtocol.removeAwarenessStates(this.awareness, [doc.clientID], 'window unload')
rooms.forEach(room => {
@ -370,7 +370,6 @@ export class Room {
connect () {
this.doc.on('update', this._docUpdateHandler)
this.awareness.on('update', this._awarenessUpdateHandler)
// signal through all available signaling connections
announceSignalingInfo(this)
const roomName = this.name

View file

@ -1,7 +1,7 @@
import * as cryptutils from '../src/crypto.js'
import * as t from 'lib0/testing.js'
import * as prng from 'lib0/prng.js'
import * as cryptutils from '../src/crypto'
import * as t from 'lib0/testing'
import * as prng from 'lib0/prng'
/**
* @param {t.TestCase} tc

View file

@ -1,9 +1,9 @@
import * as crypto from './crypto.test.js'
import { runTests } from 'lib0/testing.js'
import { isBrowser, isNode } from 'lib0/environment.js'
import * as log from 'lib0/logging.js'
import { runTests } from 'lib0/testing'
import { isBrowser, isNode } from 'lib0/environment'
import * as log from 'lib0/logging'
if (isBrowser) {
log.createVConsole(document.body)