Commit graph

3527 commits

Author SHA1 Message Date
Erik Michelson
90c5ab0833
Exclude /metrics and /status routes from session initialization
This commit adds a `useUnless` helper method which can be used as a middleware for express.
It receives an express-middleware and an array of paths.
When a request matches one of the given paths, this middleware does nothing.
Otherwise the given middleware is called.

For the express-session middleware this helper middleware is used to avoid session creation on purely status routes.
See #1446

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-07-20 23:56:54 +02:00
David Mehren
c9c170e6a7
Merge pull request #1450 from hedgedoc/renovate/master-linters
chore(deps): update dependency eslint to v7.31.0 (master)
2021-07-18 10:36:04 +02:00
Renovate Bot
3fc75616bb
chore(deps): update dependency eslint to v7.31.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-18 08:22:07 +00:00
David Mehren
a2b8f8e4e3
Merge pull request #1453 from hedgedoc/docs/mattermost_navbar
[Docs] Add Mattermost guide to navigation
2021-07-18 10:20:02 +02:00
David Mehren
0f566c5ce7
[Docs] Add Mattermost guide to navigation
Signed-off-by: David Mehren <git@herrmehren.de>
2021-07-18 10:02:17 +02:00
David Mehren
8d8ec24108
Merge pull request #1439 from hedgedoc/renovate/master-lock-file-maintenance
chore(deps): lock file maintenance (master)
2021-07-15 22:21:38 +02:00
Renovate Bot
4c522ffed7
chore(deps): lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-15 18:55:15 +00:00
David Mehren
ce91be383b
Merge pull request #1443 from hedgedoc/renovate/master-css-loader-5.x
chore(deps): update dependency css-loader to v5.2.7 (master)
2021-07-15 20:52:31 +02:00
Renovate Bot
3c1f177172
chore(deps): update dependency css-loader to v5.2.7
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-15 18:40:35 +00:00
David Mehren
8feaefe0fe
Merge pull request #1436 from hedgedoc/renovate/master-mkdocs-material-7.x
chore(deps): update dependency mkdocs-material to v7.1.10 (master)
2021-07-15 20:39:44 +02:00
Renovate Bot
ac65de1348
chore(deps): update dependency mkdocs-material to v7.1.10
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-10 14:44:41 +00:00
David Mehren
e8e9c9c111
Merge pull request #1425 from hedgedoc/renovate/master-lock-file-maintenance
chore(deps): lock file maintenance (master)
2021-07-05 15:04:39 +02:00
Renovate Bot
936df7e067
chore(deps): lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-05 00:17:01 +00:00
David Mehren
9c58cd1cfc
Merge pull request #1423 from hedgedoc/renovate/master-test-packages 2021-07-03 18:39:44 +02:00
Renovate Bot
67498905c1
chore(deps): update dependency mocha to v9.0.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-03 16:03:54 +00:00
David Mehren
a4c0121caf
Merge pull request #1424 from hedgedoc/renovate/master-prismjs-1.x
chore(deps): update dependency prismjs to v1.24.1 (master)
2021-07-03 18:02:43 +02:00
Renovate Bot
93eb7e19af
chore(deps): update dependency prismjs to v1.24.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-03 11:59:29 +00:00
David Mehren
791f3482b5
Merge pull request #1413 from hedgedoc/renovate/master-lock-file-maintenance
chore(deps): lock file maintenance (master)
2021-07-03 10:42:33 +02:00
Renovate Bot
f40ad5b9a8
chore(deps): lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-03 08:38:43 +00:00
David Mehren
e9059e43dd
Merge pull request #1405 from hedgedoc/renovate/master-optimize-css-assets-webpack-plugin-6.x
chore(deps): update dependency optimize-css-assets-webpack-plugin to v6.0.1 (master)
2021-07-03 10:34:11 +02:00
David Mehren
f5c228d790
Merge pull request #1411 from hedgedoc/renovate/master-mermaid-8.x
chore(deps): update dependency mermaid to v8.11.0 (master)
2021-07-03 10:34:02 +02:00
Renovate Bot
7d38462650
chore(deps): update dependency mermaid to v8.11.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-03 08:29:40 +00:00
Renovate Bot
5b0466f45a
chore(deps): update dependency optimize-css-assets-webpack-plugin to v6.0.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-03 08:29:27 +00:00
David Mehren
2bec179272
Merge pull request #1412 from hedgedoc/renovate/master-prismjs-1.x
chore(deps): update dependency prismjs to v1.24.0 (master)
2021-07-03 10:28:11 +02:00
David Mehren
9553c7193b
Merge pull request #1422 from hedgedoc/renovate/master-linters
chore(deps): update dependency eslint to v7.30.0 (master)
2021-07-03 10:27:24 +02:00
David Mehren
efae24bfff
Merge pull request #1408 from hedgedoc/renovate/master-mini-css-extract-plugin-1.x
chore(deps): update dependency mini-css-extract-plugin to v1.6.2 (master)
2021-07-03 10:26:51 +02:00
Renovate Bot
b50005842e
chore(deps): update dependency prismjs to v1.24.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-03 08:16:59 +00:00
Renovate Bot
639a8bedd8
chore(deps): update dependency eslint to v7.30.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-03 08:16:30 +00:00
Renovate Bot
19c0125edf
chore(deps): update dependency mini-css-extract-plugin to v1.6.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-03 08:16:02 +00:00
David Mehren
4263cbf5b0
Merge pull request #1395 from hedgedoc/renovate/master-test-packages
chore(deps): update dependency mocha to v9.0.1 (master)
2021-07-03 10:14:38 +02:00
Renovate Bot
cbf3c51edd
chore(deps): update dependency mocha to v9.0.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-07-03 08:03:11 +00:00
David Mehren
53bfb8d149
Merge pull request #1415 from hedgedoc/renovate/master-turndown-7.x
chore(deps): update dependency turndown to v7.1.1 (master)
2021-07-03 09:59:22 +02:00
David Mehren
5d66755831
Merge pull request #1406 from hedgedoc/renovate/master-mkdocs-material-7.x
chore(deps): update dependency mkdocs-material to v7.1.9 (master)
2021-07-03 09:57:08 +02:00
Renovate Bot
c8472b5823
chore(deps): update dependency turndown to v7.1.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-06-29 16:57:05 +00:00
Renovate Bot
f0110eae23
chore(deps): update dependency mkdocs-material to v7.1.9
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-06-25 10:53:38 +00:00
David Mehren
3c504f2dc9
Merge pull request #1387 from hedgedoc/renovate/master-lock-file-maintenance 2021-06-21 14:00:13 +02:00
Renovate Bot
bfa2eac7f5
chore(deps): lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-06-21 11:35:26 +00:00
David Mehren
bf0c348e74
Merge pull request #1400 from hedgedoc/renovate/master-linters
chore(deps): update dependency eslint to v7.29.0 (master)
2021-06-21 13:30:37 +02:00
David Mehren
8ab65869ff
Merge pull request #1384 from hedgedoc/renovate/master-mkdocs-material-7.x
chore(deps): update dependency mkdocs-material to v7.1.8 (master)
2021-06-21 13:30:12 +02:00
Renovate Bot
26b8abe2a9
chore(deps): update dependency eslint to v7.29.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-06-18 20:29:58 +00:00
Renovate Bot
2125e9b98d
chore(deps): update dependency mkdocs-material to v7.1.8
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-06-12 14:17:30 +00:00
David Mehren
66bdbc1f43
Merge pull request #1370 from hedgedoc/feature/lazy_load 2021-06-12 16:16:22 +02:00
David Mehren
7ff685933e
Lazy-load highlight.js
This commit moves the import of highlight.js into a `require.ensure`
block, that is only executed when a code-block is actually present
in a note. Webpack automatically splits the library into a separate
chunk and loads that on demand.

