Replace typescript compiler with native tsgo compiler

This commit is contained in:
Jamie
2026-03-17 14:38:10 -07:00
committed by GitHub
parent 3851a3905a
commit 023ae37492
207 changed files with 1819 additions and 1270 deletions

View File

@@ -19,7 +19,7 @@ Bootstrap.benchmark(async (bootstrap: Bootstrap): Promise<void> => {
const [first, second] = contacts as [PrimaryDevice, PrimaryDevice];
const messages = new Array<Buffer>();
const messages = new Array<Buffer<ArrayBuffer>>();
debug('encrypting');
// Send messages from just two contacts
for (const contact of [second, first]) {

View File

@@ -49,7 +49,7 @@ Bootstrap.benchmark(async (bootstrap: Bootstrap): Promise<void> => {
const { server, desktop } = bootstrap;
const [first] = members as [PrimaryDevice];
const messages = new Array<Buffer>();
const messages = new Array<Buffer<ArrayBuffer>>();
debug('encrypting');
// Fill left pane
for (const contact of members.slice(0, CONVERSATION_SIZE).reverse()) {
@@ -190,7 +190,7 @@ Bootstrap.benchmark(async (bootstrap: Bootstrap): Promise<void> => {
runId,
delay,
}: {
receipts: Array<Buffer>;
receipts: Array<Buffer<ArrayBuffer>>;
batchSize: number;
nextBatchSize: number;
runId: number;
@@ -216,7 +216,7 @@ Bootstrap.benchmark(async (bootstrap: Bootstrap): Promise<void> => {
}
}
let receiptsFromPreviousMessage: Array<Buffer> = [];
let receiptsFromPreviousMessage: Array<Buffer<ArrayBuffer>> = [];
for (let runId = 0; runId < RUN_COUNT + DISCARD_COUNT; runId += 1) {
debug(`sending previous ${receiptsFromPreviousMessage.length} receipts`);

View File

@@ -22,7 +22,7 @@ Bootstrap.benchmark(async (bootstrap: Bootstrap): Promise<void> => {
const [first] = contacts as [PrimaryDevice];
const messages = new Array<Buffer>();
const messages = new Array<Buffer<ArrayBuffer>>();
debug('encrypting');
// Note: make it so that we receive the latest message from the first
// contact.

View File

@@ -21,7 +21,7 @@ Bootstrap.regressionBenchmark(
const { server, contacts, phone, desktop } = bootstrap;
// Generate messages
const messagePromises = new Array<Promise<Buffer>>();
const messagePromises = new Array<Promise<Buffer<ArrayBuffer>>>();
debug('started generating messages');
for (let i = 0; i < messageCount; i += 1) {

View File

@@ -617,7 +617,7 @@ export class Bootstrap {
) => Promise<void>,
test?: Mocha.Runnable
): Promise<(app: App) => Promise<void>> {
const snapshots = new Array<{ name: string; data: Buffer }>();
const snapshots = new Array<{ name: string; data: Buffer<ArrayBuffer> }>();
const viewportSize = { width: 1000, height: 2000 } as const;
const window = await app.getWindow();
await window.setViewportSize(viewportSize);
@@ -692,7 +692,7 @@ export class Bootstrap {
}
public async encryptAndStoreAttachmentOnCDN(
data: Buffer,
data: Buffer<ArrayBuffer>,
contentType: MIMEType
): Promise<Proto.AttachmentPointer.Params> {
const cdnKey = uuid();

View File

@@ -19,7 +19,7 @@ import { toNumber } from '../util/toNumber.std.js';
const debug = createDebug('mock:test:helpers');
export function bufferToUuid(buffer: Buffer): string {
export function bufferToUuid(buffer: Buffer<ArrayBuffer>): string {
const hex = buffer.toString('hex');
return [

View File

@@ -34,8 +34,8 @@ describe('pnp/merge', function (this: Mocha.Suite) {
let bootstrap: Bootstrap;
let app: App;
let pniContact: PrimaryDevice;
let pniIdentityKey: Uint8Array;
let aciIdentityKey: Uint8Array;
let pniIdentityKey: Uint8Array<ArrayBuffer>;
let aciIdentityKey: Uint8Array<ArrayBuffer>;
beforeEach(async () => {
bootstrap = new Bootstrap({ contactCount: 0 });

View File

@@ -28,7 +28,7 @@ describe('pnp/phone discovery', function (this: Mocha.Suite) {
let bootstrap: Bootstrap;
let app: App;
let pniContact: PrimaryDevice;
let pniIdentityKey: Uint8Array;
let pniIdentityKey: Uint8Array<ArrayBuffer>;
beforeEach(async () => {
bootstrap = new Bootstrap({ contactCount: 0 });

View File

@@ -162,8 +162,8 @@ export const FIXTURES = path.join(__dirname, '..', '..', '..', 'fixtures');
export const EMPTY = new Uint8Array(0);
export type StickerPackType = Readonly<{
id: Buffer;
key: Buffer;
id: Buffer<ArrayBuffer>;
key: Buffer<ArrayBuffer>;
stickerCount: number;
}>;

View File

@@ -104,7 +104,7 @@ describe('storage service/notification profiles', function (this: Mocha.Suite) {
after: secondState,
});
let profileId: Uint8Array | undefined;
let profileId: Uint8Array<ArrayBuffer> | undefined;
const profilewasAdded = thirdState.hasRecord(record => {
if (record.record.notificationProfile == null) {
return false;