Commit Graph

1118 Commits

Author SHA1 Message Date
Christian Bundy d6ec22aa0c
Merge pull request #473 from fraction/dependabot/npm_and_yarn/tap-14.11.0
Bump tap from 14.10.7 to 14.11.0
2020-11-21 15:20:58 -08:00
Christian Bundy 47a9c4b81f
Merge pull request #472 from fraction/dependabot/npm_and_yarn/open-7.3.0
Bump open from 7.0.3 to 7.3.0
2020-11-21 15:20:47 -08:00
dependabot[bot] 918a74f55e
Bump @types/supertest from 2.0.9 to 2.0.10
Bumps [@types/supertest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/supertest) from 2.0.9 to 2.0.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/supertest)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-21 23:10:14 +00:00
dependabot[bot] e1b33597f3
Bump tap from 14.10.7 to 14.11.0
Bumps [tap](https://github.com/tapjs/node-tap) from 14.10.7 to 14.11.0.
- [Release notes](https://github.com/tapjs/node-tap/releases)
- [Commits](https://github.com/tapjs/node-tap/compare/v14.10.7...v14.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-21 23:09:54 +00:00
dependabot[bot] 709ec00554
Bump open from 7.0.3 to 7.3.0
Bumps [open](https://github.com/sindresorhus/open) from 7.0.3 to 7.3.0.
- [Release notes](https://github.com/sindresorhus/open/releases)
- [Commits](https://github.com/sindresorhus/open/compare/v7.0.3...v7.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-21 23:09:31 +00:00
Daan Wynen 4070b4648e
Merge pull request #471 from fraction/add-dependabot
Add Dependabot
2020-11-22 00:07:48 +01:00
Christian Bundy f68dd8fbe5
Add Dependabot 2020-11-21 14:59:38 -08:00
Christian Bundy dde991a680 Use stricter regex for @mention match
Problem: You can't publish email addresses or user@host combos or
anything like that because the regex is super liberal in what it
matches.

Solution: Ensure that the first word in a message is a mention *or*
ensure that there's whitespace before a mention. This also adds a
regex101 link (in lieu of proper testing, for now) which makes this
easier to test and track over time.

See-also: https://github.com/fraction/oasis/issues/466
2020-11-20 17:09:55 -08:00
Christian Bundy e94d7ac2ba Remove unused fixtures
Problem: These fixtures seem unused.

Solution: DELETE THEM!
2020-11-20 16:42:07 -08:00
Christian Bundy a5450d8a0f
Merge pull request #465 from christianbundy/fix-tests
Fix tests and remove workaround
2020-11-19 06:40:04 -08:00
Christian Bundy 0aacf3bbc3 Fix tests and remove workaround
Problem: Recently there was a PR [0] merged with a quickfix to avoid
some test failures, which is something I've been trying to avoid. While
`process.exit()` works fine, I'm worried that it means we don't
understand what's happening under the hood, *plus* I have the [maybe
unjustified?] worry that it might kill the process during a database
write or something dangerous. It looks like this particular test hang
was caused by both a stream and some number of intervals that were left
open.

Solution: Provide a way to close the stream and intervals in `index.js`
and ensure that we do that before closing the server.

[0]: https://github.com/fraction/oasis/pull/462
2020-11-11 08:25:38 -08:00
Christian Bundy 4e0960d2d1
Merge pull request #462 from cryptix/post-preview-pr-ready
Post preview with blobs and mentions
2020-11-11 08:24:25 -08:00
Alexander Cobleigh 2fc33f450d document quick fix for making the server definitively exit 2020-11-11 16:57:28 +01:00
Alexander Cobleigh e567443925 try workaround 2020-11-11 15:19:05 +01:00
Henry e7ea4dbb37 make code flow more shallow 2020-11-01 14:45:14 +01:00
Henry e3906e2230 fix race on blobs variable
fixes TypeError: Cannot read property 'startsWith' of undefined
2020-11-01 14:40:43 +01:00
Alexander Cobleigh 4d5c571df3 restore common-good check & fix its errors
after having restored the package-lock.json to that of the master branch, this
PR now uses common-good@2.0.3, which has common-good check as a command.

i ran it manually as $(npm bin)/common-good check, and fixed whatever
it complained about.
2020-10-21 15:33:01 +02:00
Alexander Cobleigh d88d960c52 reset test/basic.js
this time without cryptix's basic blob test (to see if CI completes)
2020-10-21 14:53:18 +02:00
Alexander Cobleigh 988d35a736 manually edit package-lock
the purpose is to only add the two new dependencies this PR introduces, piexifjs
and file-types (and their transitive dependencies, ofc), without affecting any
other dependencies, as compared to oasis's current master branch
2020-10-21 13:58:15 +02:00
Alexander Cobleigh 756fd180e4 fix eslint errors 2020-10-20 13:55:52 +02:00
Alexander Cobleigh 0624aeb5fc shuffle css around to make prettier / common-good happy 2020-10-20 13:51:02 +02:00
Alexander Cobleigh e08901d88c replace warning with comment 2020-10-20 13:28:52 +02:00
Alexander Cobleigh 6220da4b52 fix button sizes 2020-10-19 10:44:52 +02:00
Henry 67241ce286 pin deps 2020-10-19 10:38:21 +02:00
Henry 4884f264fd add simple test for blob uploads 2020-10-19 10:06:35 +02:00
Henry e7dd215f4d fix common-good setup
somehow it's cli arguments changed
2020-10-19 10:06:34 +02:00
Henry 3bdca12a21 invalidate @mentions cache if the user follows someone 2020-10-19 10:06:07 +02:00
Henry c3acbc80d1 fix @mentions lookup table
with duplicates ignored switching back to a previous name doesn't work.
Imagine names [a,b,a], with duplicates ignored the query only returns [a,b].
2020-10-19 10:06:07 +02:00
Alexander Cobleigh 2f746d99e1 remove bracket from regex 2020-10-19 10:06:07 +02:00
Alexander Cobleigh ffb207ce57 add more delims, fix double nicknames 2020-10-19 10:06:07 +02:00
Henry 8f9ef5e3c7 change name->feed lookup structure
we had duplicates and _old_ names in the first attempt,
with this new strucutre only one name per feed is kept (the most recent)

also: tweak regexp some more

should not correctly match end of string and NOT match inside md link
https://regex101.com/r/Uu6iTj/3/
2020-10-19 10:06:07 +02:00
Alexander Cobleigh 28f1821fd5 improve mentions regex edge cases 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 9fb2b87708 add i18n for mentions component 2020-10-19 10:06:06 +02:00
Alexander Cobleigh d4a1602940 add much improved mentions listing 2020-10-19 10:06:06 +02:00
Henry 6ea47ebac6 some more comments 2020-10-19 10:06:06 +02:00
Alexander Cobleigh a2817cf5fb implement relationship-based name matching 2020-10-19 10:06:06 +02:00
Henry d1e68e94a7 some prefix matching logic
lowercase the searches and see if they match the beginning of a name.
2020-10-19 10:06:06 +02:00
Alexander Cobleigh 632d23cfae add german translations (thx cryptix) 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 8127008ce4 add i18n.preview for all languages except .de, improve labels 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 2fca62549e delineate bottom border of summary details 2020-10-19 10:06:06 +02:00
Henry 9004280d0b some @mentions in preview
replaces immediatly if there is one match,
but just spews multiple ones.

* add silly in-memory about:name cache

rational is also commented the code. the tl:dr; is oasis already doesnt
use ssb-about or other indexing plugins.

butt for @mentions we need a quick way to lookup names to feeds,
otherwise we block the preview flow with long query times.
2020-10-19 10:06:06 +02:00
Alexander Cobleigh 8fe9c5b6f5 make subtopicView and commentView consistent w/ threads 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 2f042c5964 remove superfluous padding top from post-preview2C 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 53ee4a58a9 tweak post preview css 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 6d50e53604 remove exif data from uploaded jpegs 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 680a894efd add blob upload to comment, subtopics 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 119c1f8584 implement content warnings for comments, subtopics
also make sure to only display content warning in summary for subtopics
2020-10-19 10:06:06 +02:00
Alexander Cobleigh 0449ebd425 refactor previewView, fix displaying content warnings in previews 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 2d5781f0fe add subtopic previewing 2020-10-19 10:06:06 +02:00
Alexander Cobleigh 83ab086fb5 extract preview code into generatePreview 2020-10-19 10:06:06 +02:00