diff --git a/package-lock.json b/package-lock.json index 2c23aec..5701d60 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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" } } } diff --git a/package.json b/package.json index d4449b1..bd9c4b1 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/rollup.config.js b/rollup.config.js index 0e24261..adebbb5 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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 }] } ] diff --git a/src/y-webrtc.js b/src/y-webrtc.js index 4b141cb..0191331 100644 --- a/src/y-webrtc.js +++ b/src/y-webrtc.js @@ -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 diff --git a/test/crypto.test.js b/test/crypto.test.js index 898cf35..917435b 100644 --- a/test/crypto.test.js +++ b/test/crypto.test.js @@ -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 diff --git a/test/index.js b/test/index.js index b1bc62b..3dc91d2 100644 --- a/test/index.js +++ b/test/index.js @@ -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)