Commit Graph

256 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
7d8f01f849
Remove build on postinstall (#11244)
- Errors in the node build script will no longer cause a false perception
that dependencies cannot be installed.
- Simplifies 1cea3f39cb
2025-07-14 13:34:46 -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
995b43201a v0.11.10
Most notable in this release:

- TypeScript types are working! (62023bd299)

I don't know if the previous f47e38c5a system worked, but the new one
I've tested and confirmed it does!
2025-02-26 16:46:32 -08:00
Guangcong Luo
3a67602d6a Update NPM publish workflow 2025-02-26 16:45:39 -08:00
Guangcong Luo
66c90ebd29 Make sure CI correctly stops warnings
`full-test-ci` doesn't run on push to master, only `full-test`, so both
need the `--no-warnings` eslint flag.
2025-02-26 15:18:46 -08:00
Guangcong Luo
f301e930f6 Fix NPM publishing 2025-02-26 14:15:16 -08:00
Guangcong Luo
62023bd299 Emit .d.ts types for NPM package
Some checks are pending
Publish to npm / test (push) Waiting to run
Publish to npm / get-version (push) Waiting to run
Publish to npm / npm-publish (push) Blocked by required conditions
Node.js CI / build (18.x) (push) Waiting to run
2025-02-26 02:44: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
7880608ad2 Carry over client change 2024-03-16 12:47:45 -04:00
Mia
584a03fa95 Package.json: Lock eslint version
eslint is removing their style linting, so this is a stopgap measure to prevent that.
2024-02-26 11:37:14 -06:00
Guangcong Luo
84905e3078 Fix CI bug when PRs delete files
`full-test-ci` receives a list of modified (including deleted) files,
but eslint complains when it tries to lint a nonexistent file.
Fortunately, it has a flag to ignore missing files which we can
just use here.
2023-12-02 14:16:58 -06: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
tofa
3901e11b8b
Github Actions: Perform selective eslint & testing for PRs (#9506) 2023-04-30 02:51:19 -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
1cea3f39cb
Don't rebuild if installed by NPM package 2023-04-14 11:44:52 +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
Mia
35420b5a5e package.json: Add a postinstall script
This is for those who are installing from a git link rather than the severely outdated NPM package.
2023-01-05 09:31:53 -06:00
Mia
a95cde1ab8 Fix TSC 2023-01-03 12:07:40 -06:00
Waleed Hassan
4b975d74a1
Set import: Update for Gen 9 (#9215) 2022-12-27 05:07:45 -05:00
Mia
b11177d530
Migrate to esbuild for compilation (#9203) 2022-12-22 15:19:29 -06:00
Mia
a725b5b8cb Remove husky dependency
Agreed upon by everyone as not useful.
2022-12-21 22:04:33 -06:00
Mia
7f9398f2b3 Abuse-monitor: Add a command to ignore modlog actions in punishment calculation
Requested by US.
2022-11-14 21:00:11 -06:00
Mia
ec4cb6a6fa
Support persisting battles in a Postgres database (#8442) 2022-07-22 18:07:10 -07:00
Annika
1c756b1117 Pin @swc/core to 1.2.205
Fixes build issues stemming from swc/ts-node making `require()`d files have getters instead of objects
2022-07-02 20:35:56 -07:00
Annika
e821197ad5
Combine lint and full-lint NPM scripts (#8713)
Now that [`lint` and `full-lint` use the same configuration](c57fcf25c6), the only difference between them is the `--max-warnings` flag.

This separation causes some problems:
- In small terminal windows, warnings can be obscured by terminal scroll due to the large volume of unit tests. These warnings in turn cause CI failures since GitHub Actions runs `full-lint`.
- When changes to the linting script need to be made, **three** scripts need to be updated. This can lead to oversights such as `full-lint` not being updated for `.tsx` files when JSX support was added.
2022-05-01 15:18:42 -07:00
Guangcong Luo
a3565c06f6 Update typescript-eslint version 2021-12-24 02:11:47 -06:00
Mia
b611bcf45b Remove brain.js dep
Unneeded now that we use Perspective.
2021-12-08 18:15:11 -06:00
Annika
ced5e7fc81 Fixes for private code 2021-11-26 16:16:48 -08:00
Mia
4c9ccd29ca Handle Typescript 4.5.2 2021-11-18 19:11:21 -06:00
Guangcong Luo
aa5a26e896 Remove no-extraneous-dependencies eslint rule
The `no-extraneous-dependencies` rule conflicts with the way we use
`node-oom-heapdump`.

It also isn't even the kind of dependency linting we need! It's
obvious when we forget to include a dependency (CI will tell us), it's
forgetting to remove a dependency that can stick around unnoticed.

Anyway, this allows us to remove the entirety of `eslint-plugin-import`.
Yay for cutting down dependencies?
2021-11-15 19:11:47 -05:00
Mia
f608496938
Support JSX in HTML pages (#8523)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-11-12 22:06:26 -08:00
Annika
dcb2065116 Increase timeout for slow tests 2021-11-04 10:43:41 -07:00
Mia
7811795344
Handle new TypeScript version (#8449)
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-08-30 20:11:44 -07:00
Mia
6c7ce161c0
Add a chat plugin for reporting GitHub actions (#8414) 2021-08-12 11:12:57 -07:00
Mia
a0bdd4da88 Friends: Index databases 2021-07-20 23:43:19 -05:00