fix(mobile): the checks the large-screen merge left red

- The trip's segmented control writes its fit through a ref, not into the
  element held in state (react-hooks/immutability).
- The amount field of a payment uses the body type tier, which follows the
  text size setting, instead of a raw size.
- The form sheet tests wait the frame the edge fade now measures on, and read
  the wide variant from the size class the shell writes.
- The native dashes spec lists its locales through node:fs, so shared needs no
  vite types for it (knip).
- Baselines lowered where the fixes removed warnings: no-misused-promises,
  no-non-null-assertion in tests, the MSheet rtl entry.
This commit is contained in:
Maurice
2026-11-07 23:56:33 +01:00
parent 8955790f17
commit a7cc1b9e57
6 changed files with 42 additions and 15 deletions
+16 -2
View File
@@ -1,6 +1,9 @@
/// <reference types="vite/client" />
/// <reference types="node" />
import type { TranslationStrings } from './types';
import { existsSync, readdirSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
import { describe, expect, it } from 'vitest';
/**
@@ -11,7 +14,18 @@ import { describe, expect, it } from 'vitest';
* reads, and the style is held here because a re-translation can bring a dash
* back without any other check noticing.
*/
const nativeModules = import.meta.glob<{ default: TranslationStrings }>('./*/native.ts', { eager: true });
const here = dirname(fileURLToPath(import.meta.url));
const locales = readdirSync(here, { withFileTypes: true })
.filter((entry) => entry.isDirectory() && existsSync(join(here, entry.name, 'native.ts')))
.map((entry) => entry.name);
const nativeModules: Record<string, { default: TranslationStrings }> = Object.fromEntries(
await Promise.all(
locales.map(async (locale) => [
`./${locale}/native.ts`,
(await import(`./${locale}/native.ts`)) as { default: TranslationStrings },
]),
),
);
const DASH = /[‒–—―]| - /;