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