Skip to content

Commit

Permalink
Chore: Meteor 2.2 and bump dependencies (RocketChat#22399)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Sampaio <[email protected]>
  • Loading branch information
ggazzo and sampaiodiego authored Jun 30, 2021
1 parent 6236ec0 commit a7932bf
Show file tree
Hide file tree
Showing 169 changed files with 8,410 additions and 9,662 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public/livechat/
!.scripts
public/pdf.worker.min.js
public/workers/**/*
imports/client/
imports/client/**/*
!/.storybook/
ee/server/services/dist/**
!/.mocharc.js
Expand Down
2 changes: 2 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"prefer-single"
],
"indent": "off",
"no-dupe-class-members": "off",
"no-extra-parens": "off",
"no-spaced-func": "off",
"no-unused-vars": "off",
Expand Down Expand Up @@ -116,6 +117,7 @@
"enforceForArrowConditionals": false
}
],
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": ["error", {
"argsIgnorePattern": "^_",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
path: |
./node_modules
./ee/server/services/node_modules
key: ${{ runner.OS }}-node_modules-2-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

- name: Cache meteor local
uses: actions/cache@v2
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
path: |
./node_modules
./ee/server/services/node_modules
key: ${{ runner.OS }}-node_modules-2-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

- name: NPM install
if: steps.cache-nodemodules.outputs.cache-hit != 'true' || steps.cache-cypress.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -306,7 +306,7 @@ jobs:
path: |
./node_modules
./ee/server/services/node_modules
key: ${{ runner.OS }}-node_modules-2-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}
key: ${{ runner.OS }}-node_modules-4-${{ hashFiles('**/package-lock.json', '.github/workflows/build_and_test.yml') }}

- name: Cache meteor local
uses: actions/cache@v2
Expand Down
14 changes: 7 additions & 7 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ [email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
typescript@4.1.2
[email protected].1
typescript@4.2.2
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
mongo@1.10.1
mongo@1.11.0
[email protected]
[email protected]
[email protected]
Expand Down Expand Up @@ -62,16 +62,16 @@ pauli:accounts-linkedin
raix:handlebar-helpers
raix:ui-dropped-event

rocketchat:tap-i18n
rocketchat:tap-i18n@1.10.1
[email protected]
littledata:synced-cron

edgee:slingshot
jalik:[email protected]
accounts-base@1.8.0
accounts-base@1.9.0
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
htmljs
less
Expand All @@ -82,7 +82,7 @@ [email protected]
[email protected]
[email protected]
templating
[email protected].0
[email protected].1
[email protected]
rocketchat:oauth2-server
rocketchat:i18n
Expand Down
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@2.1.1
METEOR@2.2
78 changes: 39 additions & 39 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
accounts-base@1.8.0
accounts-base@1.9.0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
aldeed:[email protected]
[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected]
[email protected]
blaze@2.3.4
blaze-html-templates@1.1.2
blaze-tools@1.0.10
blaze@2.5.0
blaze-html-templates@1.2.1
blaze-tools@1.1.2
[email protected]
[email protected]
caching-html-compiler@1.1.3
caching-html-compiler@1.2.0
[email protected]
cfs:[email protected]
[email protected]
[email protected]
dandv:[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected]
[email protected].2
[email protected].3
[email protected]
[email protected]
dispatch:[email protected]
[email protected]
[email protected].0
[email protected].1
[email protected]
[email protected].0
[email protected].0
[email protected].1
[email protected].1
edgee:[email protected]
[email protected]
[email protected]
[email protected]
facebook-oauth@1.7.4
facebook-oauth@1.8.0
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
html-tools@1.0.11
htmljs@1.0.11
[email protected].3
[email protected].0
html-tools@1.1.2
htmljs@1.1.1
[email protected].4
[email protected].1
[email protected]
jalik:[email protected]
jalik:[email protected]
jalik:[email protected]
jparker:[email protected]
jparker:[email protected]
jparker:[email protected]
jquery@1.11.11
jquery@3.0.0
kadira:[email protected]
konecty:[email protected]
konecty:[email protected]
[email protected].0
[email protected].1
[email protected]
littledata:[email protected]
[email protected]
Expand All @@ -75,37 +75,37 @@ mdg:[email protected]
[email protected]
[email protected]
[email protected]
meteorhacks:[email protected].4
meteorhacks:[email protected].5
meteorspark:[email protected]
[email protected].3
[email protected].4
[email protected]
[email protected].1
[email protected].2
mizzao:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
mongo@1.10.1
mongo@1.11.1
[email protected]
[email protected]
[email protected].7
[email protected].8
mrt:[email protected]
mystor:[email protected]
nimble:[email protected]
nooitaf:[email protected]_1
[email protected].3
npm-mongo@3.8.1
[email protected].4
npm-mongo@3.9.0
[email protected]
[email protected]
[email protected]
[email protected].16
[email protected].18
[email protected]
ostrio:[email protected]
pauli:[email protected]
pauli:[email protected]
[email protected]
raix:eventemitter@0.1.3
raix:eventemitter@1.0.0
raix:[email protected]
raix:[email protected]
[email protected]
Expand All @@ -122,28 +122,28 @@ rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:[email protected]
rocketchat:tap-i18n@1.9.1
rocketchat:tap-i18n@1.10.1
rocketchat:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
simple:[email protected]
[email protected].1
spacebars@1.0.15
spacebars-compiler@1.1.3
[email protected].3
spacebars@1.2.0
spacebars-compiler@1.2.1
[email protected]
[email protected]
templating@1.3.2
templating-compiler@1.3.3
templating-runtime@1.3.2
templating-tools@1.1.2
templating@1.4.1
templating-compiler@1.4.1
templating-runtime@1.5.0
templating-tools@1.2.0
[email protected]
[email protected]
typescript@4.1.2
typescript@4.2.2
[email protected]
[email protected]
[email protected].1
[email protected].0
[email protected].2
[email protected].1
[email protected]
1 change: 0 additions & 1 deletion .postcssrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"preserve": true
},
"postcss-media-minmax": {},
"postcss-selector-not": {},
"postcss-nested": {},
"autoprefixer": {}
},
Expand Down
1 change: 0 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ module.exports = {
plugins: [
require('postcss-custom-properties')({ preserve: true }),
require('postcss-media-minmax')(),
require('postcss-selector-not')(),
require('postcss-nested')(),
require('autoprefixer')(),
require('postcss-url')({ url: ({ absolutePath, relativePath, url }) => {
Expand Down
2 changes: 1 addition & 1 deletion app/2fa/server/functions/resetTOTP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Users } from '../../../models/server/raw/index';
import { IUser } from '../../../../definition/IUser';

const sendResetNotification = async function(uid: string): Promise<void> {
const user: IUser = await Users.findOneById(uid, { projection: { language: 1, emails: 1 } });
const user = await Users.findOneById<Pick<IUser, 'language' | 'emails'>>(uid, { projection: { language: 1, emails: 1 } });
if (!user) {
throw new Meteor.Error('invalid-user');
}
Expand Down
2 changes: 1 addition & 1 deletion app/livechat/server/business-hour/AbstractBusinessHour.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface IBusinessHourBehavior {

export interface IBusinessHourType {
name: string;
getBusinessHour(id: string): Promise<ILivechatBusinessHour | undefined>;
getBusinessHour(id?: string): Promise<ILivechatBusinessHour | null>;
saveBusinessHour(businessHourData: ILivechatBusinessHour): Promise<ILivechatBusinessHour>;
removeBusinessHourById(id: string): Promise<void>;
}
Expand Down
6 changes: 3 additions & 3 deletions app/livechat/server/business-hour/BusinessHourManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ export class BusinessHourManager {
this.behavior = behavior;
}

async getBusinessHour(id?: string, type?: string): Promise<ILivechatBusinessHour | undefined> {
async getBusinessHour(id?: string, type?: string): Promise<ILivechatBusinessHour | null> {
const businessHourType = this.getBusinessHourType(type as string || LivechatBusinessHourTypes.DEFAULT);
if (!businessHourType) {
return;
return null;
}
return businessHourType.getBusinessHour(id as string);
return businessHourType.getBusinessHour(id);
}

async saveBusinessHour(businessHourData: ILivechatBusinessHour): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion app/livechat/server/business-hour/Default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface IExtraProperties {
export class DefaultBusinessHour extends AbstractBusinessHourType implements IBusinessHourType {
name = LivechatBusinessHourTypes.DEFAULT;

getBusinessHour(): Promise<ILivechatBusinessHour | undefined> {
getBusinessHour(): Promise<ILivechatBusinessHour | null> {
return this.BusinessHourRepository.findOneDefaultBusinessHour();
}

Expand Down
4 changes: 2 additions & 2 deletions app/models/server/raw/Banners.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Collection, Cursor, FindOneOptions } from 'mongodb';
import { Collection, Cursor, FindOneOptions, WithoutProjection } from 'mongodb';

import { BannerPlatform, IBanner } from '../../../../definition/IBanner';
import { BaseRaw } from './BaseRaw';
Expand All @@ -16,7 +16,7 @@ export class BannersRaw extends BaseRaw<T> {
]);
}

findActiveByRoleOrId(roles: string[], platform: BannerPlatform, bannerId?: string, options?: FindOneOptions<T>): Cursor<T> {
findActiveByRoleOrId(roles: string[], platform: BannerPlatform, bannerId?: string, options?: WithoutProjection<FindOneOptions<T>>): Cursor<T> {
const today = new Date();

const query = {
Expand Down
19 changes: 12 additions & 7 deletions app/models/server/raw/BannersDismiss.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { Collection, Cursor, FindOneOptions } from 'mongodb';
import { Collection, Cursor, FindOneOptions, WithoutProjection } from 'mongodb';

import { IBannerDismiss } from '../../../../definition/IBanner';
import { BaseRaw } from './BaseRaw';

type T = IBannerDismiss;
export class BannersDismissRaw extends BaseRaw<T> {
export class BannersDismissRaw extends BaseRaw<IBannerDismiss> {
constructor(
public readonly col: Collection<T>,
public readonly trash?: Collection<T>,
public readonly col: Collection<IBannerDismiss>,
public readonly trash?: Collection<IBannerDismiss>,
) {
super(col, trash);

Expand All @@ -16,12 +15,18 @@ export class BannersDismissRaw extends BaseRaw<T> {
]);
}

findByUserIdAndBannerId(userId: string, bannerIds: string[], options?: FindOneOptions<T>): Cursor<T> {
findByUserIdAndBannerId(userId: string, bannerIds: string[]): Cursor<IBannerDismiss>;

findByUserIdAndBannerId(userId: string, bannerIds: string[], options: WithoutProjection<FindOneOptions<IBannerDismiss>>): Cursor<IBannerDismiss>;

findByUserIdAndBannerId<P>(userId: string, bannerIds: string[], options: FindOneOptions<P extends IBannerDismiss ? IBannerDismiss : P>): Cursor<P>;

findByUserIdAndBannerId<P>(userId: string, bannerIds: string[], options?: undefined | WithoutProjection<FindOneOptions<IBannerDismiss>> | FindOneOptions<P extends IBannerDismiss ? IBannerDismiss : P>): Cursor<P> | Cursor<IBannerDismiss> {
const query = {
userId,
bannerId: { $in: bannerIds },
};

return this.col.find(query, options);
return options ? this.col.find(query, options) : this.col.find(query);
}
}
Loading

0 comments on commit a7932bf

Please sign in to comment.