Commit Graph

36 Commits

Author SHA1 Message Date
Guangcong Luo
455546c69f Remove sucrase dependency 2025-07-23 22:13:33 -07:00
Guangcong Luo
6e2ca2b3ff Update some dependencies 2025-07-23 21:36:32 -07:00
Guangcong Luo
7a9e535e35
Vendor node-static (#11295)
Also includes a decent amount of refactoring to bring it in line with Showdown code standards.

---------

Co-authored-by: Slayer95 <ivojulca@hotmail.com>
2025-07-23 21:19:55 -07:00
Slayer95
0b6c1dbeec
Make some dependencies optional: probe-image-size, source-map-support (#11247) 2025-07-14 03:01:41 -07:00
Guangcong Luo
23c0ec34d2 Update dependencies
Some checks failed
Node.js CI / build (18.x) (push) Waiting to run
Publish to npm / test (push) Has been cancelled
Publish to npm / get-version (push) Has been cancelled
Publish to npm / npm-publish (push) Has been cancelled
2025-03-03 04:26:26 -08:00
Guangcong Luo
95d6547739 Update SQLite dependencies
Some checks failed
Node.js CI / build (18.x) (push) Waiting to run
Publish to npm / test (push) Has been cancelled
Publish to npm / get-version (push) Has been cancelled
Publish to npm / npm-publish (push) Has been cancelled
2025-03-02 00:10:22 -08:00
Guangcong Luo
c0fcb03f4c Ugh I forgot why we can't update @types/node
(Newer versions don't play well with CommonJS modules. And there isn't
really even anywhere I can comment this to remind me not to do it...)
2025-02-26 20:21:10 -08:00
Guangcong Luo
d4fc262f7f Remove Node crypto dependency from sim 2025-02-26 18:03:08 -08:00
Guangcong Luo
78439b4a02
Update to ESLint 9 (#10926)
ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.

- First, we no longer have separate eslint-no-types configs. Lint
  performance shouldn't be enough of a problem to justify the
  relevant maintenance complexity.

- Second, our base config should work out-of-the-box now. `npx eslint`
  will work as expected, without any CLI flags. You should still use
  `npm run lint` which adds the `--cached` flag for performance.

- Third, whatever updates I did fixed style linting, which apparently
  has been bugged for quite some time, considering all the obvious
  mixed-tabs-and-spaces issues I found in the upgrade.

Also here are some changes to our style rules. In particular:

- Curly brackets (for objects etc) now have spaces inside them. Sorry
  for the huge change. ESLint doesn't support our old style, and most
  projects use Prettier style, so we might as well match them in this way.
  See https://github.com/eslint-stylistic/eslint-stylistic/issues/415

- String + number concatenation is no longer allowed. We now
  consistently use template strings for this.
2025-02-25 20:03:46 -08:00
Mia
d3e60b31f7
Sim: Use a CSPRNG (#10806)
* Sim: Use a CSPRNG

* Add test

* fix test prng

* move prng test to others

* fix slight hack

* tf?

* Fuck this

* fucking lol

* fix crap

* i'm going to kill someone

* i hate state

* fix test

* Good work genius

* typo

* Fix exportinputlog

* Refactor for inputlog backwards compatibility

This is a pretty major refactor which is mostly unrelated to the
feature, but it does make the code a lot simpler.

* Readability pass

* Readability (again)

* Remove sodium-native dependency

* Refactor to serialize seeds in hex strings

(Also removes the Buffer dependency from PRNG, and slightly improves
comments.)

* Apparently << is 32-bit signed

* Readability

---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-01-11 13:56:34 -06:00
Abhishek Singh
4cece4ee98
Upgrade node version readme and package.json (#10672)
Some checks failed
Node.js CI / build (16.x) (push) Waiting to run
Publish to npm / test (push) Has been cancelled
Publish to npm / get-version (push) Has been cancelled
Publish to npm / npm-publish (push) Has been cancelled
2024-11-12 03:32:09 -08:00
Mia
91e73385ab Bump mysql2 version 2024-04-24 00:41:15 -05:00
Mia
6ff3df3138 Bump mysql2 version 2024-04-13 00:43:44 -05:00
Christopher Monsanto
21bfd2b0cc commit package-lock for last commit 2024-02-26 14:07:22 -05:00
Guangcong Luo
9d45b67207 Sync package-lock 2023-12-07 15:36:50 -05:00
Guangcong Luo
6b42b4f6b2 Experimental direct replay uploading
We have a new replay server on a new engine using a new schema.

Everything's gone remarkably well, considering.
2023-12-02 11:07:08 -05:00
Mia
c89c68ad3a Use source maps for better error stacks
This has been very annoying.
2023-11-26 22:49:46 -06:00
Ashley
167af27c7d
Update Smogon package version (#9916) 2023-11-21 19:31:05 -06:00
Guangcong Luo
def35420ef Bump probe-image-size version 2023-11-04 22:02:58 -07:00
Guangcong Luo
2c19ae7aeb
Release 0.11.9
Previous NPM package had a postinstall script that made it fail to
install. This fixes that.

TypeScript types still aren't working, as I suspected. That will
come in a future version.
2023-04-14 11:50:05 +09:00
Guangcong Luo
828255d8bf
Release 0.11.8
This is our first release on our new NPM build system. Let's see how
good it is.
2023-04-13 18:08:48 +09:00
Annika
0bc78dddf5 TypeScript 5! 2023-04-09 13:02:19 -07:00
Christopher Monsanto
328454f695 Add package-lock.json 2023-02-16 19:42:58 -05:00
Guangcong Luo
2e85de348f Disable package-lock.json
NPM's official documentation says that package-lock.json should be part
of the repository.

Why? `package-lock.json` is basically a snapshot of the `node_modules/`
directory. You can think of it like `node_modules.zip`, except more
human-readable, and requires an internet connection to unzip.

The main advantage of adding it to Git is that it lets you know exactly
the state of `node_modules/` at the time the programmer commits it. So
if a dependency breaks, it's easier to trace exactly when it broke.

It also makes sure `node_modules/` is exactly the same between
different development environments, so differences don't cause bugs to
appear for some developers but not others.

This comes with a number of disadvantages. The biggest one is that it
causes package-lock changes to appear in random commits, which can
outright lead to merge conflicts. Not to mention making diffs in
general significantly less readable.

And a lot of stated advantages aren't actually true (paraphrased):

> If I install express ^4.15.4, and later express 4.15.5 is released,
> a contributor would run `npm install` and gets 4.15.5, we would
> have different versions.

Like, this is intended behavior. If I didn't want that behavior, I'd
specify the express version as 4.15.4 instead of ^4.15.4. We can still
have the same version if we just re-run `npm install`, which we would
STILL have to do if we were using a package-lock file. The
package-lock file does not improve this situation.

(A Dev poll showed that most devs were in support of this.)
2018-01-12 22:19:05 -06:00
Morfent
777ba0fc5f Sockets: implement permessage-deflate support (#4253)
Permessage-deflate is an extensIon that compresses websocket messages with zlib.
SockJS already supports it (indirectly) and the client's load balancer already
inserts the header in the opening handshake when making a WebSocket connection.

Config.wsdeflate makes this optional and allows tweaking the extension's resource
usage.
2017-12-15 15:43:48 -06:00
Guangcong Luo
819ff64d06 Update dependencies 2017-11-17 19:41:32 -06:00
Guangcong Luo
ce8dc52501 Replace ofe with node-oom-heapdump
(ofe is no longer actively maintained)
2017-11-17 19:39:54 -06:00
Guangcong Luo
bfeb75f547 Remove nonDefaultDependencies hack
Modern versions of npm have made it less and less tenable to have
truly optional dependencies, so we'll just bite the bullet and let
people have slightly slower installs in exchange for not having to
deal with npm weirdness.
2017-11-17 19:31:09 -06:00
Guangcong Luo
fa0bc881b5 Update TypeScript version 2017-11-06 21:49:53 -06:00
Guangcong Luo
3b2ada7c43 Update misc dependencies 2017-10-08 03:43:12 -05:00
Guangcong Luo
dcffa2a37d Update Mocha dependency 2017-10-08 03:36:04 -05:00
Guangcong Luo
c4e13fc4fa Update dependencies
Mocha 4 has a weird issue where it doesn't terminate, so we can't use
it for now.
2017-10-07 23:59:52 -05:00
Ben Davies
b2267bab47 Update package-lock.json 2017-08-18 12:07:52 -03:00
Guangcong Luo
6e7aa9c8dd Remove mock-fs-require-fix from dependencies 2017-07-25 03:01:15 -04:00
Guangcong Luo
0143ae28dd Replace fs module (#3686)
The new FS module is an abstraction layer over the built-in fs module.

The main reason it exists is because I need an abstraction layer I can
disable writing from. But that'll be in another commit.

Currently, mine is better because:
 - paths are always relative to PS's base directory
 - Promises (seriously wtf Node Core what are you thinking)
 - PS-style API: FS("foo.txt").write("bar") for easier argument order
 - mkdirp

This also increases the minimum supported Node version from v6.0 to
v7.7, because we now use async/await. Sorry for the inconvenience!

This also drops the mock-fs-require-fix dependency

mock-fs-require-fix was always kind of a huge hack. It's no longer
necessary, with an FS API that does everything it used to.

This removes a lot of other hacks from test/main.js, which is nice.
2017-06-24 13:42:54 -07:00
Guangcong Luo
eb4a940b18 Commit npm 5 package-lock.json 2017-06-16 00:53:29 -05:00