Commit graph

6533 commits

Author SHA1 Message Date
David Mehren
6604a6e499
Enable TypeScript strict mode
This enables strict mode, but sets strictPropertyInitialization to false,
as "the class-validator DTO pattern described in the documentation is
not compatible with strict property initialization" according to
https://github.com/nestjs/typescript-starter/pull/192

Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-29 15:01:00 +02:00
Renovate Bot
b2f0bfa0bf
Update dependency eslint to v7.26.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-05-09 12:41:30 +00:00
Renovate Bot
618ab0dc9b
Update dependency ts-loader to v9.1.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-05-09 12:41:15 +00:00
Renovate Bot
0e698f6aad
Update dependency pymdown-extensions to v8.2
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-05-08 19:43:43 +00:00
Renovate Bot
ad8a6d0ebc
Update dependency mkdocs-material to v7.1.4
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-05-07 09:51:32 +00:00
Renovate Bot
8c0554d40e
Update linters to v4.22.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-05-05 20:27:14 +00:00
Renovate Bot
a6d7fc2c30
Update dependency file-type to v16.4.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-05-05 20:26:59 +00:00
Renovate Bot
d0f787e3c2
Update dependency ts-jest to v26.5.6
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-05-05 16:10:56 +00:00
Renovate Bot
c2645472f0
Lock file maintenance
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-05-03 01:12:21 +00:00
Renovate Bot
2fcd4c141e Update dependency katex to v0.13.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-24 23:33:35 +02:00
Erik Michelson
003658dc4d
The History PR: II - Add URL params (#1157)
* Add location state dependency

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Split toolbar state into single location states

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Add CHANGELOG entry

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Pin dependency

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Use react state for view because of side-effects

The locationState was resetted on each search or tags filter update because these updates pushed a change to the location thus resulting in loss of the location state for the view.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Remove unneeded import

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Change CHANGELOG entry

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

* Removed unnecessary typecast

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-04-24 23:25:01 +02:00
Renovate Bot
d6eabae1b1 Update dependency codemirror to v5.61.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-24 22:03:34 +02:00
Renovate Bot
78497fc4c0 Update dependency abcjs to v6.0.0-beta.33
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-24 22:03:06 +02:00
renovate[bot]
94ff43cdf6
Update dependency ts-loader to v9 (#1211)
Signed-off-by: Renovate Bot <bot@renovateapp.com>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-24 19:38:36 +02:00
renovate[bot]
9346aa4ad7
Update dependency react-use to v17.2.4 (#1208)
Signed-off-by: Renovate Bot <bot@renovateapp.com>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-24 19:24:54 +02:00
renovate[bot]
d397ad67a0
Update jest (#1210)
Signed-off-by: Renovate Bot <bot@renovateapp.com>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-24 19:20:33 +02:00
renovate[bot]
d6659f4601
Update dependency eslint-plugin-flowtype to v5.7.2 (#1207)
Signed-off-by: Renovate Bot <bot@renovateapp.com>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-24 19:18:27 +02:00
renovate[bot]
9b87a7a0fb
Update definitely typed (#1204)
Signed-off-by: Renovate Bot <bot@renovateapp.com>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-24 15:32:05 +02:00
Erik Michelson
8e5a667d18
The History PR: I - Move to redux (#1156) 2021-04-22 22:46:24 +02:00
Philip Molares
bba2b207c4
TablePicker: Change table cells in picker (#1202)
- Fix error that the border of table cells was invisible in dark mode
- Add margin to table cells
- Add full border to table cells
- Change border-color while hovering over table cells

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-22 12:55:51 +02:00
renovate[bot]
9d8ce946e8
Lock file maintenance (#1200)
Signed-off-by: Renovate Bot <bot@renovateapp.com>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-19 13:25:50 +02:00
Renovate Bot
523f1d9105 Update actions/cache action to v2.1.5
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-17 07:49:03 +02:00
Renovate Bot
87de556ace Update definitely typed
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-17 07:48:43 +02:00
Renovate Bot
dcbd833cb5 Update dependency @testing-library/cypress to v7.0.6
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-17 07:48:27 +02:00
Renovate Bot
2b7867df3a Update dependency eslint-plugin-flowtype to v5.7.1
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-17 07:48:09 +02:00
Renovate Bot
eeda9b1f9a Update dependency js-yaml to v4.1.0
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-17 07:47:46 +02:00
Renovate Bot
4fa5dd62ac Update dependency markdown-it to v12.0.6
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-17 07:41:55 +02:00
Tilman Vatteroth
bfcb617eeb Use module build of markmap-lib
If we use the default import then webpack will use the "browser"
bundle which relies on CDN lazy loading of dependencies.

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-15 22:18:12 +02:00
Tilman Vatteroth
64fe7233e7 Fix code highlight indentation
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-15 22:14:02 +02:00
Philip Molares
29d9d49f5a
Change api route to /api/private (#1189) 2021-04-15 22:10:15 +02:00
Tilman Vatteroth
344304f329
Update dependencies (#1190)
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-15 19:04:46 +02:00
Renovate Bot
ae255f4bad Update dependency @testing-library/user-event to v13.1.3
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-15 09:23:26 +02:00
Renovate Bot
50a6fa4189 Update dependency @types/node to v12.20.8
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-15 09:22:55 +02:00
renovate[bot]
b42cb8fc49
Update dependency cypress to v7 (#1183)
* Update dependency cypress to v7

Signed-off-by: Renovate Bot <bot@renovateapp.com>

* Use global beforeEach for config loading

Signed-off-by: Erik Michelson <github@erik.michelson.eu>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Erik Michelson <github@erik.michelson.eu>
2021-04-14 22:28:50 +02:00
Renovate Bot
010d451f78 Update dependency react-i18next to v11.8.13
Signed-off-by: Renovate Bot <bot@renovateapp.com>
2021-04-13 22:29:40 +02:00
Tilman Vatteroth
36ac8f113c Remove browserstack integration
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-13 21:20:03 +02:00
renovate[bot]
d86e246974
Update linters (#1168)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-13 19:50:28 +02:00
renovate[bot]
90e1c8af11
Lock file maintenance (#1188)
Signed-off-by: Renovate Bot <bot@renovateapp.com>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-12 11:42:11 +02:00
Philip Molares
8186c96806
PrivateHistoryE2E: Extend POST /me/history
Test the correct behaviour in error cases

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-12 10:55:16 +02:00
Erik Michelson
7a21a26166
Disallow data and javascript URIs (#1186)
* Disallow data and javascript URIs

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
2021-04-11 22:48:31 +02:00
Philip Molares
258a38f8c0
ControllerTests: Add connection to controller tests
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-11 22:06:41 +02:00
Philip Molares
0933b88ff5
ESLint: Add extra rules for tests
Add afterEach and beforeAll as additional additionalTestBlockFunctions for jest/no-standalone-expect. This is necessary, because we use expects in those functions for the history service unit tests.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-18 14:02:55 +02:00
Philip Molares
ea7b0cb9c4
HistoryService: Add test for setHistory
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-11 22:06:36 +02:00
Philip Molares
524ad658d8
HistoryService: Add setHistory method
This is the transactional reimplementation of the business logic of the history controllers setHistory method (of the private api). This should prevent the problem that the history gets deleted, but a later error in the handling of the list of HistoryEntryImportDto let's the call fail.

See also: https://docs.nestjs.com/techniques/database#transactions

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-11 21:54:50 +02:00
Philip Molares
7c648e7056
HistoryService: Remove extra parameters from createOrUpdateHistoryEntry
As the function is now only called with a user and a note and the previous extra parameters are now added into the transactional setHistory method, this is no longer necessary.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-11 21:28:53 +02:00
Philip Molares
6b6aef284c
NotesService: Extract checkNoteIdOrAlias into own method
To reuse this functionality in the history services setHistory method, it was extracted into its own exported function.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-11 21:25:41 +02:00
Philip Molares
7e20bb0fef
[Project] Add seed script
This script invokes src/seed.ts to create a sqlite DB. The DB already contains some objects to manual test with. This ensures that devs easily can spin up a test instance of HedgeDoc and don't need to fumble around with the DB file.

See https://github.com/typeorm/typeorm#creating-a-connection-to-the-database

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-29 11:53:59 +02:00
Tilman Vatteroth
031e37325c Change plantuml server url to https
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-10 18:15:24 +02:00
renovate[bot]
ab9f89f39f
Update dependency vega to v5.20.2 (#1152)
* Update dependency vega to v5.20.2

Signed-off-by: Renovate Bot <bot@renovateapp.com>

* Add type to error object

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Add renovate group for vega

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Update vega code

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

* Regenerate yarn.lock

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-10 15:27:42 +00:00
Tilman Vatteroth
ad10bfa39a Reformat package.json
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-10 16:57:42 +02:00