Prepare for adding file suffixes

This commit is contained in:
Fedor Indutny
2025-10-16 11:29:11 -07:00
parent 3330dd72ce
commit 3387cf6a77
2095 changed files with 15148 additions and 14629 deletions

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { BuildResult } from 'electron-builder';
import { afterAllArtifactBuild as notarizeUniversalDMG } from './notarize-universal-dmg.js';
import { afterAllArtifactBuild as notarizeUniversalDMG } from './notarize-universal-dmg.node.js';
export async function afterAllArtifactBuild(
result: BuildResult

View File

@@ -2,10 +2,10 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { AfterPackContext } from 'electron-builder';
import { afterPack as fuseElectron } from './fuse-electron.js';
import { afterPack as copyPacks } from './copy-language-packs.js';
import { afterPack as pruneMacOSRelease } from './prune-macos-release.js';
import { afterPack as ensureLinuxFilePermissions } from './ensure-linux-file-permissions.js';
import { afterPack as fuseElectron } from './fuse-electron.node.js';
import { afterPack as copyPacks } from './copy-language-packs.node.js';
import { afterPack as pruneMacOSRelease } from './prune-macos-release.node.js';
import { afterPack as ensureLinuxFilePermissions } from './ensure-linux-file-permissions.node.js';
export async function afterPack(context: AfterPackContext): Promise<void> {
await pruneMacOSRelease(context);

View File

@@ -2,7 +2,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
import type { AfterPackContext } from 'electron-builder';
import { afterSign as notarize } from './notarize.js';
import { afterSign as notarize } from './notarize.node.js';
// NOTE: It is AfterPackContext here even though it is afterSign.
// See: https://www.electron.build/configuration/configuration.html#aftersign

View File

@@ -4,8 +4,8 @@
import { parse } from 'csv-parse';
import fs from 'node:fs/promises';
import { z } from 'zod';
import { _getAvailableLocales } from '../../app/locale.js';
import { parseUnknown } from '../util/schemas.js';
import { _getAvailableLocales } from '../../app/locale.main.js';
import { parseUnknown } from '../util/schemas.std.js';
const type = process.argv[2];
if (type !== 'countries' && type !== 'locales') {

View File

@@ -11,8 +11,8 @@ import { gte } from 'semver';
// Note: because we don't run under electron - this is a path to binary
import ELECTRON_BINARY from 'electron';
import { drop } from '../util/drop.js';
import packageJson from '../util/packageJson.js';
import { drop } from '../util/drop.std.js';
import packageJson from '../util/packageJson.node.js';
const execFile = promisify(execFileCb);

View File

@@ -5,7 +5,7 @@ import { readFile, writeFile, readdir, readlink } from 'node:fs/promises';
import { join, basename } from 'node:path';
import pMap from 'p-map';
import { drop } from '../util/drop.js';
import { drop } from '../util/drop.std.js';
async function main(): Promise<void> {
const source = process.argv[2];

View File

@@ -4,7 +4,7 @@
import { stat } from 'node:fs/promises';
import { join } from 'node:path';
import { name as NAME, version as VERSION } from '../util/packageJson.js';
import { name as NAME, version as VERSION } from '../util/packageJson.node.js';
const SUPPORT_CONFIG = new Set([
'linux',

View File

@@ -11,7 +11,7 @@ import fs from 'node:fs';
//
// Make sure to sync up the values in `util/nsis` with upstream
// `app-builder-lib`.
import { REQUIRED_LANGUAGES, LCID } from '../util/nsis.js';
import { REQUIRED_LANGUAGES, LCID } from '../util/nsis.std.js';
const STRING_VARS = new Map([
[

View File

@@ -4,7 +4,7 @@
import { readdir, mkdir, readFile, writeFile } from 'node:fs/promises';
import { join, dirname } from 'node:path';
import pMap from 'p-map';
import { isLocaleMessageType } from '../util/setupI18nMain.js';
import { isLocaleMessageType } from '../util/setupI18nMain.std.js';
async function compact({
sourceDir,

View File

@@ -6,7 +6,7 @@ import { writeFile } from 'node:fs/promises';
import { join } from 'node:path';
import { promisify } from 'node:util';
import { isNotNil } from '../util/isNotNil.js';
import { isNotNil } from '../util/isNotNil.std.js';
const resolve4 = promisify(resolve4Cb);
const resolve6 = promisify(resolve6Cb);

View File

@@ -7,12 +7,12 @@ import path from 'node:path';
import ts from 'typescript';
import prettier from 'prettier';
import { getICUMessageParams } from '../util/getICUMessageParams.js';
import type { ICUMessageParamType } from '../util/getICUMessageParams.js';
import { missingCaseError } from '../util/missingCaseError.js';
import { getICUMessageParams } from '../util/getICUMessageParams.std.js';
import type { ICUMessageParamType } from '../util/getICUMessageParams.std.js';
import { missingCaseError } from '../util/missingCaseError.std.js';
import globalMessages from '../../_locales/en/messages.json';
import { DELETED_REGEXP } from './constants.js';
import { DELETED_REGEXP } from './constants.std.js';
function translateParamType(
param: ICUMessageParamType,

View File

@@ -8,8 +8,8 @@ import { mkdir, mkdtemp, rm, rename } from 'node:fs/promises';
import pTimeout from 'p-timeout';
import ELECTRON_BIN from 'electron';
import { MINUTE } from '../util/durations/index.js';
import { explodePromise } from '../util/explodePromise.js';
import { MINUTE } from '../util/durations/index.std.js';
import { explodePromise } from '../util/explodePromise.std.js';
const ROOT_DIR = join(__dirname, '..', '..');

View File

@@ -4,7 +4,7 @@
import { createCanvas, GlobalFonts, loadImage } from '@napi-rs/canvas';
import { join } from 'node:path';
import { mkdir, rm, writeFile } from 'node:fs/promises';
import { strictAssert } from '../util/assert.js';
import { strictAssert } from '../util/assert.std.js';
const cwd = __dirname;
const fontsDir = join(cwd, '..', '..', 'fonts');

View File

@@ -7,9 +7,9 @@ import { join } from 'node:path';
import z from 'zod';
import prettier from 'prettier';
import type { OptionalResourceType } from '../types/OptionalResource.js';
import { OptionalResourcesDictSchema } from '../types/OptionalResource.js';
import { parseUnknown } from '../util/schemas.js';
import type { OptionalResourceType } from '../types/OptionalResource.std.js';
import { OptionalResourcesDictSchema } from '../types/OptionalResource.std.js';
import { parseUnknown } from '../util/schemas.std.js';
const MANIFEST_URL =
'https://updates.signal.org/dynamic/android/emoji/search/manifest.json';

View File

@@ -5,9 +5,9 @@ import { join } from 'node:path';
import { execSync } from 'node:child_process';
import { writeFileSync } from 'node:fs';
import { DAY } from '../util/durations/index.js';
import { version } from '../util/packageJson.js';
import { isNotUpdatable } from '../util/version.js';
import { DAY } from '../util/durations/index.std.js';
import { version } from '../util/packageJson.node.js';
import { isNotUpdatable } from '../util/version.std.js';
const unixTimestamp = parseInt(
process.env.SOURCE_DATE_EPOCH ||

View File

@@ -8,10 +8,10 @@ import { Buffer } from 'node:buffer';
import z from 'zod';
import prettier from 'prettier';
import type { OptionalResourceType } from '../types/OptionalResource.js';
import { OptionalResourcesDictSchema } from '../types/OptionalResource.js';
import { parseUnknown } from '../util/schemas.js';
import { utf16ToEmoji } from '../util/utf16ToEmoji.js';
import type { OptionalResourceType } from '../types/OptionalResource.std.js';
import { OptionalResourcesDictSchema } from '../types/OptionalResource.std.js';
import { parseUnknown } from '../util/schemas.std.js';
import { utf16ToEmoji } from '../util/utf16ToEmoji.node.js';
const VERSION = 12;

View File

@@ -8,7 +8,7 @@ import prettier from 'prettier';
import pMap from 'p-map';
import z from 'zod';
import { authenticate, API_BASE, PROJECT_ID } from '../util/smartling.js';
import { authenticate, API_BASE, PROJECT_ID } from '../util/smartling.node.js';
const { SMARTLING_USER, SMARTLING_SECRET } = process.env;

View File

@@ -3,7 +3,7 @@
import { spawnSync } from 'node:child_process';
import path from 'node:path';
import { readFileSync, writeFileSync } from 'node:fs';
import { DELETED_REGEXP } from './constants.js';
import { DELETED_REGEXP } from './constants.std.js';
const rootDir = path.resolve(__dirname, '..', '..');
const messagesPath = path.join(rootDir, '_locales/en/messages.json');

View File

@@ -5,7 +5,7 @@ import type { BuildResult } from 'electron-builder';
import { notarize } from '@electron/notarize';
import { build } from '../util/packageJson.js';
import { build } from '../util/packageJson.node.js';
export async function afterAllArtifactBuild({
platformToTargets,

View File

@@ -6,7 +6,7 @@ import type { AfterPackContext } from 'electron-builder';
import { notarize } from '@electron/notarize';
import { build } from '../util/packageJson.js';
import { build } from '../util/packageJson.node.js';
export async function afterSign({
appOutDir,

View File

@@ -4,7 +4,7 @@
import { randomBytes } from 'node:crypto';
import { readFile } from 'node:fs/promises';
import { API_BASE, PROJECT_ID, authenticate } from '../util/smartling.js';
import { API_BASE, PROJECT_ID, authenticate } from '../util/smartling.node.js';
const { SMARTLING_USER, SMARTLING_SECRET } = process.env;

View File

@@ -7,9 +7,9 @@ import fs from 'node:fs/promises';
import pLimit from 'p-limit';
import path from 'node:path';
import { MONTH } from '../util/durations/index.js';
import { isOlderThan } from '../util/timestamp.js';
import { DELETED_REGEXP } from './constants.js';
import { MONTH } from '../util/durations/index.std.js';
import { isOlderThan } from '../util/timestamp.std.js';
import { DELETED_REGEXP } from './constants.std.js';
const ROOT_DIR = path.join(__dirname, '..', '..');
const MESSAGES_FILE = path.join(ROOT_DIR, '_locales', 'en', 'messages.json');

View File

@@ -11,10 +11,10 @@ import z from 'zod';
import split2 from 'split2';
import logSymbols from 'log-symbols';
import { explodePromise } from '../util/explodePromise.js';
import { missingCaseError } from '../util/missingCaseError.js';
import { SECOND } from '../util/durations/index.js';
import { parseUnknown } from '../util/schemas.js';
import { explodePromise } from '../util/explodePromise.std.js';
import { missingCaseError } from '../util/missingCaseError.std.js';
import { SECOND } from '../util/durations/index.std.js';
import { parseUnknown } from '../util/schemas.std.js';
const ROOT_DIR = join(__dirname, '..', '..');

View File

@@ -6,7 +6,7 @@ import assert from 'node:assert';
import { join } from 'node:path';
import { _electron as electron } from 'playwright';
import { productName, name } from '../util/packageJson.js';
import { productName, name } from '../util/packageJson.node.js';
const ENVIRONMENT = 'production';
const RELEASE_DIR = join(__dirname, '..', '..', 'release');

View File

@@ -6,8 +6,8 @@ import { readFile, readdir, writeFile } from 'node:fs/promises';
import z from 'zod';
import semver from 'semver';
import { drop } from '../util/drop.js';
import { strictAssert } from '../util/assert.js';
import { drop } from '../util/drop.std.js';
import { strictAssert } from '../util/assert.std.js';
const { GITHUB_TOKEN } = process.env;