Skip to content

Commit

Permalink
ci: fix benchmarking
Browse files Browse the repository at this point in the history
  • Loading branch information
foxxyz committed Dec 31, 2023
1 parent cd910c0 commit d5ebac8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions client.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ if (typeof WebSocket === 'undefined') {
global.WebSocket = (await import('ws')).WebSocket
}
import EventEmitter from 'events'
import { createLogger } from './util'
import { JSONArraySerializer } from './serializers'
import { createLogger } from './util.js'
import { JSONArraySerializer } from './serializers.js'

export class Client extends EventEmitter {
// Support Vue components
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { Client } from './client'
export { Server } from './server'
export { Client } from './client.js'
export { Server } from './server.js'
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { WebSocketServer } from 'ws'
import { performance } from 'perf_hooks'
import EventEmitter from 'events'
import { createLogger } from './util'
import { JSONArraySerializer } from './serializers'
import { createLogger } from './util.js'
import { JSONArraySerializer } from './serializers.js'

export class Server extends EventEmitter {
constructor({ host = '127.0.0.1', port = 8090, verbosity = 1, serializer = JSONArraySerializer, maxSendBuffer = 20000, ...wssOpts } = {}) {
Expand Down
6 changes: 3 additions & 3 deletions test/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const Benchmark = require('benchmark')
const { Client } = require('..')
const { MockSocket } = require('./mocks/socket')
import Benchmark from 'benchmark'
import { Client } from '../index.js'
import { MockSocket } from './mocks/socket.js'

global.WebSocket = MockSocket

Expand Down
2 changes: 1 addition & 1 deletion vue.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Client } from '.'
import { Client } from './index.js'
import { inject, onBeforeUnmount, reactive } from 'vue'

export function createSocket(url, { autoConnect = true, ...options } = {}) {
Expand Down

0 comments on commit d5ebac8

Please sign in to comment.