fix: package upgrade (#2777)

Upgraded some packages to latest. This should resolve #2774. Fixes were
also applied after types upgrades that helped discover other errors.
This commit is contained in:
Wyatt Johnson
2020-01-06 16:14:56 +00:00
committed by GitHub
parent f900050ef4
commit 0dc3e8968a
15 changed files with 1398 additions and 657 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ export interface Comment extends TenantResource {
/**
* authorID stores the ID of the User that created this Comment.
*/
authorID: string;
authorID: string | null;
/**
* storyID stores the ID of the Story that this Comment was left on.
@@ -319,7 +319,7 @@ export async function editComment(
status: {
$in: EDITABLE_STATUSES,
},
deletedAt: null,
deletedAt: undefined,
createdAt: {
$gt: lastEditableCommentCreatedAt,
},
@@ -154,14 +154,7 @@ export async function retrieveSharedModerationQueueQueuesCounts(
const key = commentCountsModerationQueueQueuesKey(tenantID);
const freshKey = freshenKey(key);
// Get the values, and the freshness key.
const [[, queues], [, fresh]]: [
[
Error | undefined,
Record<keyof CommentModerationCountsPerQueue, string> | null
],
[Error | undefined, string | null]
] = await redis
const [[, fresh], [, queues]] = await redis
.pipeline()
.hgetall(key)
.get(freshKey)
+4 -1
View File
@@ -223,7 +223,10 @@ export async function retrieveTenant(mongo: Db, id: string) {
return collection(mongo).findOne({ id });
}
export async function retrieveManyTenants(mongo: Db, ids: string[]) {
export async function retrieveManyTenants(
mongo: Db,
ids: ReadonlyArray<string>
) {
const cursor = collection(mongo).find({
id: {
$in: ids,