Skip to content

Commit

Permalink
bump dependencies and use lib0 exports feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Nov 10, 2021
1 parent d549c45 commit e1ee781
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 30 deletions.
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 1 addition & 9 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}]
}
]
3 changes: 1 addition & 2 deletions src/y-webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/crypto.test.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit e1ee781

Please sign in to comment.