Skip to content
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.

Upgrade to node 18 and dependencies #46

Merged
merged 6 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
},
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-buster-slim
FROM node:18-buster-slim

COPY . /app

Expand Down
2 changes: 1 addition & 1 deletion dev/build
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ docker run --rm -it \
--volume "${PWD}/../:/app" \
--entrypoint="npm" \
--workdir="/app" \
node:16-buster-slim run build
node:18-buster-slim run build
2 changes: 1 addition & 1 deletion dev/exec
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ docker run --rm -it \
--volume "${PWD}/../:/app" \
--entrypoint="/bin/bash" \
--workdir="/app" \
node:16-buster-slim
node:18-buster-slim
2 changes: 1 addition & 1 deletion dev/npm
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ docker run --rm -it \
--volume "${PWD}/../:/app" \
--entrypoint="npm" \
--workdir="/app" \
node:16-buster-slim "$@"
node:18-buster-slim "$@"
2 changes: 1 addition & 1 deletion dev/serve
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ docker run --rm -it \
--volume "${PWD}/../:/app" \
--entrypoint="npm" \
--workdir="/app" \
node:16-buster-slim run serve
node:18-buster-slim run serve
2,798 changes: 1,550 additions & 1,248 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,33 @@
"build:page": "vue-cli-service build"
},
"dependencies": {
"axios": "^0.27.2",
"axios": "^1.6.7",
"eventemitter3": "^5.0.0",
"resize-observer-polyfill": "^1.5.1",
"vue": "^2.6.14",
"vue": "^2.7.16",
"vue-class-component": "^7.2.6",
"vue-property-decorator": "^9.1.2"
},
"devDependencies": {
"@fortawesome/fontawesome-free": "^6.1.1",
"@types/node": "^16.11.35",
"@types/node": "^18.0.0",
"@types/vue": "^2.0.0",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"@typescript-eslint/eslint-plugin": "^6.19.1",
"@typescript-eslint/parser": "^6.19.1",
"@vue/cli-plugin-babel": "^5.0.4",
"@vue/cli-plugin-eslint": "^5.0.4",
"@vue/cli-plugin-typescript": "^5.0.4",
"@vue/cli-service": "^5.0.4",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^10.0.0",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"eslint": "^8.15.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.7.1",
"prettier": "^2.6.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vue": "^9.20.1",
"prettier": "^3.2.4",
"sass": "^1.51.0",
"sass-loader": "^12.6.0",
"sass-loader": "^14.0.0",
"ts-node": "^10.7.0",
"typescript": "^4.6.4",
"typescript": "^5.3.3",
"vue-template-compiler": "^2.6.14"
},
"files": [
Expand Down
5 changes: 3 additions & 2 deletions src/component/internal/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as EVENT from '../types/events'
import * as message from '../types/messages'

import EventEmitter from 'eventemitter3'
import { AxiosProgressEvent } from 'axios'
import { Logger } from '../utils/logger'
import { NekoConnection } from './connection'
import NekoState from '../types/state'
Expand All @@ -17,7 +18,7 @@ export interface NekoEvents {

// drag and drop events
['upload.drop.started']: () => void
['upload.drop.progress']: (progressEvent: ProgressEvent) => void
['upload.drop.progress']: (progressEvent: AxiosProgressEvent) => void
['upload.drop.finished']: (error?: Error) => void

// upload dialog events
Expand Down Expand Up @@ -340,7 +341,7 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
}
}

