Files
Trilium/scripts/tsconfig.json
T
Elian DoranandClaude Opus 5.5 7f6dcd9d8f ci(i18n): run the coverage check only on Weblate's pull requests
The check reads translation percentages from the live Weblate API and
compares them with the LOCALES lists; it never looks at the pull
request's own translation files. Its `paths:` filter still matched
`apps/client/src/translations/**`, which almost every feature PR touches
by adding an English key, so an unrelated PR could go red the moment a
translator pushed a language past 50% on Weblate, with nothing in its
diff able to fix it.

The `push: branches: "weblate:*"` trigger never fired: a branch name
cannot contain `:`, and Weblate opens its pull requests from its own
fork (`weblate/weblate-trilium-client`), which a push trigger on this
repository never sees. The job now runs on pull requests opened by the
`weblate` account and skips the rest. Matching the author rather than
the head branch keeps a contributor's same-named branch from opting in.

The job also no longer installs the workspace. Node 24 strips types by
default, so the script runs under plain `node` once it is ESM with
explicit extensions:

- `check-translation-coverage.ts` becomes `.mts` and imports
  `locales.ts`, `i18n.ts` and `utils.mts` by full name; neither locale
  module imports anything.
- `utils.ts` becomes `utils.mts` and reads `import.meta.dirname` in
  place of `__dirname`. `manage-readme.ts` still runs under `tsx` in
  `sync-readme.yml` and loads it through `require(esm)`.
- `scripts/tsconfig.json` sets `rewriteRelativeImportExtensions`, so
  the `.ts` imports typecheck while `tsc --build` still emits.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-03 12:55:02 +03:00

27 lines
529 B
JSON

{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "bundler",
"target": "es2023",
"rewriteRelativeImportExtensions": true,
"outDir": "dist",
"rootDir": "..",
"types": [
"node",
"express"
],
"tsBuildInfoFile": "dist/tsconfig.app.tsbuildinfo"
},
"include": [
"**/*.ts",
"**/*.mts",
"../packages/commons/src/lib/i18n.ts",
"../apps/website/src/locales.ts"
],
"exclude": [
"dist"
],
"references": []
}