Upgrade deps (#5796)

This commit is contained in:
Elias Nahum
2021-10-29 14:38:20 -03:00
committed by GitHub
parent fbd8b92194
commit c8d7d4c528
15 changed files with 373 additions and 404 deletions

View File

@@ -11,7 +11,7 @@ import {createPostsChain} from '@database/operator/utils/post';
import ServerDataOperator from '..';
Q.experimentalSortBy = jest.fn().mockImplementation((field) => {
Q.sortBy = jest.fn().mockImplementation((field) => {
return Q.where(field, Q.gte(0));
});
describe('*** Operator: Post Handlers tests ***', () => {

View File

@@ -75,7 +75,7 @@ const PostsInChannelHandler = (superclass: any) => class extends superclass {
// Find the records in the PostsInChannel table that have a matching channel_id
const chunks = (await this.database.get(POSTS_IN_CHANNEL).query(
Q.where('channel_id', channelId),
Q.experimentalSortBy('latest', Q.desc),
Q.sortBy('latest', Q.desc),
).fetch()) as PostsInChannelModel[];
// chunk length 0; then it's a new chunk to be added to the PostsInChannel table
@@ -130,7 +130,7 @@ const PostsInChannelHandler = (superclass: any) => class extends superclass {
let recentChunk: PostsInChannelModel|undefined;
const chunks = (await this.database.get(POSTS_IN_CHANNEL).query(
Q.where('channel_id', firstPost.channel_id),
Q.experimentalSortBy('latest', Q.desc),
Q.sortBy('latest', Q.desc),
).fetch()) as PostsInChannelModel[];
if (chunks.length) {
@@ -193,7 +193,7 @@ const PostsInChannelHandler = (superclass: any) => class extends superclass {
// Find the records in the PostsInChannel table that have a matching channel_id
const chunks = (await this.database.get(POSTS_IN_CHANNEL).query(
Q.where('channel_id', channelId),
Q.experimentalSortBy('latest', Q.desc),
Q.sortBy('latest', Q.desc),
).fetch()) as PostsInChannelModel[];
// chunk length 0; then it's a new chunk to be added to the PostsInChannel table

View File

@@ -30,7 +30,7 @@ const PostsInThreadHandler = (superclass: any) => class extends superclass {
const {firstPost, lastPost} = getPostListEdges(postsMap[rootId]);
const chunks = (await this.database.get(POSTS_IN_THREAD).query(
Q.where('root_id', rootId),
Q.experimentalSortBy('latest', Q.desc),
Q.sortBy('latest', Q.desc),
).fetch()) as PostsInThreadModel[];
if (chunks.length) {