Commit Graph

208 Commits

Author SHA1 Message Date
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
Kirk Scheibelhut
4e99c2b24e Update deps to get newest smogon for set-import 2020-08-03 22:29:49 -07:00
Kirk Scheibelhut
a470fc48ca Update deps to get newest smogon for set-import 2020-07-03 12:25:04 -07:00
Kirk Scheibelhut
922d292322 Simplify @pokemon-showdown/sets and rename package
@smogon is the preferred namespace for packages (eg. @smogon/calc),
but the fact that this import logic previously contained code from
two non-Smogon sources made such naming awkward. Given the damage
calc didn't end up using these sources (and the Pokémon Showdown
client doesn't either), its simpler to just remove the logic for
third party imports entirely. This allows us to remove ugly 'hidden'
JSON5 dependency, as well as `smogon.com/` namespacing on the
sources.

This commit also tidies up the package.json and type definitions to
be more robust. It makes `--access public` the default when
publishing and cleans up unpkg support.

This is obviously a breaking change, but it's also a package rename
so we get to start the version from zero there :). A corresponding
commit will be added to the client to account for these changes.
2020-06-04 19:43:56 -07:00
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