protected [EVENT.FILE_CHOOSER_DIALOG_CLOSED]({ id }: message.SessionID) {
protected [EVENT.FILE_CHOOSER_DIALOG_CLOSED]({}: message.SessionID) {
this._localLog.debug(`EVENT.FILE_CHOOSER_DIALOG_CLOSED`)
this.emit('upload.dialog.closed')
}
Expand Down
2 changes: 1 addition & 1 deletion src/component/internal/video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function register(el: HTMLVideoElement, state: Video) {
Vue.set(state, 'playable', false)
Vue.set(state, 'playing', false)
})
el.addEventListener('volumechange', (value) => {
el.addEventListener('volumechange', () => {
Vue.set(state, 'muted', el.muted)
Vue.set(state, 'volume', el.volume)
})
Expand Down
2 changes: 1 addition & 1 deletion src/component/internal/webrtc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
stats = await this._peer.getStats()
} else {
// callback browsers support
await new Promise((res, rej) => {
await new Promise((res) => {
//@ts-ignore
this._peer.getStats((stats) => res(stats))
})
Expand Down
4 changes: 2 additions & 2 deletions src/component/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
export * as webrtcTypes from './types/webrtc'

import { Configuration } from './api/configuration'
import { AxiosInstance } from 'axios'
import { AxiosInstance, AxiosProgressEvent } from 'axios'

import { Vue, Component, Ref, Watch, Prop } from 'vue-property-decorator'
import ResizeObserver from 'resize-observer-polyfill'
Expand Down Expand Up @@ -576,7 +576,7 @@
this.events.emit('upload.drop.started')

await this.api.room.uploadDrop(x, y, files, {
onUploadProgress: (progressEvent: ProgressEvent) => {
onUploadProgress: (progressEvent: AxiosProgressEvent) => {
this.events.emit('upload.drop.progress', progressEvent)
},
})
Expand Down
2 changes: 1 addition & 1 deletion src/component/screencast.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</template>

<script lang="ts">
import { Vue, Component, Ref, Watch, Prop } from 'vue-property-decorator'
import { Vue, Component, Watch, Prop } from 'vue-property-decorator'
import { RoomApi } from './api'

const REFRESH_RATE = 1e3
Expand Down
4 changes: 2 additions & 2 deletions src/page/components/events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
neko.state.connection.status == 'disconnected'
? 'background: red;'
: neko.state.connection.status == 'connecting'
? 'background: #17448a;'
: ''
? 'background: #17448a;'
: ''
"
>
{{ neko.state.connection.status }}
Expand Down
2 changes: 1 addition & 1 deletion src/page/components/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</style>

<script lang="ts">
import { Component, Prop, Ref, Watch, Vue } from 'vue-property-decorator'
import { Component, Prop, Watch, Vue } from 'vue-property-decorator'
import Neko from '~/component/main.vue'

@Component({
Expand Down
2 changes: 1 addition & 1 deletion src/page/components/members.vue
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@

async updateProfile(memberId: string, memberProfile: ApiModels.MemberProfile) {
try {
const res = await this.neko.members.membersUpdateProfile(memberId, memberProfile)
await this.neko.members.membersUpdateProfile(memberId, memberProfile)
const members = this.members.map((member) => {
if (member.id == memberId) {
return {
Expand Down
16 changes: 13 additions & 3 deletions src/page/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@
})
})(require.context('./plugins/', true, /(main-tabs|main-components)\.vue$/))

import { Vue, Component, Ref, Watch } from 'vue-property-decorator'
import { Vue, Component, Ref } from 'vue-property-decorator'
import { AxiosProgressEvent } from 'axios'
import NekoCanvas from '~/component/main.vue'
import NekoHeader from './components/header.vue'
import NekoConnect from './components/connect.vue'
Expand Down Expand Up @@ -398,7 +399,11 @@
this.uploadProgress = 0
try {
await this.neko.room.uploadDialog([...files], {
onUploadProgress: (progressEvent: ProgressEvent) => {
onUploadProgress: (progressEvent: AxiosProgressEvent) => {
if (!progressEvent.total) {
this.uploadProgress = 0
return
}
this.uploadProgress = (progressEvent.loaded / progressEvent.total) * 100
},
})
Expand Down Expand Up @@ -455,7 +460,11 @@
this.uploadActive = true
this.uploadProgress = 0
})
this.neko.events.on('upload.drop.progress', (progressEvent: ProgressEvent) => {
this.neko.events.on('upload.drop.progress', (progressEvent: AxiosProgressEvent) => {
if (!progressEvent.total) {
this.uploadProgress = 0
return
}
this.uploadProgress = (progressEvent.loaded / progressEvent.total) * 100
})
this.neko.events.on('upload.drop.finished', (e?: any) => {
Expand All @@ -473,6 +482,7 @@
})
this.neko.events.on('upload.dialog.overlay', (id: string) => {
this.dialogOverlayActive = true
console.log('upload.dialog.overlay', id)
})
this.neko.events.on('upload.dialog.closed', () => {
this.dialogOverlayActive = false
Expand Down
Loading