The call to `hljs.listLanguages()` in `index.js` is also replaced
by a static list. This is important, as `index.js` would otherwise
need to import highlight.js, which would cause the quite big
library to be included into nearly every entrypoint, needlessly
increasing the transferred code size.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-06-11 09:29:27 +02:00
David Mehren
5b8b76135b
Lazy-load viz.js
This commit moves the import of viz.js into a `require.ensure` block,
that is only executed when a graphviz diagram is actually present
in a note. Webpack automatically splits the library into a separate
chunk and loads that on demand.

To ensure that graphviz code-blocks are not treated as normal
code-blocks while the chunk is loading, a corresponding check is added
to `finishView`.

The library is also removed from the Webpack config file, as it only
is used at one place in extra.js, which is handled by Webpack
without any extra config.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-06-11 09:29:26 +02:00
David Mehren
1c023e7881
Lazy-load abcjs
This commit moves the import of abcjs into a `require.ensure` block,
that is only executed when a abc diagram is actually present
in a note. Webpack automatically splits the library into a separate
chunk and loads that on demand.

To ensure that abc code-blocks are not treated as normal
code-blocks while the chunk is loading, a corresponding check is added
to `finishView`.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-06-11 09:29:26 +02:00
David Mehren
938afbddc3
Replace handlebars with string.replace
The html.hbs template does not contain any logic,
so we can replace the lib with good old string.replace calls.
This significantly reduces the bundle size, as we don't have to ship
a full template engine to the client.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-06-11 09:29:26 +02:00
David Mehren
b45b8b9c0d
Lazy-load mermaid
This commit moves the import of mermaid into a `require.ensure` block,
that is only executed when a mermaid diagram is actually present
in a note. Webpack automatically splits the library into a separate
chunk and loads that on demand.

To ensure that mermaid code-blocks are not treated as normal
code-blocks while the chunk is loading, a corresponding check is added
to `finishView`.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-06-11 09:26:03 +02:00
David Mehren
3f5755ed80
Merge pull request #1362 from hedgedoc/renovate/master-lock-file-maintenance
chore(deps): lock file maintenance (master)
2021-06-10 21:55:57 +02:00
Renovate Bot
33c1ce00e4
chore(deps): lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-06-10 19:30:50 +00:00
David Mehren
3125217e17
Merge pull request #1381 from hedgedoc/renovate/master-mkdocs-1.x
chore(deps): update dependency mkdocs to v1.2.1 (master)
2021-06-10 21:27:35 +02:00