Created a custom type declaration file `ga-gtag.d.ts` for
`ga-gtag` npm module.
`@types/gtag.js` is installed as a devDependency so that the type
for `gtag` function can be provided.
(node:13734) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Replace the XHRUpload plugin for Uppy with the Tus plugin, to make use
of the new tusd endpoint. This allows for resumable files, as well as
files which are larger than comfortably fit in memory (the source of
the old 25MB limit).
MAX_FILE_UPLOAD_SIZE is still applied, but can safely be raised above
25MB.
Fixes: #9391.
Co-authored-by: Brijmohan Siyag <brijsiyag@gmail.com>
Zopfli[^1] performs very good, but time-intensive, zlib compression.
It is hence only suitable for pre-compressing objects, not on-the-fly
compression.
Use a webpack plugin to write pre-compressed versions of JS and CSS
assets using Zopfli, and configure nginx to serve those assets when
`Accept-Encoding: gzip` is provided.
This reduces the size of the JS and CSS assets on initial pageload
from 1422872 bytes to 1108267 bytes, or about a 22% savings.
[^1]: https://github.com/google/zopfli
In Firefox, event targets can be pseudo elements like text
nodes which don't have .closest method. This results in error
when delegate tries to handle trigger for a text node target.
Since https://github.com/atomiks/tippyjs/pull/1166 has no
response from the developer, we decided to apply this patch
ourselves.
It’s been unused since its introduction in commit
c13e3dee24. (koa-bodyparser is not
@koa/bodyparser; the latter has built-in TypeScript support.)
Signed-off-by: Anders Kaseorg <anders@zulip.com>
It’s been unused since its introduction in commit
c13e3dee24 (#29198), and also not
permissively licensed.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Replace a separate call to subprocess, starting `node` from scratch,
with an optional standalone node Express service which performs the
rendering. In benchmarking, this reduces the overhead of a KaTeX call
from 120ms to 2.8ms. This is notable because enough calls to KaTeX in
a single message would previously time out the whole message
rendering.
The service is optional because he majority of deployments do not use
enough LaTeX to merit the additional memory usage (60Mb).
Fixes: #17425.
date-fns-tz does not handle daylight saving time correctly, and can be
replaced with modern browser APIs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>