Skip to content

Commit

Permalink
chore: update deps (nestjs 11 + vitest 3)
Browse files Browse the repository at this point in the history
  • Loading branch information
7185 committed Jan 22, 2025
1 parent a2bb7c2 commit ef0900b
Show file tree
Hide file tree
Showing 17 changed files with 10,801 additions and 11,578 deletions.
14 changes: 7 additions & 7 deletions action-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test:watch": "vitest",
"test:cov": "vitest run --coverage",
"test:debug": "vitest --inspect-brk --inspect --logHeapUsage --no-file-parallelism",
"lint": "eslint --flag unstable_ts_config \"{src,test}/**/*.ts\"",
"lint": "eslint \"{src,test}/**/*.ts\"",
"format": "prettier --write \"{src,test}/**/*.{m,}ts\" \"*.{m,}ts\""
},
"license": "MIT",
Expand All @@ -19,16 +19,16 @@
},
"devDependencies": {
"@eslint/js": "^9.10.0",
"@swc/core": "^1.10.6",
"@vitest/coverage-v8": "^2.1.8",
"eslint": "^9.17.0",
"@swc/core": "^1.10.9",
"@vitest/coverage-v8": "^3.0.3",
"eslint": "^9.18.0",
"globals": "^15.14.0",
"jiti": "^2.4.2",
"prettier": "^3.4.2",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.19.1",
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0",
"unplugin-swc": "^1.5.1",
"vitest": "^2.1.6"
"vitest": "^3.0.3"
}
}
54 changes: 27 additions & 27 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"start:dev": "nest start --watch",
"start:debug": "nest start --debug --watch",
"start:prod": "node dist/main",
"lint": "eslint --flag unstable_ts_config \"{src,test}/**/*.ts\"",
"lint:fix": "eslint --flag unstable_ts_config \"{src,test}/**/*.{m,}ts\" --fix",
"lint": "eslint \"{src,test}/**/*.ts\"",
"lint:fix": "eslint \"{src,test}/**/*.{m,}ts\" --fix",
"test": "vitest run",
"test:watch": "vitest",
"test:cov": "vitest run --coverage",
Expand All @@ -23,50 +23,50 @@
"postinstall": "prisma generate --generator client"
},
"dependencies": {
"@fastify/cookie": "^9.4.0",
"@fastify/static": "^7.0.4",
"@nestjs/axios": "^3.1.3",
"@nestjs/cache-manager": "^2.3.0",
"@nestjs/common": "^10.4.15",
"@nestjs/core": "^10.4.15",
"@nestjs/jwt": "^10.2.0",
"@nestjs/platform-fastify": "^10.4.15",
"@nestjs/platform-ws": "^10.4.15",
"@nestjs/websockets": "^10.4.15",
"@fastify/cookie": "^11.0.2",
"@fastify/static": "^8.0.4",
"@nestjs/axios": "^4.0.0",
"@nestjs/cache-manager": "^3.0.0",
"@nestjs/common": "^11.0.4",
"@nestjs/core": "^11.0.4",
"@nestjs/jwt": "^11.0.0",
"@nestjs/platform-fastify": "^11.0.4",
"@nestjs/platform-ws": "^11.0.4",
"@nestjs/websockets": "^11.0.4",
"@prisma/client": "^6.2.1",
"axios": "^1.7.9",
"cache-manager": "^5.7.6",
"cache-manager": "^6.3.2",
"class-validator": "^0.14.1",
"nestjs-pino": "^4.2.0",
"pino-http": "^10.3.0",
"nestjs-pino": "^4.3.0",
"pino-http": "^10.4.0",
"pino-pretty": "^13.0.0",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"ws": "^8.18.0"
},
"devDependencies": {
"@eslint/js": "^9.10.0",
"@nestjs/cli": "^10.4.9",
"@nestjs/schematics": "^10.2.3",
"@nestjs/testing": "^10.4.15",
"@swc/cli": "^0.5.2",
"@swc/core": "^1.10.6",
"@types/node": "^20.17.7",
"@nestjs/cli": "^11.0.2",
"@nestjs/schematics": "^11.0.0",
"@nestjs/testing": "^11.0.4",
"@swc/cli": "^0.6.0",
"@swc/core": "^1.10.9",
"@types/node": "^20.17.14",
"@types/supertest": "^6.0.2",
"@types/ws": "^8.5.13",
"@vitest/coverage-v8": "^2.1.8",
"eslint": "^9.17.0",
"@vitest/coverage-v8": "^3.0.3",
"eslint": "^9.18.0",
"jiti": "^2.4.2",
"prettier": "^3.4.2",
"prisma": "^6.2.1",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-loader": "^9.5.1",
"ts-loader": "^9.5.2",
"ts-node": "^10.9.2",
"tsconfig-paths": "4.2.0",
"typescript": "^5.7.2",
"typescript-eslint": "^8.19.1",
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0",
"unplugin-swc": "^1.5.1",
"vitest": "^2.1.6"
"vitest": "^3.0.3"
}
}
2 changes: 1 addition & 1 deletion backend/src/world/world.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class WorldService {

async getTerrainPage(wid: number, pageX: number, pageZ: number) {
const cacheKey = `T-${wid}-${pageX}-${pageZ}`
let page: Partial<Record<number, [number, number]>> | undefined =
let page: Partial<Record<number, [number, number]>> | null =
await this.cache.get(cacheKey)
if (page == null) {
page = {}
Expand Down
10 changes: 5 additions & 5 deletions bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"start": "node --import 'data:text/javascript,import {register} from \"node:module\"; import {pathToFileURL} from \"node:url\"; register(\"ts-node/esm\", pathToFileURL(\"./\"));' src/bonobot.ts",
"format": "prettier --write \"src/**/*.ts\" \"*.{m,}ts\"",
"lint": "eslint --flag unstable_ts_config \"src/**/*.ts\""
"lint": "eslint \"src/**/*.ts\""
},
"license": "MIT",
"dependencies": {
Expand All @@ -16,13 +16,13 @@
},
"devDependencies": {
"@eslint/js": "^9.10.0",
"@types/node": "^20.17.7",
"@types/node": "^20.17.14",
"@types/ws": "^8.5.13",
"eslint": "^9.17.0",
"eslint": "^9.18.0",
"jiti": "^2.4.2",
"prettier": "^3.4.2",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"typescript-eslint": "^8.19.1"
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0"
}
}
39 changes: 20 additions & 19 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,52 @@
"build:watch": "ng build --configuration development --watch",
"format": "prettier --write \"src/**/*.ts\" \"*.{m,}ts\"",
"test": "ng test",
"lint": "eslint --flag unstable_ts_config",
"lint": "eslint",
"postinstall": "cd ../ && npm run patch:frontend"
},
"private": true,
"dependencies": {
"@angular/animations": "^19.0.5",
"@angular/cdk": "^19.0.4",
"@angular/common": "^19.0.5",
"@angular/compiler": "^19.0.5",
"@angular/core": "^19.0.5",
"@angular/forms": "^19.0.6",
"@angular/material": "^19.0.5",
"@angular/platform-browser": "^19.0.5",
"@angular/platform-browser-dynamic": "^19.0.6",
"@angular/router": "^19.0.6",
"@angular/animations": "^19.1.2",
"@angular/cdk": "^19.1.0",
"@angular/common": "^19.1.2",
"@angular/compiler": "^19.1.2",
"@angular/core": "^19.1.2",
"@angular/forms": "^19.1.2",
"@angular/material": "^19.1.0",
"@angular/platform-browser": "^19.1.2",
"@angular/platform-browser-dynamic": "^19.1.2",
"@angular/router": "^19.1.2",
"@fontsource/arimo": "^5.1.1",
"@fortawesome/angular-fontawesome": "^1.0.0",
"@fortawesome/free-solid-svg-icons": "^6.7.2",
"@iharbeck/ngx-virtual-scroller": "^19.0.1",
"@lemuria/action-parser": "file:../action-parser",
"@tweenjs/tween.js": "^25.0.0",
"aw-sequence-parser": "^0.4.2",
"fflate": "^0.8.2",
"linkify-string": "^4.2.0",
"linkifyjs": "^4.2.0",
"rxjs": "~7.8.1",
"three": "^0.172.0",
"three-mesh-bvh": "^0.8.3",
"three-mesh-bvh": "^0.9.0",
"three-rwx-loader": "^0.12.4",
"tslib": "^2.8.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^19.0.6",
"@angular/cli": "^19.0.7",
"@angular/compiler-cli": "^19.0.5",
"@angular-devkit/build-angular": "^19.1.3",
"@angular/cli": "^19.1.3",
"@angular/compiler-cli": "^19.1.2",
"@eslint/js": "^9.10.0",
"@types/node": "^20.17.7",
"@types/node": "^20.17.14",
"@types/three": "^0.172.0",
"@types/webgl2": "^0.0.11",
"@typescript-eslint/types": "^8.10.0",
"angular-eslint": "^19.0.2",
"eslint": "^9.17.0",
"eslint": "^9.18.0",
"patch-package": "^8.0.0",
"prettier": "^3.4.2",
"ts-node": "^10.9.2",
"typescript": ">=5.5.0 <5.7.0",
"typescript-eslint": "^8.19.1"
"typescript": ">=5.5.0 <5.8.0",
"typescript-eslint": "^8.21.0"
}
}
23 changes: 10 additions & 13 deletions frontend/src/app/auth/auth.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {ChangeDetectionStrategy, Component, inject} from '@angular/core'
import type {OnInit} from '@angular/core'
import {FormBuilder, ReactiveFormsModule, Validators} from '@angular/forms'
import type {FormControl, FormGroup} from '@angular/forms'
import {ActivatedRoute, Router} from '@angular/router'
Expand Down Expand Up @@ -36,7 +35,7 @@ import {
styleUrl: './auth.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class AuthComponent implements OnInit {
export class AuthComponent {
faCircleNotch = faCircleNotch
faEye = faEye
faEyeSlash = faEyeSlash
Expand Down Expand Up @@ -66,6 +65,15 @@ export class AuthComponent implements OnInit {
username: this.usernameCtl,
password: this.passwordCtl
})

this.loginForm.setValue({
username: localStorage.getItem('login') ?? '',
password: ''
})
this.returnUrl = this.route.snapshot.queryParams.next || '/'
if (this.http.isLogged()) {
this.router.navigate([this.returnUrl])
}
}

