Commit Graph

135 Commits

Author SHA1 Message Date
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
Guangcong Luo
772d9f7d2a Remove Git precommit hook
Waiting for tests to commit before the Git commit message editor opens
is really annoying. The prepush hook is enough.
2018-07-17 19:01:41 +09:00
Quinton Lee
95d396ccdc
Travis CI: update to Node 8 and fix Typescript cache 2018-07-06 17:01:38 -05:00
Quinton Lee
4e3af0d243
Fix build error 2018-07-05 16:13:10 -05:00
Bär Halberkamp
27977931c0 Wifi: use string instead of String for types 2018-07-05 16:13:46 -04:00
Quinton Lee
1142b47e61
Dependencies: re-add Husky
Accidentally removed in cf50a3d642
2018-05-06 15:03:00 -05:00
Quinton Lee
cf50a3d642 Typescript the rest of mods/ (#4588) 2018-05-05 14:56:45 -05:00
Guangcong Luo
322eb9fbf0 TypeScript: Start work on typing chat commands
Nothing is being checked yet because there's a whole bunch of
complication in there, but this is a start.
2018-05-02 17:45:15 -05:00
Quinton Lee
77136a1bcd
Add npm script to run tsc
This allows you to run tsc with the version specified in package.json if you have a different version installed globally
2018-04-30 19:45:01 -05:00
Sacha Reinert
9e2ccfdb24 Dependencies: Add Husky githook (#4576) 2018-04-15 03:57:50 -05:00
Quinton Lee
b45d595519 Update Typescript to 2.8 (#4532) 2018-04-05 17:33:35 -05:00
Quinton Lee
c799393710 Typescript data/ and config/formats (#4513)
Also removes Battle Factory methods accidentally re-added in d0a4a689a7
2018-03-26 09:50:51 -05:00
Guangcong Luo
e6cc393109 Fix unused variable in ProcessManager 2018-01-23 07:45:03 -06:00
Guangcong Luo
e8163824ff Remove validate-conditionals eslint rule
As far as I can tell, `curly, multi-line, consistent` does everything I
want; there's no reason to keep around a validate-conditionals rule.

Which is probably good, since eslint is deprecating the API for this,
anyway. The nice thing about not relying on deprecated APIs is that now
you can lint PS with `eslint` rather than needing to memorize
command-line switches.
2018-01-19 13:25:10 -06:00
Morfent
777ba0fc5f Sockets: implement permessage-deflate support (#4253)
Permessage-deflate is an extensIon that compresses websocket messages with zlib.
SockJS already supports it (indirectly) and the client's load balancer already
inserts the header in the opening handshake when making a WebSocket connection.

Config.wsdeflate makes this optional and allows tweaking the extension's resource
usage.
2017-12-15 15:43:48 -06:00
Guangcong Luo
819ff64d06 Update dependencies 2017-11-17 19:41:32 -06:00
Guangcong Luo
ce8dc52501 Replace ofe with node-oom-heapdump
(ofe is no longer actively maintained)
2017-11-17 19:39:54 -06:00
Guangcong Luo
bfeb75f547 Remove nonDefaultDependencies hack
Modern versions of npm have made it less and less tenable to have
truly optional dependencies, so we'll just bite the bullet and let
people have slightly slower installs in exchange for not having to
deal with npm weirdness.
2017-11-17 19:31:09 -06:00
Guangcong Luo
f5e7133044 Add tsc to npm test 2017-11-08 01:27:46 -06:00
Guangcong Luo
55b18bbc30 Simplify eslint invocation 2017-11-08 01:26:25 -06:00
Guangcong Luo
fa0bc881b5 Update TypeScript version 2017-11-06 21:49:53 -06:00
Guangcong Luo
3b2ada7c43 Update misc dependencies 2017-10-08 03:43:12 -05:00
Guangcong Luo
dcffa2a37d Update Mocha dependency 2017-10-08 03:36:04 -05:00
Guangcong Luo
c4e13fc4fa Update dependencies
Mocha 4 has a weird issue where it doesn't terminate, so we can't use
it for now.
2017-10-07 23:59:52 -05:00
Albert Zhang
2164d08229 Fix breakage with node-static 0.7.9 and mime 2 (#4002)
mime 2 broke node-static 0.7.9, update to 0.7.10 fixes this
2017-09-21 16:19:57 -05:00
Guangcong Luo
b2e989fc76 Fix npm start 2017-08-27 13:59:56 -07:00
Guangcong Luo
6e7aa9c8dd Remove mock-fs-require-fix from dependencies 2017-07-25 03:01:15 -04:00
panpawn
2fc84fa633 v0.11.0 -> v0.11.1 (#3710)
The change from v0.10.x -> v0.11.0 was in November of 2016, and a lot has chanced since then
2017-06-30 15:28:48 +09:00
Guangcong Luo
0143ae28dd Replace fs module (#3686)
The new FS module is an abstraction layer over the built-in fs module.

The main reason it exists is because I need an abstraction layer I can
disable writing from. But that'll be in another commit.

Currently, mine is better because:
 - paths are always relative to PS's base directory
 - Promises (seriously wtf Node Core what are you thinking)
 - PS-style API: FS("foo.txt").write("bar") for easier argument order
 - mkdirp

This also increases the minimum supported Node version from v6.0 to
v7.7, because we now use async/await. Sorry for the inconvenience!

This also drops the mock-fs-require-fix dependency

mock-fs-require-fix was always kind of a huge hack. It's no longer
necessary, with an FS API that does everything it used to.

This removes a lot of other hacks from test/main.js, which is nice.
2017-06-24 13:42:54 -07:00
Guangcong Luo
f87c0e2790 Use Unicode in package.json
`npm install` forces package.json into using the unicode accented-e in
"Pokemon" instead of the escaped format, so committing this prevents the
dirty tree that would otherwise happen every time someone installed
dependencies.
2017-06-23 06:49:58 -04:00
Quinton Lee
ec10d30996 eslint: Lint sim/ directory (#3670) 2017-06-21 20:00:17 -07:00
Bär Halberkamp
961ffc3f9b Upgrade eslint to 4.x (#3657) 2017-06-18 22:37:43 -07:00
Ben Davies
b66e395bf6 Add Config.ofe, refactor optional dependency usage (#3644)
Config.ofe toggles whether or not to write heapdumps if sockets workers
run out of memory, since ofe is an optional dependency but is not
installed by default. nodemailer is now a nonDefaultDependency, and
will complain if it's not installed when Config.crashguardemail is
enabled.
2017-06-17 14:37:11 -07:00
Guangcong Luo
9bd53ab3d7 Update optionalDependencies
Closes #3396

I don't see a need to add another david-dm icon for keeping it
up-to-date, though.
2017-05-18 05:38:14 -05:00
Guangcong Luo
b8df1b365a Remove fuzzur dependency
We no longer use it.

Nondeterministic tests are annoying and fuzzers are only useful for
detecting crashes, memory leaks, etc. You can't use them to detect
behavior correctness because that's what your actual code does.

(In other words, fuzzers are useful, but not as part of a regression
test suite.)
2017-03-17 23:14:52 -05:00
Guangcong Luo
f402bdc8b5 v0.11.0 2016-11-29 17:44:17 -06:00