mirror of
https://github.com/wassname/talk.git
synced 2026-07-19 11:28:50 +08:00
[CORL-878] Upgrade dependencies (#2867)
* chore: upgrade fluent * chore: upgrade metascraper * chore: upgrade akismet-api * chore: upgrade apollo-server-express * chore: upgrade archiver * chore: upgrade bull * chore: upgrade express, cheerio, content-security-policy-builder * chore: upgrade convict * chore: upgrade cors, cron * chore: upgrade csv-stringify * chore: upgrade dompurify * chore: upgrade dotenv * chore: upgrade express-static-gzip * chore: upgrade fs-extra * chore: upgrade graphql-js * chore: upgrade graphql packages * chore: upgrade html-minifier * chore: upgrade html-to-text * chore: upgrade ioredis * chore: upgrade joi * chore: upgrade jsdom * chore: upgrade jsonwebtoken * chore: upgrade juice * chore: upgrade jwks-rsa ad linkifyjs * chore: upgrade lodash * chore: upgrade luxon * chore: upgrade metascraper * chore: upgrade mongodb * chore: upgrade ms * chore: upgrade node and node-fetch types * chore: upgrade nodemailer nunjucks and typescript-eslint * chore: Upgrade passport * upgrade: prom-client react-helmet source-map-support stack-utils * chore: upgrade uuid * chore: upgrade @babel packages * chore: upgrade types * chore: upgrade autoprefixer * chore: upgrade jest * chore: upgrade ts-jest * chore: remove linkify.d.ts * chore: upgrade bowser * chore: case-sensitive-paths-webpack-plugin * chore: upgrade classnames * chore: upgrade commander * chore: upgrade comment-json * chore: upgrade cross-spawn compression-webpack-plugin del * chore: upgrade build and watch related dependencies * chore: upgrade css-vars-ponyfill * chore: upgrade eslint and css-vars-ponyfill * chore: upgrade enzyme and eventemitter2 * fix: form bug * chore: upgrade farce * chore: upgrade final form * chore: upgrade react-popper * chore: upgrade flat and fork-ts-checker-webpack-plugin * chore: upgrade husky and gulp related, intersection observer * chore: upgrade lint-staged * chore: upgrade marked, loader-utils, mini-css-extract-plugin * chore: upgrade postcss-nested, proxy-polyfill, pstree.remy * chore: upgrade prettier * chore: fix prettier changes, upgrade react * chore: mute createFactory deprecated message * chore: upgrade react-copy-to-clipbard, react-axe, react-dom, react-test-renderer, react-timeago * chore: upgrade react-transistion-group, react-responsive * chore: upgrade types * chore: upgrade react-dev-utils, react-error-overlay regenerator-runtime * chore: upgrade types, sinon, sockjs-client, strip-ansi * chore: upgrade types, fonts * chore: upgrade nunjucks, ts-node, typescript-snapshot-plugin, wait-for-expect * chore: upgrade eslint packages * chore: upgrade fluent, types * chore: upgrade jsdom dep * chore: upgrade mongo * chore: upgrade deps * chore: upgrade typescript, recompose * chore: upgrade prettier * chore: remove obsolete prettier config * chore: upgrade jsdom types * chore: upgrade typescript-eslint * chore: upgrad deps * chore: upgrade deps * chore: upgrade relay related modules * chore: upgrade docz WIP * chore: upgrade docz * chore: add guard * chore: remove obsolete line * chore: comment * chore: refactors * fix: hook count change error
This commit is contained in:
@@ -22,7 +22,7 @@ const createQueueOptions = (config: Config): Queue.QueueOptions => {
|
||||
// Here, we are reusing the clients based on the requested types. This way,
|
||||
// any time we need a specific client, we get to use one of the ones that
|
||||
// already have been created.
|
||||
createClient: type => {
|
||||
createClient: (type) => {
|
||||
switch (type) {
|
||||
case "subscriber":
|
||||
return subscriber;
|
||||
|
||||
@@ -32,7 +32,9 @@ function render(env: Environment, { name, context }: EmailTemplate) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
|
||||
if (html === null) {
|
||||
throw new Error("unexpected null result");
|
||||
}
|
||||
return resolve(html);
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { FluentBundle } from "@fluent/bundle/compat";
|
||||
import { DOMLocalization } from "@fluent/dom/compat";
|
||||
import Joi from "@hapi/joi";
|
||||
import { Job } from "bull";
|
||||
import createDOMPurify from "dompurify";
|
||||
import { minify } from "html-minifier";
|
||||
import htmlToText from "html-to-text";
|
||||
import Joi from "joi";
|
||||
import { JSDOM } from "jsdom";
|
||||
import { juiceResources } from "juice";
|
||||
import { camelCase, isNil } from "lodash";
|
||||
@@ -131,7 +131,7 @@ function createMessageTranslator(i18n: I18n) {
|
||||
}
|
||||
|
||||
// Configure the purification.
|
||||
const purify = createDOMPurify(dom.window);
|
||||
const purify = createDOMPurify(dom.window as any);
|
||||
|
||||
// Strip the l10n attributes from the email HTML.
|
||||
purify.sanitize(dom.window.document.documentElement, {
|
||||
@@ -183,15 +183,11 @@ export const createJobProcessor = (options: MailProcessorOptions) => {
|
||||
const translateMessage = createMessageTranslator(i18n);
|
||||
|
||||
return async (job: Job<MailerData>) => {
|
||||
const { value: data, error: err } = Joi.validate(
|
||||
job.data,
|
||||
MailerDataSchema,
|
||||
{
|
||||
stripUnknown: true,
|
||||
presence: "required",
|
||||
abortEarly: false,
|
||||
}
|
||||
);
|
||||
const { value: data, error: err } = MailerDataSchema.validate(job.data, {
|
||||
stripUnknown: true,
|
||||
presence: "required",
|
||||
abortEarly: false,
|
||||
});
|
||||
if (err) {
|
||||
logger.error(
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ export const filterSuperseded = (
|
||||
// and declares that it supersedes this one, return true so we can filter
|
||||
// this one from the list.
|
||||
supersedesCategories.some(
|
||||
supersededCategory => supersededCategory === name
|
||||
(supersededCategory) => supersededCategory === name
|
||||
)
|
||||
);
|
||||
|
||||
@@ -56,7 +56,7 @@ export const handleHandlers = async (
|
||||
payload: CoralEventPayload
|
||||
): Promise<CategoryNotification[]> => {
|
||||
const notifications: Array<CategoryNotification | null> = await Promise.all(
|
||||
categories.map(async category => {
|
||||
categories.map(async (category) => {
|
||||
const notification = await category.process(ctx, payload);
|
||||
if (!notification) {
|
||||
return null;
|
||||
@@ -68,7 +68,7 @@ export const handleHandlers = async (
|
||||
|
||||
// Filter out the categories that don't have notifications.
|
||||
return notifications.filter(
|
||||
notification => notification !== null
|
||||
(notification) => notification !== null
|
||||
) as CategoryNotification[];
|
||||
};
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ export function generateSignatures(
|
||||
return endpoint.signingSecrets
|
||||
.filter(filterActiveSecrets(now))
|
||||
.map(({ secret }) => generateSignature(secret, body))
|
||||
.map(signature => `sha256=${signature}`)
|
||||
.map((signature) => `sha256=${signature}`)
|
||||
.join(",");
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ export function createJobProcessor({
|
||||
// Create the fetcher that will orchestrate sending the actual webhooks.
|
||||
const fetch = createFetch({ name: "Webhook" });
|
||||
|
||||
return async job => {
|
||||
return async (job) => {
|
||||
const { tenantID, endpointID, contextID, event } = job.data;
|
||||
|
||||
const log = logger.child(
|
||||
@@ -257,7 +257,7 @@ export function createJobProcessor({
|
||||
mongo,
|
||||
tenantID,
|
||||
endpoint.id,
|
||||
expiredSigningSecrets.map(s => s.kid)
|
||||
expiredSigningSecrets.map((s) => s.kid)
|
||||
)
|
||||
.then(() => {
|
||||
log.info(
|
||||
@@ -265,7 +265,7 @@ export function createJobProcessor({
|
||||
"removed expired secrets from endpoint"
|
||||
);
|
||||
})
|
||||
.catch(err => {
|
||||
.catch((err) => {
|
||||
log.error(
|
||||
{ err },
|
||||
"an error occurred when trying to remove expired secrets"
|
||||
|
||||
Reference in New Issue
Block a user