mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-19 16:08:34 +01:00
Bundle everything with rolldown
This commit is contained in:
@@ -4,19 +4,19 @@
|
||||
import { assert } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import * as Attachment from '../../util/Attachment.std.js';
|
||||
import * as Attachment from '../../util/Attachment.std.ts';
|
||||
import type {
|
||||
LocalAttachmentV2Type,
|
||||
AttachmentType,
|
||||
} from '../../types/Attachment.std.js';
|
||||
import * as MIME from '../../types/MIME.std.js';
|
||||
import { SignalService } from '../../protobuf/index.std.js';
|
||||
import * as Bytes from '../../Bytes.std.js';
|
||||
import { createLogger } from '../../logging/log.std.js';
|
||||
} from '../../types/Attachment.std.ts';
|
||||
import * as MIME from '../../types/MIME.std.ts';
|
||||
import { SignalService } from '../../protobuf/index.std.ts';
|
||||
import * as Bytes from '../../Bytes.std.ts';
|
||||
import { createLogger } from '../../logging/log.std.ts';
|
||||
|
||||
import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js';
|
||||
import { DAY } from '../../util/durations/index.std.js';
|
||||
import { migrateDataToFileSystem } from '../../util/attachments/migrateDataToFilesystem.std.js';
|
||||
import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts';
|
||||
import { DAY } from '../../util/durations/index.std.ts';
|
||||
import { migrateDataToFileSystem } from '../../util/attachments/migrateDataToFilesystem.std.ts';
|
||||
|
||||
const logger = createLogger('Attachment_test');
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { getDefaultAvatars } from '../../types/Avatar.std.js';
|
||||
import { getDefaultAvatars } from '../../types/Avatar.std.ts';
|
||||
|
||||
describe('Avatar', () => {
|
||||
describe('getDefaultAvatars', () => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { assert } from 'chai';
|
||||
import type {
|
||||
HydratedBodyRangeMention,
|
||||
RangeNode,
|
||||
} from '../../types/BodyRange.std.js';
|
||||
} from '../../types/BodyRange.std.ts';
|
||||
import {
|
||||
BodyRange,
|
||||
DisplayStyle,
|
||||
@@ -15,8 +15,8 @@ import {
|
||||
insertRange,
|
||||
processBodyRangesForSearchResult,
|
||||
trimMessageWhitespace,
|
||||
} from '../../types/BodyRange.std.js';
|
||||
import { generateAci } from '../../types/ServiceId.std.js';
|
||||
} from '../../types/BodyRange.std.ts';
|
||||
import { generateAci } from '../../types/ServiceId.std.ts';
|
||||
|
||||
const SERVICE_ID_1 = generateAci();
|
||||
const SERVICE_ID_2 = generateAci();
|
||||
|
||||
@@ -6,7 +6,7 @@ import type {
|
||||
CardFormFields,
|
||||
CardFormResult,
|
||||
CardFormSettings,
|
||||
} from '../../types/DonationsCardForm.std.js';
|
||||
} from '../../types/DonationsCardForm.std.ts';
|
||||
import {
|
||||
CardCvcError,
|
||||
CardExpirationError,
|
||||
@@ -19,8 +19,8 @@ import {
|
||||
parseCardExpiration,
|
||||
parseCardForm,
|
||||
parseCardNumber,
|
||||
} from '../../types/DonationsCardForm.std.js';
|
||||
import type { CardDetail } from '../../types/Donations.std.js';
|
||||
} from '../../types/DonationsCardForm.std.ts';
|
||||
import type { CardDetail } from '../../types/Donations.std.ts';
|
||||
|
||||
function testCard(cardNumber: string, cvcSize: number) {
|
||||
return { cardNumber, cvcSize };
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
import { assert } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import { createLogger } from '../../logging/log.std.js';
|
||||
import { IMAGE_GIF, IMAGE_PNG } from '../../types/MIME.std.js';
|
||||
import { createLogger } from '../../logging/log.std.ts';
|
||||
import { IMAGE_GIF, IMAGE_PNG } from '../../types/MIME.std.ts';
|
||||
import type { MessageAttributesType } from '../../model-types.d.ts';
|
||||
import type { Avatar, Email, Phone } from '../../types/EmbeddedContact.std.js';
|
||||
import type { Avatar, Email, Phone } from '../../types/EmbeddedContact.std.ts';
|
||||
import {
|
||||
_validate,
|
||||
ContactFormType,
|
||||
@@ -15,9 +15,9 @@ import {
|
||||
getName,
|
||||
parseAndWriteAvatar,
|
||||
parsePhoneItem,
|
||||
} from '../../types/EmbeddedContact.std.js';
|
||||
import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.js';
|
||||
import { generateAci } from '../../types/ServiceId.std.js';
|
||||
} from '../../types/EmbeddedContact.std.ts';
|
||||
import { fakeAttachment } from '../../test-helpers/fakeAttachment.std.ts';
|
||||
import { generateAci } from '../../types/ServiceId.std.ts';
|
||||
|
||||
const logger = createLogger('EmbeddedContact_test');
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
isValidLink,
|
||||
shouldLinkifyMessage,
|
||||
shouldPreviewHref,
|
||||
} from '../../types/LinkPreview.std.js';
|
||||
} from '../../types/LinkPreview.std.ts';
|
||||
|
||||
describe('Link previews', () => {
|
||||
describe('#isValidLink', () => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import * as MIME from '../../types/MIME.std.js';
|
||||
import * as MIME from '../../types/MIME.std.ts';
|
||||
|
||||
describe('MIME', () => {
|
||||
describe('isGif', () => {
|
||||
|
||||
@@ -4,20 +4,20 @@
|
||||
import { assert } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import * as Message from '../../types/Message2.preload.js';
|
||||
import { SignalService } from '../../protobuf/index.std.js';
|
||||
import * as Bytes from '../../Bytes.std.js';
|
||||
import * as MIME from '../../types/MIME.std.js';
|
||||
import * as Message from '../../types/Message2.preload.ts';
|
||||
import { SignalService } from '../../protobuf/index.std.ts';
|
||||
import * as Bytes from '../../Bytes.std.ts';
|
||||
import * as MIME from '../../types/MIME.std.ts';
|
||||
|
||||
import type { EmbeddedContactType } from '../../types/EmbeddedContact.std.js';
|
||||
import type { EmbeddedContactType } from '../../types/EmbeddedContact.std.ts';
|
||||
import type { MessageAttributesType } from '../../model-types.d.ts';
|
||||
import type {
|
||||
AddressableAttachmentType,
|
||||
AttachmentType,
|
||||
LocalAttachmentV2Type,
|
||||
} from '../../types/Attachment.std.js';
|
||||
import type { LoggerType } from '../../types/Logging.std.js';
|
||||
import { testPlaintextHash } from '../../test-helpers/attachments.node.js';
|
||||
} from '../../types/Attachment.std.ts';
|
||||
import type { LoggerType } from '../../types/Logging.std.ts';
|
||||
import { testPlaintextHash } from '../../test-helpers/attachments.node.ts';
|
||||
|
||||
const FAKE_LOCAL_ATTACHMENT: LocalAttachmentV2Type = {
|
||||
version: 2,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { DAY, HOUR, MINUTE } from '../../util/durations/index.std.js';
|
||||
import { DAY, HOUR, MINUTE } from '../../util/durations/index.std.ts';
|
||||
|
||||
import {
|
||||
DayOfWeek,
|
||||
@@ -14,13 +14,13 @@ import {
|
||||
getStartTime,
|
||||
loopThroughWeek,
|
||||
sortProfiles,
|
||||
} from '../../types/NotificationProfile.std.js';
|
||||
import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.js';
|
||||
} from '../../types/NotificationProfile.std.ts';
|
||||
import { generateNotificationProfileId } from '../../types/NotificationProfile-node.node.ts';
|
||||
|
||||
import type {
|
||||
NextProfileEvent,
|
||||
NotificationProfileType,
|
||||
} from '../../types/NotificationProfile.std.js';
|
||||
} from '../../types/NotificationProfile.std.ts';
|
||||
|
||||
describe('NotificationProfile', () => {
|
||||
const startingTime = Date.now();
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { getCountryCode } from '../../types/PhoneNumber.std.js';
|
||||
import { getCountryCode } from '../../types/PhoneNumber.std.ts';
|
||||
|
||||
describe('types/PhoneNumber', () => {
|
||||
describe('#getCountryCode', () => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { isValid } from '../../types/SchemaVersion.std.js';
|
||||
import { isValid } from '../../types/SchemaVersion.std.ts';
|
||||
|
||||
describe('SchemaVersion', () => {
|
||||
describe('isValid', () => {
|
||||
|
||||
@@ -5,9 +5,9 @@ import os from 'node:os';
|
||||
import Sinon from 'sinon';
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { getOSFunctions } from '../../util/os/shared.std.js';
|
||||
import * as Settings from '../../types/Settings.std.js';
|
||||
import { SystemTraySetting } from '../../types/SystemTraySetting.std.js';
|
||||
import { getOSFunctions } from '../../util/os/shared.std.ts';
|
||||
import * as Settings from '../../types/Settings.std.ts';
|
||||
import { SystemTraySetting } from '../../types/SystemTraySetting.std.ts';
|
||||
|
||||
describe('Settings', () => {
|
||||
let sandbox: Sinon.SinonSandbox;
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
import * as Stickers from '../../types/Stickers.preload.js';
|
||||
import { isPackIdValid, redactPackId } from '../../util/Stickers.std.js';
|
||||
import * as Stickers from '../../types/Stickers.preload.ts';
|
||||
import { isPackIdValid, redactPackId } from '../../util/Stickers.std.ts';
|
||||
|
||||
describe('Stickers', () => {
|
||||
describe('getDataFromLink', () => {
|
||||
|
||||
@@ -5,8 +5,8 @@ import { assert } from 'chai';
|
||||
import { v4 as generateUuid } from 'uuid';
|
||||
import * as sinon from 'sinon';
|
||||
|
||||
import type { LoggerType } from '../../types/Logging.std.js';
|
||||
import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.js';
|
||||
import type { LoggerType } from '../../types/Logging.std.ts';
|
||||
import { normalizeStoryDistributionId } from '../../types/StoryDistributionId.std.ts';
|
||||
|
||||
describe('StoryDistributionId', () => {
|
||||
let warn: sinon.SinonStub;
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
SystemTraySetting,
|
||||
parseSystemTraySetting,
|
||||
shouldMinimizeToSystemTray,
|
||||
} from '../../types/SystemTraySetting.std.js';
|
||||
} from '../../types/SystemTraySetting.std.ts';
|
||||
|
||||
describe('system tray setting utilities', () => {
|
||||
describe('shouldMinimizeToSystemTray', () => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import * as Path from 'node:path';
|
||||
import { assert } from 'chai';
|
||||
import * as Errors from '../../types/errors.std.js';
|
||||
import * as Errors from '../../types/errors.std.ts';
|
||||
|
||||
const APP_ROOT_PATH = Path.join(__dirname, '..', '..', '..');
|
||||
|
||||
@@ -14,7 +14,7 @@ describe('Errors', () => {
|
||||
assert.typeOf(error, 'Error');
|
||||
|
||||
const formattedError = Errors.toLogFormat(error);
|
||||
assert.include(formattedError, 'errors_test.node.js');
|
||||
assert.include(formattedError, 'errors_test.node.ts');
|
||||
assert.include(
|
||||
formattedError,
|
||||
APP_ROOT_PATH,
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
import type { LocalizerType } from '../../types/Util.std.js';
|
||||
import { setupI18n } from '../../util/setupI18n.dom.js';
|
||||
import { enMessages } from '../util/i18n.node.js';
|
||||
import type { LocalizerType } from '../../types/Util.std.ts';
|
||||
import { setupI18n } from '../../util/setupI18n.dom.tsx';
|
||||
import { enMessages } from '../util/i18n.node.ts';
|
||||
|
||||
describe('setupI18n', () => {
|
||||
let i18n: LocalizerType;
|
||||
|
||||
Reference in New Issue
Block a user