`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.
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.
- 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.
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.
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.