Commit Graph

231 Commits

Author SHA1 Message Date
Christian Bundy
c86865a5ca Add more comprehensive tests
Problem: I've been worried about merging these version bump pull
requests since we don't have many tests, and I *really* don't want to
merge any catostrophic breaking changes anywhere.

Solution: Add some tests that are more comprehensive, starting by
creating a temporary SSB database and keypair and then editing the
profile, previewing a message, publishing a message, etc., until we have
a handful of small functions actually being tested. This won't ensure
that everything works forever, and it *really* doesn't test replication,
but it should help increase our confidence that test success means that
fewer things are broken.
2020-11-22 15:35:15 -08:00
Christian Bundy
c993adc01a Merge flotilla source code into Oasis
Problem: I thought it would be a good idea to keep our SSB stack in
another module but it just creates friction and adds another layer to
our stack that has to be independently upgraded and versioned.

Solution: Merge the @fraction/flotilla source code into Oasis so that we
don't have to maintain two separate projects.
2020-11-22 10:10:53 -08:00
Christian Bundy
3600e09ab0
Merge pull request #505 from fraction/dependabot/npm_and_yarn/file-type-16.0.1
Bump file-type from 15.0.1 to 16.0.1
2020-11-21 17:36:05 -08:00
Christian Bundy
95cef65be2
Merge pull request #506 from fraction/dependabot/npm_and_yarn/pretty-ms-7.0.1
Bump pretty-ms from 6.0.1 to 7.0.1
2020-11-21 17:22:06 -08:00
dependabot[bot]
6a0ad69969
Bump file-type from 15.0.1 to 16.0.1
Bumps [file-type](https://github.com/sindresorhus/file-type) from 15.0.1 to 16.0.1.
- [Release notes](https://github.com/sindresorhus/file-type/releases)
- [Commits](https://github.com/sindresorhus/file-type/compare/v15.0.1...v16.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 01:11:13 +00:00
Christian Bundy
ce8d4cbf57
Merge pull request #503 from fraction/dependabot/npm_and_yarn/highlight.js-10.4.0
Bump highlight.js from 9.18.1 to 10.4.0
2020-11-21 17:08:13 -08:00
Christian Bundy
5d306b7364
Merge pull request #500 from fraction/dependabot/npm_and_yarn/types/markdown-it-10.0.3
Bump @types/markdown-it from 0.0.9 to 10.0.3
2020-11-21 17:06:36 -08:00
dependabot[bot]
c72dd99c00
Bump pretty-ms from 6.0.1 to 7.0.1
Bumps [pretty-ms](https://github.com/sindresorhus/pretty-ms) from 6.0.1 to 7.0.1.
- [Release notes](https://github.com/sindresorhus/pretty-ms/releases)
- [Commits](https://github.com/sindresorhus/pretty-ms/compare/v6.0.1...v7.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 01:00:09 +00:00
dependabot[bot]
83224ea2f0
Bump highlight.js from 9.18.1 to 10.4.0
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 9.18.1 to 10.4.0.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/9.18.1...10.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 00:59:07 +00:00
dependabot[bot]
a27f7c4716
Bump @types/markdown-it from 0.0.9 to 10.0.3
Bumps [@types/markdown-it](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/markdown-it) from 0.0.9 to 10.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/markdown-it)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 00:57:59 +00:00
dependabot[bot]
ae9da3df5b
Bump @types/sharp from 0.24.0 to 0.26.1
Bumps [@types/sharp](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sharp) from 0.24.0 to 0.26.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sharp)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 00:57:17 +00:00
Christian Bundy
520ae4b2ad
Merge pull request #493 from fraction/dependabot/npm_and_yarn/sharp-0.26.3
Bump sharp from 0.25.2 to 0.26.3
2020-11-21 16:45:47 -08:00
dependabot[bot]
1478579c40
Bump sharp from 0.25.2 to 0.26.3
Bumps [sharp](https://github.com/lovell/sharp) from 0.25.2 to 0.26.3.
- [Release notes](https://github.com/lovell/sharp/releases)
- [Changelog](https://github.com/lovell/sharp/blob/master/docs/changelog.md)
- [Commits](https://github.com/lovell/sharp/compare/v0.25.2...v0.26.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 00:32:20 +00:00
dependabot[bot]
31036493eb
Bump @types/highlight.js from 9.12.3 to 10.1.0
Bumps [@types/highlight.js](https://github.com/highlightjs/highlight.js) from 9.12.3 to 10.1.0.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/commits/10.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 00:31:57 +00:00
Christian Bundy
8d43f62e21
Merge pull request #489 from fraction/dependabot/npm_and_yarn/markdown-it-12.0.2
Bump markdown-it from 10.0.0 to 12.0.2
2020-11-21 16:29:02 -08:00
Christian Bundy
8c1f2c0606
Merge pull request #488 from fraction/dependabot/npm_and_yarn/changelog-version-2.0.0
Bump changelog-version from 1.0.1 to 2.0.0
2020-11-21 16:27:40 -08:00
dependabot[bot]
3255b97c7b
Bump markdown-it from 10.0.0 to 12.0.2
Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 10.0.0 to 12.0.2.
- [Release notes](https://github.com/markdown-it/markdown-it/releases)
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/10.0.0...12.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 00:20:09 +00:00
dependabot[bot]
8078ffb9cf
Bump changelog-version from 1.0.1 to 2.0.0
Bumps [changelog-version](https://github.com/AlbertoFdzM/changelog-version) from 1.0.1 to 2.0.0.
- [Release notes](https://github.com/AlbertoFdzM/changelog-version/releases)
- [Changelog](https://github.com/AlbertoFdzM/changelog-version/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/AlbertoFdzM/changelog-version/compare/v1.0.1...v2.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 00:19:47 +00:00
dependabot[bot]
f0c74e8e31
Bump yargs from 15.3.1 to 16.1.1
Bumps [yargs](https://github.com/yargs/yargs) from 15.3.1 to 16.1.1.
- [Release notes](https://github.com/yargs/yargs/releases)
- [Changelog](https://github.com/yargs/yargs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/yargs/compare/v15.3.1...v16.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 00:18:42 +00:00
dependabot[bot]
e046bad5c3
Bump supertest from 4.0.2 to 6.0.1
Bumps [supertest](https://github.com/visionmedia/supertest) from 4.0.2 to 6.0.1.
- [Release notes](https://github.com/visionmedia/supertest/releases)
- [Commits](https://github.com/visionmedia/supertest/compare/v4.0.2...v6.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-22 00:01:21 +00: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
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
Henry
e7dd215f4d fix common-good setup
somehow it's cli arguments changed
2020-10-19 10:06:34 +02:00
6d50e53604 remove exif data from uploaded jpegs 2020-10-19 10:06:06 +02:00
Henry
5cb4c8aff1 use file-type for mime and enhanced preview
and cleanup blob addition to text
2020-10-19 10:06:02 +02:00
Jacob Karlsson
c205826b48 Merge branch 'master' of github.com:fraction/oasis into image-search 2020-05-06 20:05:37 +02:00
Christian Bundy
f86b73b40e Upgrade Flotilla and SSB-CONN, remove auto-stage
Problem: The auto-stage code was a horrible hack that may be causeing an
OOM bug if too many peers are staged too quickly.

Solution: Since SSB-CONN now supports a variable number of connection
hops, we can remove the auto-stage hack and use the default scheduler
instead of trying to staple on our own hacky scheduler fix.
2020-05-04 13:27:06 -07:00
Jacob Karlsson
3b753f16ac Apply style fixes 2020-05-03 23:14:19 +02:00
Jacob Karlsson
e456c1d9c5 Add image search 2020-05-03 22:16:44 +02:00
Christian Bundy
09ff4cad21 2.16.0 2020-04-13 14:32:21 -07:00
Christian Bundy
8e4a1c8e53 2.15.0 2020-04-10 12:51:36 -07:00
Christian Bundy
a24b5a7acf Fix broken changelog moving logic
Problem: The `npm version` command is supposed to do some changelog
magic but the paths are broken.

Solution: Use the correct paths.
2020-04-10 12:50:45 -07:00
Christian Bundy
2968f7d80a Merge https://github.com/fraction/oasis into advisory-fix-1 2020-04-10 10:51:29 -07:00
Christian Bundy
ecdd78c42e Merge branch 'master' of github.com:fraction/oasis into update-deps 2020-04-08 14:52:06 -07:00
Christian Bundy
3886b1fc53 Increase test timeout and remove log statements
Problem: The Windows tests seem to be failing, it looks like a timeout
problem? Also there are a handful of debug statements around the code
that can be safely removed.

Solution: Double the timeout length and remove debug statements.
2020-04-06 13:22:07 -07:00
Christian Bundy
cb1be6bc8b Fix open sockets that weren't closing during tests
Problem: The test suite isn't closing the database because `app.close()`
only affects the HTTP server. This means that tests don't exit cleanly
and sockets remain open and all sorts of really fun stuff that we don't
want while writing tests.

Solution: Refactor `src/ssb.js` so that we can exit cleanly and have
less rope to hang ourselves with. Add a small lifecycle test that can
help us ensure that the bare minimum lifecycle events are working
correctly, plus now the previous tests are passing on my machine too.
2020-04-06 12:14:58 -07:00
Christian Bundy
3c9ec37d2f Add very basic test suite
Problem: ESLint and TypeScript help catch some types of regressions, but
they don't protect us against obvious stuff like "the server won't
start". This means that humans need to test a bunch of stuff manually,
and that can be really tedious and exhausting.

Solution: Yesterday someone invented this cool concept called "testing"
where you write automated tests for your software to ensure it actually
works the way you expect. It might have beeen invented before yesterday,
I don't know. Anyway, this solution adds a bunch of tests that send HTTP
GET requests to a bunch of endpoints to make sure the server is at least
returning HTTP 200 responses. It also fixes a race condition where HTTP
server was available before the readme / version strings were loaded.
2020-04-03 09:17:13 -07:00
Christian Bundy
182d6d68bc Update npm dependencies
Problem: Our dependencies are getting ahead of us!

Solution: Catch up with `npm update`. I think Markdown-It was the only
breaking change, and it didn't affect us.
2020-04-03 07:11:11 -07:00
Christian Bundy
b01ff74dbc Clean up root of project directory
Problem: Project root has a handful of files that aren't used at all or
could be placed elsewhere.

Solution: Delete unused files and move the changelog to the
documentation directory with the other Markdown files (other than the
readme, of course).
2020-04-01 15:04:57 -07:00
Christian Bundy
555249277f Remove @ts-ignore workaround
Problem: The workaround is no longer necessary now that the new version
of @types/koa has been published. Thanks to @peterblazejewicz,
@harryparkdotio, and @orta for the quick upstream fix.

Solution: Run `npm update` and remove the `@ts-ignore` comment.
2020-03-27 09:13:31 -07:00
Christian Bundy
defb57321e Merge branch 'master' of github.com:fraction/oasis into type-defs 2020-03-27 08:02:44 -07:00
Christian Bundy
c4aaf47a06 Fix Markdown link bug
Problem: Some sigil links were broken because of a bug in SSB-Markdown
that was recently resolved.

Solution: Upgrade SSB-Markdown.

Fixes: https://github.com/fraction/oasis/issues/242
2020-03-25 10:15:26 -07:00
Christian Bundy
e0a20e4915 Merge commit 'd9e8' 2020-03-24 14:45:33 -07:00
Nick Wynja
d9e829e2e8 Removes husky to fix #346 2020-03-24 15:19:33 -04:00
Christian Bundy
c9fffe2b9c Add TypeScript definitions for better guardrails
Problem: We have TypeScript enabled on the project but have been missing
lots of definition files, so there are like 500 errors when you enable
`--noImplicitAny`.

Solution: Add definitions and fix the bugs that they point out. This
reduces the number of errors with `--noImplicitAny` to 285.
2020-03-24 09:23:52 -07:00
Christian Bundy
dd388feefe Revert @fraction/flotilla change 2020-03-24 08:15:05 -07:00
Christian Bundy
488852f205 Resolve Travis CI + Windows EOL bug
Problem: Travis CI is converting our EOL characters and it's causing
problems when we're parsing with Prettier.

Solution: Disable auto-conversion.
2020-03-23 19:20:38 -07:00
Christian Bundy
32465e5983 Update npm dependencies
Problem: Our dependencies are falling behind and it'd be nice to have
them up-to-date. The only big update it that Common-Good upgraded to the
latest version of Prettier.

Solution: Update them!
2020-03-23 18:59:53 -07:00
Cinnamon
3e74a5cd2e
Merge pull request #298 from christianbundy/2019-03-npm-update
Upgrade npm dependencies
2020-03-11 16:02:09 -07:00
Christian Bundy
c575aebb03 2.14.0 2020-03-10 16:57:46 -07:00