Qualify CJS-only module imports

This commit is contained in:
Fedor Indutny
2025-09-19 13:05:51 -07:00
committed by GitHub
parent 140241b83f
commit 40eaf078cc
401 changed files with 1278 additions and 593 deletions

View File

@@ -1,7 +1,7 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { omit } from 'lodash';
import lodash from 'lodash';
import type { LoggerType } from '../../types/Logging.js';
import type { AciString, ServiceIdString } from '../../types/ServiceId.js';
@@ -16,6 +16,8 @@ import {
} from '../util.js';
import type { WritableDB } from '../Interface.js';
const { omit } = lodash;
type MessageType = Readonly<{
id: string;
sourceUuid: string;

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { Database } from '@signalapp/sqlcipher';
import { omit } from 'lodash';
import lodash from 'lodash';
import type { LoggerType } from '../../types/Logging.js';
import type {
@@ -15,6 +15,8 @@ import { normalizeAci } from '../../util/normalizeAci.js';
import type { JSONWithUnknownFields } from '../../types/Util.js';
import { isNotNil } from '../../util/isNotNil.js';
const { omit } = lodash;
//
// Main migration function that does the following:
//

View File

@@ -4,7 +4,7 @@
import { callIdFromEra } from '@signalapp/ringrtc';
import Long from 'long';
import { v4 as generateUuid } from 'uuid';
import { isObject } from 'lodash';
import lodash from 'lodash';
import type { SetOptional } from 'type-fest';
import type { LoggerType } from '../../types/Logging.js';
@@ -29,6 +29,8 @@ import { missingCaseError } from '../../util/missingCaseError.js';
import { isAciString } from '../../util/isAciString.js';
import { safeParseStrict } from '../../util/schemas.js';
const { isObject } = lodash;
// Legacy type for calls that never had a call id
type DirectCallHistoryDetailsType = {
callId?: string;

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { Database } from '@signalapp/sqlcipher';
import { keyBy } from 'lodash';
import lodash from 'lodash';
import { v4 as generateUuid } from 'uuid';
import type { LoggerType } from '../../types/Logging.js';
@@ -125,6 +125,8 @@ import updateToSchemaVersion1460 from './1460-attachment-duration.js';
import { DataWriter } from '../Server.js';
const { keyBy } = lodash;
function updateToSchemaVersion1(db: Database): void {
db.exec(`
CREATE TABLE messages(