chore(deps): Use the p-queue-compat library instead of p-queue

This commit is contained in:
Vijay Budhram 2024-05-24 10:09:05 -04:00
Родитель 41db11ef6f
Коммит 4d56892891
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 9778545895B2532B
9 изменённых файлов: 32 добавлений и 27 удалений

Просмотреть файл

@ -102,7 +102,6 @@
"node-fetch": "^2.6.7",
"nps": "^5.10.0",
"objection": "^3.1.3",
"p-queue": "^8.0.1",
"passport": "^0.7.0",
"passport-http-bearer": "^1.0.1",
"passport-jwt": "^4.0.1",

Просмотреть файл

@ -11,6 +11,7 @@ import {
} from '@fxa/shared/cloud-tasks';
import { StatsD } from 'hot-shots';
import { setupAccountDatabase } from '@fxa/shared/db/mysql/account';
import PQueue from 'p-queue-compat';
const MILLISECONDS_IN_A_DAY = 24 * 60 * 60 * 1000;
@ -34,7 +35,6 @@ export async function processAccountDeletionInRange(
taskLimit: number,
log?: AuthLogger
) {
const PQueue = (await import('p-queue')) as any;
const kyselyDb = await setupAccountDatabase(config.database.mysql.auth);
// To keep this query performant, we have an index on emailVerified and createdAt column
@ -87,7 +87,7 @@ export async function processAccountDeletionInRange(
});
if (log) {
log.info('Created cloud task', {
log.info('createdCloudTask', {
cloudTaskId: result,
reason,
uid: row.uid.toString('hex'),
@ -99,7 +99,7 @@ export async function processAccountDeletionInRange(
}
} catch (err) {
if (log) {
log.error('Errored creating task', {
log.error('erroredCreatingTask', {
err,
});
} else {
@ -114,7 +114,7 @@ export async function processAccountDeletionInRange(
}
export class CloudSchedulerHandler {
private accountTasks: AccountTasks;
private readonly accountTasks: AccountTasks;
constructor(
private log: AuthLogger,
@ -155,7 +155,7 @@ export class CloudSchedulerHandler {
const startDate = this.calculateDate(sinceDays + durationDays);
const reason = ReasonForDeletion.Unverified;
this.log.info('Deleting unverified accounts', {
this.log.info('deletingUnverifiedAccounts', {
initiatedAt: new Date().toISOString(),
endDate: endDate.toISOString(),
startDate: startDate.toISOString(),

Просмотреть файл

@ -118,7 +118,7 @@
"node-zendesk": "^2.2.0",
"nodemailer": "^6.9.9",
"otplib": "^11.0.1",
"p-queue": "^8.0.1",
"p-queue-compat": "^1.0.225",
"p-retry": "^4.2.0",
"poolee": "^1.0.1",
"punycode.js": "2.3.0",

Просмотреть файл

@ -6,7 +6,7 @@ import Stripe from 'stripe';
import { Firestore } from '@google-cloud/firestore';
import Container from 'typedi';
import fs from 'fs';
import PQueue from 'p-queue';
import PQueue from 'p-queue-compat';
import { AppConfig, AuthFirestore } from '../../lib/types';
import { ConfigType } from '../../config';

Просмотреть файл

@ -7,7 +7,7 @@ import { Firestore } from '@google-cloud/firestore';
import Container from 'typedi';
import fs from 'fs';
import GeoDB from 'fxa-geodb';
import PQueue from 'p-queue';
import PQueue from 'p-queue-compat';
import { AppConfig, AuthFirestore } from '../../lib/types';
import { ConfigType } from '../../config';

Просмотреть файл

@ -6,7 +6,7 @@ import Stripe from 'stripe';
import { Firestore } from '@google-cloud/firestore';
import Container from 'typedi';
import fs from 'fs';
import PQueue from 'p-queue';
import PQueue from 'p-queue-compat';
import { AppConfig, AuthFirestore } from '../../lib/types';
import { ConfigType } from '../../config';

Просмотреть файл

@ -5,7 +5,7 @@
import { Firestore } from '@google-cloud/firestore';
import { PurchaseManager } from 'fxa-shared/payments/iap/apple-app-store/purchase-manager';
import { AppStoreSubscriptionPurchase } from 'fxa-shared/payments/iap/apple-app-store/subscription-purchase';
import PQueue from 'p-queue';
import PQueue from 'p-queue-compat';
import Container from 'typedi';
import { ConfigType } from '../../config';

Просмотреть файл

@ -6,7 +6,7 @@ import Stripe from 'stripe';
import { Firestore } from '@google-cloud/firestore';
import Container from 'typedi';
import fs from 'fs';
import PQueue from 'p-queue';
import PQueue from 'p-queue-compat';
import { AppConfig, AuthFirestore } from '../../lib/types';
import { ConfigType } from '../../config';

Просмотреть файл

@ -35542,6 +35542,13 @@ __metadata:
languageName: node
linkType: hard
"eventemitter3@npm:5.x, eventemitter3@npm:^5.0.1":
version: 5.0.1
resolution: "eventemitter3@npm:5.0.1"
checksum: 543d6c858ab699303c3c32e0f0f47fc64d360bf73c3daf0ac0b5079710e340d6fe9f15487f94e66c629f5f82cd1a8678d692f3dbb6f6fcd1190e1b97fcad36f8
languageName: node
linkType: hard
"eventemitter3@npm:^3.1.0":
version: 3.1.2
resolution: "eventemitter3@npm:3.1.2"
@ -35556,13 +35563,6 @@ __metadata:
languageName: node
linkType: hard
"eventemitter3@npm:^5.0.1":
version: 5.0.1
resolution: "eventemitter3@npm:5.0.1"
checksum: 543d6c858ab699303c3c32e0f0f47fc64d360bf73c3daf0ac0b5079710e340d6fe9f15487f94e66c629f5f82cd1a8678d692f3dbb6f6fcd1190e1b97fcad36f8
languageName: node
linkType: hard
"events-to-array@npm:^1.0.1":
version: 1.1.2
resolution: "events-to-array@npm:1.1.2"
@ -37912,7 +37912,7 @@ fsevents@~2.1.1:
nx: 18.3.1
nyc: ^15.1.0
otplib: ^11.0.1
p-queue: ^8.0.1
p-queue-compat: ^1.0.225
p-retry: ^4.2.0
pm2: ^5.3.0
poolee: ^1.0.1
@ -38895,7 +38895,6 @@ fsevents@~2.1.1:
nx: 18.3.1
nx-cloud: 18.0.0
objection: ^3.1.3
p-queue: ^8.0.1
passport: ^0.7.0
passport-http-bearer: ^1.0.1
passport-jwt: ^4.0.1
@ -52376,13 +52375,13 @@ fsevents@~2.1.1:
languageName: node
linkType: hard
"p-queue@npm:^8.0.1":
version: 8.0.1
resolution: "p-queue@npm:8.0.1"
"p-queue-compat@npm:^1.0.225":
version: 1.0.225
resolution: "p-queue-compat@npm:1.0.225"
dependencies:
eventemitter3: ^5.0.1
p-timeout: ^6.1.2
checksum: 84a27a5b1faf2dcc96b8c0e423c34b5984b241acc07353d3cc6d8d3d1dadefb250b4ec84ce278cb1c946466999c6bf2a36ff718a75810bad8e11c7ca47ce80f5
eventemitter3: 5.x
p-timeout-compat: ^1.0.3
checksum: dc35ea412ff7ba8a7ecd2057d8fd94d5efe0e75769bbc18894614b42c23cdc65d2a1e6bb92476a695b3acdaaf47dc8b7c97587cc55326a1fd06622fc11235c5e
languageName: node
linkType: hard
@ -52406,6 +52405,13 @@ fsevents@~2.1.1:
languageName: node
linkType: hard
"p-timeout-compat@npm:^1.0.3":
version: 1.0.4
resolution: "p-timeout-compat@npm:1.0.4"
checksum: c55421977a2b73a7419ebb437dc16690bbf0eb99ce688d7f23749093c0c5b4ce08a5236b3d83483dacce594fb98c111d36bc3916e2463ef78e7a339bf0e95d5a
languageName: node
linkType: hard
"p-timeout@npm:^6.1.2":
version: 6.1.2
resolution: "p-timeout@npm:6.1.2"