Commit Graph

9 Commits

Author SHA1 Message Date
Mia
b11177d530
Migrate to esbuild for compilation (#9203) 2022-12-22 15:19:29 -06:00
Alexander B
1d5334432e
Hangman: Prevent impossible guesses, escape HTML (#9033)
* Prevent guessing words with incorrect already revealed indexes

* Clarify hint length and use consts

* Escape HTML on words

* lint

* Hangman: Better testing for invalid guesses

* Hangman: Escape HTML characters

Co-authored-by: Leonard Craft III <leonardcraft64@gmail.com>
2022-11-23 12:50:09 -08:00
Annika
c134195915
Use ts-node instead of Sucrase (#8369) 2021-07-09 19:59:22 -07:00
Guangcong Luo
a68656a8e7 Support destroying rooms in unit tests
Matchmaking unit tests currently rely on destroying and re-creating a
user causing them to forget about battles they're in, which is not
actually supposed to happen, and breaks #7815.
2021-01-10 03:39:01 -08:00
Guangcong Luo
66fe68e8ee Tests: Refactor users-utils
The old users-utils had an unnecessarily difficult-to-use API. This
new one should be more straightforward and unified.
2021-01-09 22:33:32 -08:00
Guangcong Luo
46c9afa2f3
"Remove" the global room (#6885)
I couldn't completely remove the global room in one commit, but this
solves basically every problem with it by making it no longer a `Room`.

In particular, this means:

- It's no longer of type `Room`
- It's no longer in the `Rooms.rooms` table
- Its class name is now `GlobalRoomState` rather than `GlobalRoom`
- It no longer tracks its own user list (online user count is now
  provided by `Users.onlineCount`)
- It's no longer a socket channel (there's new syntax for "send this
  message to every user")
2020-07-02 11:31:34 -07:00
Guangcong Luo
f6f4467265 Turn on prefer-const for .js files
Not having prefer-const on the JS side makes JS -> TS refactors really
unreadable. This commit just auto-fixes it so we're using
`prefer-const` everywhere.
2020-04-23 11:37:47 -07:00
Guangcong Luo
776ccf9796
Refactor Sockets to ProcessManager+TypeScript (#6584) 2020-04-17 04:05:45 -07:00
Kirk Scheibelhut
8c7abf8729 Move dev-tools/user-utils.js -> test/user-utils.js 2019-04-15 15:24:56 -07:00