onLogin(): void {
Expand All @@ -88,15 +96,4 @@ export class AuthComponent implements OnInit {
}
})
}

ngOnInit(): void {
this.loginForm.setValue({
username: localStorage.getItem('login') ?? '',
password: ''
})
this.returnUrl = this.route.snapshot.queryParams.next || '/'
if (this.http.isLogged()) {
this.router.navigate([this.returnUrl])
}
}
}
4 changes: 2 additions & 2 deletions frontend/src/app/engine/engine.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class EngineComponent implements OnInit, OnDestroy {
private readonly engineSvc = inject(EngineService)
private readonly world = inject(WorldService)

ngOnInit(): void {
ngOnInit() {
this.engineSvc.createScene(
this.rendererCanvas(),
this.labelZone(),
Expand All @@ -35,7 +35,7 @@ export class EngineComponent implements OnInit, OnDestroy {
this.engineSvc.animate()
}

ngOnDestroy(): void {
ngOnDestroy() {
this.world.destroyWorld()
this.engineSvc.clearScene()
this.engineSvc.cancel()
Expand Down
17 changes: 10 additions & 7 deletions frontend/src/app/engine/engine.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Cache,
Clock,
Color,
Euler,
Fog,
Group,
Mesh,
Expand Down Expand Up @@ -55,10 +56,10 @@ Mesh.prototype.raycast = acceleratedRaycast
// the render loop
const _updateMatrixWorld = Object3D.prototype.updateMatrixWorld
Object3D.prototype.updateMatrixWorld = function () {
if (!this.parent?.visible && this.name.slice(-4) === '.rwx') {
if (this.name.endsWith('.rwx') && !this.parent?.visible) {
return
}
_updateMatrixWorld.apply(this)
_updateMatrixWorld.call(this)
}

// This defines which chunks (offset from the current chunk we sit in) we will
Expand Down Expand Up @@ -162,6 +163,7 @@ export class EngineService {
['del', 'delete']
])

private spriteRotation = new Euler()
private tmpObjPos = new Vector3()
private tmpPrevUserPos = new Vector3()

Expand Down Expand Up @@ -624,7 +626,7 @@ export class EngineService {
this.player.avatar.visible = this.activeCamera !== this.camera
}

setPlayerPos(pos: Vector3 | string, yaw = 0): void {
setPlayerPos(pos: Vector3Like | string, yaw = 0): void {
this.player.setPos(pos, yaw)
this.player.isOnFloor = true
}
Expand Down Expand Up @@ -800,7 +802,7 @@ export class EngineService {
obj = obj.parent!
}
if (
obj.name.slice(-4) === '.rwx' &&
obj.name.endsWith('.rwx') &&
obj.parent!.visible &&
!obj?.userData?.notVisible
) {
Expand Down Expand Up @@ -915,10 +917,10 @@ export class EngineService {
break
}
case 'flash':
fx = Math.random() > 0.02 ? 0 : 1
fx = +(Math.random() <= 0.02)
break
case 'flicker':
fx = Math.random() > 0.02 ? 1 : 0
fx = +(Math.random() > 0.02)
break
default:
break
Expand Down Expand Up @@ -1147,8 +1149,9 @@ export class EngineService {
}

private rotateSprites() {
this.spriteRotation.y = this.player.rotation.y
for (const prop of this.sprites) {
prop.rotation.set(0, this.player.rotation.y, 0)
prop.rotation.copy(this.spriteRotation)
prop.updateMatrix()
}
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/engine/player.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Group, Object3D, Vector3} from 'three'
import type {LOD, Mesh, Triangle} from 'three'
import type {LOD, Mesh, Triangle, Vector3Like} from 'three'
import {PlayerCollider} from './player-collider'
import {DEG, TERRAIN_PAGE_SIZE} from '../utils/constants'
import {radNormalized, stringToPos} from '../utils/utils'
Expand Down Expand Up @@ -56,7 +56,7 @@ export class Player {
this.collider = new PlayerCollider(height, this.position)
}

setPos(pos: Vector3 | string, yaw = 0): void {
setPos(pos: Vector3Like | string, yaw = 0): void {
if (this.entity == null || pos == null) {
return
}
Expand Down
Loading

0 comments on commit ef0900b

Please sign in to comment.