Commit Graph

223 Commits

Author SHA1 Message Date
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
Annika
c134195915
Use ts-node instead of Sucrase (#8369) 2021-07-09 19:59:22 -07:00
Marty-D
c5e1699650
Roll back to the previous smogon version, then 2021-07-02 10:26:57 -04:00
Marty-D
ad959513c1
Actually update deps to get newest smogon for set-import 2021-07-02 09:51:19 -04:00
Marty-D
eb9935fe6b
Update deps to get newest smogon for set-import 2021-07-02 09:22:52 -04:00
Guangcong Luo
907128918f Release 0.11.7
I've spent the past few weeks working on build systems for other
projects, and this has paid off in having a better understanding of
things here.

The NPM package should now be much easier to use now.

Major changes:

- TypeScript definitions (f47e38c5ad)

- Support for importing teams (ddb6010bb9)

- A CLI for exporting teams (ddb6010bb9)

- `lib/` available as an unstable API in the NPM package (147b7e01c9)

- Lots of documentation updates (a813a55679)
2021-06-10 09:23:05 -07:00
Guangcong Luo
2bc1f032c1 Release 0.11.6
semver? what's that? Seriously, though, the major breaking changes
are all in undocumented APIs.

Notable changes include:

- A new Dex API (#8181)

- `lobby` is no longer special-cased (messages without a roomid now
  always get sent to console rather than lobby)

- A new challenge API (#8303)

- A new system for specifying battle rules with numbers and other
  options (#8267)
2021-06-06 09:42:08 -05:00
Marty-D
94240ebf5f
Update deps to get newest smogon for set-import 2021-06-02 09:43:22 -04:00
Guangcong Luo
fb476120b5 Release 0.11.5
This is mostly to get d4b6ba4c0f to npm.
2021-03-29 11:00:52 -07:00
Guangcong Luo
ed454ef76a
Refactor scripts to battle-actions (#8138)
This introduces a new class, BattleActions, available as `battle.actions`,
moving all functions from `data/scripts.ts` to `sim/battle-actions.ts`.

This makes it so that "go to definition" will now work correctly for
functions previously in scripts; we no longer need UnimplementedError,
and there's now a clean conceptual separation between `battle` and
`battle-actions` (whereas the previous distinction between `battle` and
`scripts` was basically nonexistent).

This will be a difficult migration if you maintain a fork with custom
scripted mods. I'm sorry! Migration instructions are here:

https://github.com/smogon/pokemon-showdown/pull/8138
2021-03-28 12:01:38 -07:00
Marty-D
30a4965e7d
Update deps to get newest smogon for set-import 2021-03-02 15:20:15 -05:00
Marty-D
633a8b1829
Update deps to get newest smogon for set-import 2021-02-08 11:54:16 -05:00
Mia
335eafba95
Add machine-learning based monitors (#7937) 2021-01-30 17:40:01 -08:00
Marty-D
fcd1dd098d
Update deps to get newest smogon for set-import 2021-01-08 16:42:04 -05:00
Guangcong Luo
7d7676db11 Revert accidental package.json change 2020-12-26 22:04:14 -08:00
Guangcong Luo
3cbf3f8a30 Fix build
Building from a fresh install currently fails since #7797

The problem is that `require('sucrase')` needs to be done _after_
sucrase is installed, which is a lot harder than it sounds.
2020-12-26 10:04:41 -08:00
Annika
b5b91e9d9c Upgrade to the latest SockJS version 2020-12-22 21:42:13 -08:00
Guangcong Luo
baaeb1e23b Release 0.11.4 to npm
This is mostly to publish a version with the Streams issue fixed.

Specifically, this commit: 8b68cdd736
2020-12-12 22:10:24 +00:00
Guangcong Luo
968390a632 Update TypeScript dependency version 2020-11-20 07:53:06 +00:00
Guangcong Luo
e2f4d247e7
Support npm run fix (#7640) 2020-11-05 16:48:49 -08:00
Annika
aa069ce8fd
Support disabling modlogs (#7619)
Co-authored-by: Christopher Monsanto <chris@monsan.to>
2020-11-02 22:59:31 -05:00
Annika
2f130e8762
Modlog: Support logging to a SQLite database (#7513)
* Modlog: Support logging to a SQLite database

Co-authored-by: Christopher Monsanto <chris@monsan.to>
2020-10-30 19:27:25 -04:00
Guangcong Luo
81dc3a7813 Update devDependencies
The newest `@types/node` fixes the `assert.strict.equal` deprecation
issue, so I'm updating more frequently than usual.
2020-10-29 16:17:39 +00:00
Guangcong Luo
2faa3d635d Publish 0.11.3 to npm
PS's sim engine is now available on npm!

sim/README.md describes how to use it:

https://github.com/smogon/pokemon-showdown/blob/master/sim/README.md
2020-10-21 17:24:58 +01:00
Guangcong Luo
c57fcf25c6
Default to type-aware linting (#7538)
In the past, we used non-type-aware linting in our pre-push hook, as
well as in `npm test`. This was for performance reasons.

In practice, though, we use an eslint cache, which makes even
type-aware incremental linting instantaneous. My rule is that you
should be able to make a small change and lint in under 10 seconds, and
`npm test` should take under 30 seconds, and linting with no changes
(for the pre-push hook) should be under 2 seconds. This is still true
for type-aware linting, so there's no actual need for fast linting.

We've also switched to using `--max-warnings 0` to convert warnings to
errors. This seems to allow them to use the same cache file.

A big improvement here is that `npm test` should now be enough for
testing. I think everyone ran `npm run full-test` for a while because
`npm test` didn't have type-aware lint errors, but now that it does,
you'll be able to use it again and have your tests run a lot faster.
2020-10-19 02:52:33 -07:00
Guangcong Luo
264bf83152 Update devDependencies
For some reason, the previous set of devDependencies fail tests for me
in macOS. I'm updating them just to be safe.
2020-10-18 07:48:17 +01:00
Guangcong Luo
1c0c77ff6b
Update to TypeScript 4.0 (#7504) 2020-10-10 14:43:32 -07:00
Guangcong Luo
e40ab96db7 Update Mocha dependency version 2020-10-09 22:33:17 -07:00
Marty-D
f1e4e68e50
Update deps to get newest smogon for set-import 2020-10-01 19:39:54 -04:00
Guangcong Luo
3d68248efa Update to latest eslint
We're skipping two major typescript-eslint versions, so there are a
bunch of changes here, including:

- it's catching a lot of things it didn't catch in the past, for
  reasons unclear to me

- no-unused-vars has to be explicitly disabled in global-types now

- a lot of `ts-ignore`s were never necessary and have been fixed

- Crashlogger can now handle being thrown things that aren't errors.
  This has never been a problem in the past, but to satisfy TypeScript
	we might as well not die in a fire on the off chance someone tries to
	`throw null` or something.
2020-09-29 15:28:08 -07:00
Kirk Scheibelhut
ec84d31d38 Update deps to get newest smogon for set-import 2020-09-01 12:01:35 -07:00
Guangcong Luo
15b7c0ad9f Don't install node-oom-heapdump by default 2020-08-15 17:46:28 -07:00
Annika
b3771214d5
Fix modlog tests on Windows (#7187) 2020-08-10 09:37:08 -07:00
Guangcong Luo
a315c93836 Switch to using import type
We were previously using `type Foo = import('bar').Foo` which works
actually equally well, because sucrase didn't support `import type`,
but now it does!
2020-08-09 08:07:00 -05:00