Commit Graph

170 Commits

Author SHA1 Message Date
Kirk Scheibelhut
4754076efa Update for @pokemon-showdown/sets v0.4.0
- updates smogon package dependency to the latest version
- make sure no old artifacts are left around from previous runs
- revert change from 7aa42b12: for whatever reason we do encounter
instances where `typeof species.battleOnly !== 'string'` and
`throw`-ing means no sets get output.
2020-05-03 13:24:25 -07:00
Kirk Scheibelhut
59bcdab260 Update deps to get newest smogon for set-import 2020-04-01 20:00:36 -07:00
Mia
1628258371
Typescript chat-commands/core (#6484)
Also fix TS line numbers in GitHub Actions
2020-03-23 23:50:35 -07:00
Guangcong Luo
5a26d8685b Remove unused tslint dependency 2020-03-07 15:07:13 -08:00
Guangcong Luo
2f0e83c14b Categorize eslintrc rules
eslintrc rules are now sorted into categories, in theory making them
easier to maintain.
2020-03-06 22:35:45 -08:00
Waleed Hassan
8aa4f053bb
Use optional chaining and linter improvements (#6422)
This is mostly just a follow up to #6342.

`prefer-optional-chaining` was turned on and fixed in every location it
complained in. The transformed function [0] looks expensive from a
glance but from skimming through the replaced sites it doesn't appear
to be ran in any important place, so it should be OK.

The linter improvements are:
- Increase linter performance
	- Make `full-lint` and `lint` write to different caches so we
	  avoid overwriting their caches since they're different configs
	- Change husky's hook to `npm run lint` so as to write to the
	  same cache
	- Remove `@typescript-eslint/eslint-plugin-tslint` which is
	  essentially a wrapper to TSLint because the rules aren't worth
	  running another linter
- Convert `.eslintrc.json` and `.eslintrc-syntax.json` to two spaces
  rather than four tabs to respect PS' `.editorconfig`
- Rename `fulllint` to `full-lint` to ease spelling it

[0] - https://pastie.io/mmtxpf.js (prettified)
2020-03-06 11:44:32 -08:00
Guangcong Luo
b21c9047e2
Migrate to typescript-eslint (#6342) 2020-03-05 08:33:06 -08:00
Kirk Scheibelhut
738fdc9c46 Update deps to get newest smogon for set-import 2020-03-02 16:31:59 -08:00
Kirk Scheibelhut
fdf5679a24 Update set-import stats to use latest stats logic
smogon@0.2.0 now supports the qualified naming transition period
at the end of Gen 6.
2020-02-27 17:00:40 -08:00
Kirk Scheibelhut
37a331a4cb Get tools/set-import to work again
- a scripts.js init() method now calls toID
- Smogon updated the format of moveslots
2020-02-25 14:49:38 -08:00
Guangcong Luo
1d09dd1174 Fix Dragon Darts bugs
- should not stop after one faint
- should not show miss message for first miss
2020-02-20 15:58:36 -08:00
Guangcong Luo
1f8b14cb6c Update dependencies
(The newest sucrase now supports optional chaining.)

(The TSLint crash is fixed.)
2020-02-08 07:44:22 -08:00
not_a_seagull
ae28a960be Convert index.js and team-validator-async.js to typescript (#5987) 2020-01-04 07:11:54 -05:00
Spandan Punwatkar
b6b66de896 Update Repo Links (#6102) 2019-11-28 12:47:38 +04:00
Kirk Scheibelhut
71bc4d5c05 Update tools/set-import for Gen 8 2019-11-25 15:32:12 -08:00
Guangcong Luo
ae8af5a6cf Show full mocha output with fulltest
This is mostly to help debug a weird Travis issue.
2019-11-16 09:33:27 +13:00
Waleed Hassan
92b2c128c2 Upgrade to TypeScript 3.7 (#5935) 2019-11-06 23:02:36 +10:30
Kirk Scheibelhut
e73ac5920b Bump version to remove vunerability message
npm-check-updates was mistakenly listed as a transitive dependency
causing npm audit to complain about one of its dependencies.
2019-10-29 16:21:58 -07:00
Kirk Scheibelhut
e6f3a39f26 Update dependencies, revert premature TS 3.7 2019-10-03 13:58:03 -07:00
Christopher Monsanto
59846c2776 Add optional deps for sqlite, ignore databases/ 2019-10-02 15:31:00 -04:00
HoeenHero
df396ee6a1 Update to Typescript 3.7.0-beta
@Zarel mentioned that he wanted to update to the beta as soon as possible.
2019-10-01 22:12:11 -04:00
TheJetOU
dcbeed3671 Run tsc before mocha in npm run fulltest (#5781) 2019-09-15 10:21:33 -07:00
Kirk Scheibelhut
b9e5fcb387
Introduce set importer logic (#5749)
`node tools/set-import [version]` can be run to create a
`@pokemon-showdown/sets` package containing sets from Smogon, usage
stats and third party sources. Some notes:

- The build is set up so that `tools/set-import/importer.ts` is
  compiled to `tools/set-import/importer.js` - creating a
  `.tools-dist/set-import` directory for the sole artifact was
  deemed to be overkill
- The sets package is generated such that it can be used easily on
  Node or in a browser (where the large set JSON can be loaded
  asynchronously)
- Supported tiers/formats are mostly arbitrary - those popular
  enough to have a signficant playerbase or analyses on Smogon have
  been included, but additional formats can be added based on demand
- Some set information is redundant for ease of use by downstream
  users: certain formes are split out and information that could
  theoretically be inferred like level/ability/HP IVs are included
  to simplify parsing logic and make the sets more immediately
  available. This results in what should mostly be negligible
  size overhead.
- In a similar vein, display versions of effect names instead of IDs
  are used (name -> ID is trivial, ID -> name requires data lookup)
- All sets pass validation, provided certain simple transformations
  are applied (eg. reverting `battleOnly` formes like Megas)

This tool has primarily been tested to run on Linux - running on
other platforms is not guaranteed to result in error-free output.
2019-09-10 21:15:05 -04:00
Kirk Scheibelhut
73aa85fb66 Upgrade to Typescript 3.5 2019-05-29 14:42:50 -07:00
Kirk Scheibelhut
c46a61bb14 Update dependencies to the latest stable versions 2019-05-24 20:11:18 -07:00
Kirk Scheibelhut
1adcd40e48 Windows-friendly Mocha setup
This reverts commit cccc904059.
2019-04-23 07:51:06 -07:00
Kirk Scheibelhut
cccc904059 Fix Mocha setup so that filtering works properly.
With `-i` in tests/mocha.opts, `npx mocha -g Foo` runs everything
*except* the tests you actually wanted to run (the `-g` overrides
the default `-g`, but unless you specify `--no-invert`, nothing will
override the default `-i`).

Having `test` not just be `mocha` is regrettable, but breaking `npx
mocha -g` or requiring users who want to filter remember to also
pass `--no-invert` is not a good tradeoff.
2019-04-22 21:52:46 -07:00
Kirk Scheibelhut
4975f1902b Move simulator harness to sim/tools (#5451) 2019-04-18 04:17:07 +09:30
Kirk Scheibelhut
e689913084
Unify dev-tools runners and convert to Typescript (#5441)
- Refactor dev-tools/harness.js and dev-tools/smokes.js to separate
  out the script/CLI code and implementation code into separate
  files.
- Rename 'smoke' to 'exhaustive' ('multi' mode can also be used
  for "smoke testing") to better describe its behavior.
- Rewrite the runners in Typescript for type safety.
- Refactor common build utilities into dev-tools/build.js and
  introduce the notion of a 'full' build analogous to 'full' tests.
2019-04-15 15:22:37 -07:00
Kirk Scheibelhut
5c10ebf428
Rework mocha fulltest configuration (#5442) 2019-04-15 14:16:52 -07:00
Slayer95
72b7e990fd Test: Implement npm run fulltest (#5437)
- Tests flagged with (slow) will no longer be run in `npm test`.
- Travis CI will now run `fulltest`.
- Unskip slow dev-tools tests and flag as such.
2019-04-13 04:38:32 +09:30
Kirk Scheibelhut
334ca88b50 Update dependencies (#5430) 2019-04-10 18:46:37 +08:00
Kirk Scheibelhut
6c1ab30977 Update dependencies (#5407) 2019-04-04 14:39:53 +08:00
Kirk Scheibelhut
081ce82d15 Revert "Sockets: Refactor event handlers" instead of sockjs. (#5378)
* Revert "Sockets: Refactor event handlers"

This reverts commit d1242593f3.

* Revert "Switch back to sockjs 0.3.18 (#5376)"

This reverts commit 880ded4ed8.
2019-03-30 00:52:02 +08:00
Kirk Scheibelhut
880ded4ed8 Switch back to sockjs 0.3.18 (#5376) 2019-03-29 23:27:41 +08:00
Kirk Scheibelhut
d01b1599fc Update dependencies (#5352) 2019-03-27 01:59:30 +09:00
Kirk Scheibelhut
b33971a3d3 Inline replace into build and remove dependency (#5248) 2019-03-04 19:36:00 -06:00
Kirk Scheibelhut
6e122d5d74 Refactor lib/ to be native Typescript (#5217) 2019-03-02 11:12:24 -06:00
Guangcong Luo
f5a8723f1c Fix build/hotpatch process
Hotpatching and running `./pokemon-showdown` now automatically run
`./build`. There should now mostly not be any reason you'd want to
manually run `./build`, except if you're invoking tests directly.

In addition, a lot of redundant code has been removed.

I'm not 100% sure this works on Windows, but I'm sure I'll get reports
if anything breaks.
2019-02-27 01:47:44 -06:00
Kirk Scheibelhut
b09fd63377 Refactor sim/ to be native Typescript (#5210) 2019-02-26 11:03:30 -06:00
Konrad Borowski
eacf4881f6 Update TypeScript to version 3.3.3333
Using a tilde in a version number as TypeScript explicitly doesn't
follow semver according to Microsoft/TypeScript#14116.
2019-02-23 15:26:58 +01:00
Konrad Borowski
0a7c37990a Refactor Emoji regex to use \p syntax (#5146)
(Increases minimum Node version requirement)
2019-02-07 11:59:16 -06:00
Guangcong Luo
f3e45fbb72 Move server code to server/
Also move mods/ to data/mods/

This makes PS more monorepo-like. The intent is to further separate
the sim and the server code, but without fully committing to splitting
the repository itself.

We now support `./pokemon-showdown start` in addition to
`./pokemon-showdown`. I'm not clear which I want to be the default
yet.
2019-02-03 16:07:06 -06:00
Guangcong Luo
13614b9890 Update for TypeScript 3.2
TypeScript 3.2 unearthed a metric fuckton of bugs, making this change
take effectively forever.
2018-12-08 21:39:38 -06:00
Guangcong Luo
1a82499387 Don't run full tests on Git prepush
We're now only doing a lint on prepush. We already have CI to make sure
nothing is missed; so we can be a bit lazier on prepush.
2018-10-17 14:49:23 -05:00
Guangcong Luo
8ac84e3ea6 Update dependencies 2018-10-17 14:49:18 -05:00
Bär Halberkamp
424339be69 Add functionality for detecting image size and scaling images
This relies on a small new dependency: probe-image-size. Approved by Zarel.
2018-10-08 04:48:34 +02:00
Quinton Lee
94016f6218 Update Typescript to 3.1 (#4879) 2018-10-05 04:02:54 -05:00
Quinton Lee
5b12626e41 Update eslint and mocha to 5.x (#4878) 2018-09-29 20:11:12 -05:00
MacChaeger
82c792f82c Update to TypeScript 3.0.1 (#4710) 2018-08-07 03:27:28 +09:00