back to .js extension

This commit is contained in:
Kevin Jahns
2018-11-27 14:59:12 +01:00
parent 9bd199a6e7
commit 3ddff186c2
125 changed files with 1015 additions and 845 deletions

5
provider/websocket.js Normal file
View File

@@ -0,0 +1,5 @@
/**
* @module provider/websocket
*/
export * from './websocket/WebSocketProvider.js'

View File

@@ -1,5 +0,0 @@
/**
* @module provider/websocket
*/
export * from './websocket/WebSocketProvider.mjs'

View File

@@ -4,8 +4,8 @@
/* eslint-env browser */
import * as Y from '../../index.mjs'
export * from '../../index.mjs'
import * as Y from '../../index.js'
export * from '../../index.js'
const messageSync = 0
const messageAwareness = 1

View File

@@ -1,10 +1,10 @@
/**
* @module provider/websocket
* @module provider/websocket/server
*/
import * as Y from '../../index.mjs'
import WebSocket from 'ws'
import http from 'http'
const Y = require('../../build/yjs.js')
const WebSocket = require('ws')
const http = require('http')
const port = process.env.PORT || 1234

View File

@@ -2,7 +2,7 @@
* @module provider/ydb
*/
import * as globals from './globals.mjs'
import * as globals from './globals.js'
export const Class = class NamedEventHandler {
constructor () {

View File

@@ -3,19 +3,19 @@
*/
/* eslint-env browser */
import * as idbactions from './idbactions.mjs'
import * as globals from '../../lib/globals.mjs'
import * as message from './message.mjs'
import * as bc from './broadcastchannel.mjs'
import * as encoding from '../../lib/encoding.mjs'
import * as logging from '../../lib/logging.mjs'
import * as idb from '../../lib/idb.mjs'
import * as decoding from '../../lib/decoding.mjs'
import { Y } from '../../utils/Y.mjs'
import { integrateRemoteStruct } from '../MessageHandler/integrateRemoteStructs.mjs'
import { createMutualExclude } from '../../lib/mutualExclude.mjs'
import * as idbactions from './idbactions.js'
import * as globals from '../../lib/globals.js'
import * as message from './message.js'
import * as bc from './broadcastchannel.js'
import * as encoding from '../../lib/encoding.js'
import * as logging from '../../lib/logging.js'
import * as idb from '../../lib/idb.js'
import * as decoding from '../../lib/decoding.js'
import { Y } from '../../utils/Y.js'
import { integrateRemoteStruct } from '../MessageHandler/integrateRemoteStructs.js'
import { createMutualExclude } from '../../lib/mutualExclude.js'
import * as NamedEventHandler from './NamedEventHandler.mjs'
import * as NamedEventHandler from './NamedEventHandler.js'
/**
* @typedef RoomState

View File

@@ -4,11 +4,11 @@
/* eslint-env browser */
import * as test from './test.mjs'
import * as ydbClient from './YdbClient.mjs'
import * as globals from './globals.mjs'
import * as idbactions from './idbactions.mjs'
import * as logging from './logging.mjs'
import * as test from './test.js'
import * as ydbClient from './YdbClient.js'
import * as globals from './globals.js'
import * as idbactions from './idbactions.js'
import * as logging from './logging.js'
const wsUrl = 'ws://127.0.0.1:8899/ws'
const testRoom = 'testroom'

View File

@@ -4,10 +4,10 @@
/* eslint-env browser */
import * as decoding from '../../lib/decoding.mjs'
import * as encoding from '../../lib/encoding.mjs'
import * as globals from '../../lib/globals.mjs'
import * as NamedEventHandler from './NamedEventHandler.mjs'
import * as decoding from '../../lib/decoding.js'
import * as encoding from '../../lib/encoding.js'
import * as globals from '../../lib/globals.js'
import * as NamedEventHandler from './NamedEventHandler.js'
const bc = new BroadcastChannel('ydb-client')
/**

View File

@@ -33,11 +33,11 @@
* - A client may update a room when the room is in either US or Co
*/
import * as encoding from '../../lib/encoding.mjs'
import * as decoding from '../../lib/decoding.mjs'
import * as idb from '../../lib/idb.mjs'
import * as globals from '../../lib/globals.mjs'
import * as message from './message.mjs'
import * as encoding from '../../lib/encoding.js'
import * as decoding from '../../lib/decoding.js'
import * as idb from '../../lib/idb.js'
import * as globals from '../../lib/globals.js'
import * as message from './message.js'
/**
* Get 'client-unconfirmed' store from transaction

View File

@@ -1,6 +1,6 @@
import * as globals from '../../lib/globals.mjs'
import * as idbactions from './idbactions.mjs'
import * as test from '../../lib/testing.mjs'
import * as globals from '../../lib/globals.js'
import * as idbactions from './idbactions.js'
import * as test from '../../lib/testing.js'
idbactions.deleteDB().then(() => idbactions.openDB()).then(db => {
test.run('update lifetime 1', async (testname) => {

View File

@@ -2,7 +2,7 @@
* @module provider/ydb
*/
import * as ydbclient from './YdbClient.mjs'
import * as ydbclient from './YdbClient.js'
/**
* @param {string} url

View File

@@ -2,11 +2,11 @@
* @module provider/ydb
*/
import * as encoding from './encoding.mjs'
import * as decoding from './decoding.mjs'
import * as idbactions from './idbactions.mjs'
import * as logging from './logging.mjs'
import * as bc from './broadcastchannel.mjs'
import * as encoding from './encoding.js'
import * as decoding from './decoding.js'
import * as idbactions from './idbactions.js'
import * as logging from './logging.js'
import * as bc from './broadcastchannel.js'
/* make sure to update message.go in ydb when updating these values.. */
export const MESSAGE_UPDATE = 0 // TODO: rename host_unconfirmed?