trilium/scripts
Elian Doran bee0552938
refactor(ckeditor): drop ckeditor5-premium-features entirely
Every premium plugin Trilium loaded now has an in-tree GPL replacement —
`SlashCommand` -> `TriliumSlashCommands` (#10711), `Template` ->
`TriliumSnippets` (#10727), `FormatPainter` -> `TriliumFormatPainter` — which
left `loadPremiumPlugins()` returning an empty array while the commercial
licence, its key plumbing and the dependency were all still carried around.

- `loadPremiumPlugins()` and its export are gone. `config.ts` always passes
  `licenseKey: "GPL"`, so `getLicenseKey()`, `VITE_CKEDITOR_KEY` (both `.env`
  files, `vite-env.d.ts`) and the `forceGplLicense` build option go with it,
  along with the read-only-editor rebuild in `buildEditor()` — that fallback
  existed only to recover from a licence CKEditor had rejected.
- `getCkLocale()` no longer loads the premium translation bundle. The GPL
  plugins reuse premium's English source strings, so a handful of labels
  ("Insert template", "Copy formatting", the slash palette) now fall back to
  English in non-English UI locales; everything from CKEditor's own core
  translations is unaffected.
- Also removed: the dependency + lockfile entry, the `optimizeDeps` pre-bundle
  entry, the renovate group member, and the premium category in
  `analyze-perf.ts`.

Tests: `plugins.spec.ts` pins the three GPL replacements instead of asserting
the premium list; the licensing block in `config.spec.ts` collapses to one
test; `i18n.spec.ts` becomes table-driven (19 near-identical cases -> 2) and
expects a single translation bundle. Typecheck clean, 834 package tests and 169
client tests pass, and the client builds with the package pruned.

The "Premium features" user-guide note is now obsolete but is left alone — it
needs the docs editor, not a hand edit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 20:45:47 +03:00
..
icon-packs feat(icon-pack-builder): integrate boxicons 3 with brands 2025-12-28 22:53:03 +02:00
icons feat(mobile/ios): add trilium icon 2026-04-22 14:43:10 +03:00
repo-migration chore(scripts): add proper typechecking 2025-12-08 14:13:18 +02:00
translation chore(scripts): improve messages for translation check script 2026-02-06 19:38:24 +02:00
analyze-perf.ts refactor(ckeditor): drop ckeditor5-premium-features entirely 2026-07-28 20:45:47 +03:00
build-portable-better-sqlite3.sh build(ci): rebuild better-sqlite3 against an older glibc for Linux releases 2026-07-25 17:59:19 +03:00
build-utils.ts Merge remote-tracking branch 'origin/main' into renovate/pdfjs-dist-6.x 2026-07-25 23:04:17 +03:00
check-version-consistency.ts fix(ci): sanity check does not account for version prefix 2026-03-01 17:43:41 +02:00
electron-run-prod.mts fix(desktop): make start-prod launch Electron correctly on NixOS 2026-07-18 13:29:30 +03:00
electron-start.mts build: adapt the native build pipeline to better-sqlite3 v13 2026-07-25 17:09:31 +03:00
filter-tsc-output.mts chore(scripts): integrate filter-tsc-output from standalone branch 2026-04-01 16:39:54 +03:00
generate-openapi.ts feat(views/geomap): remove old geo map type 2025-07-06 20:23:50 +03:00
tsconfig.json chore(scripts): fix typecheck issue 2026-01-04 23:38:51 +02:00
update-build-info.ts fix(scripts): update build info no longer updating 2026-04-07 16:00:44 +03:00
update-contributors.ts contributor list: update script name, change a comment 2026-04-19 18:33:35 +03:00
update-nightly-version.ts refactor(standalone): rename project from client-standalone 2026-05-16 08:57:55 +03:00
update-version.ts refactor(standalone): rename project from client-standalone 2026-05-16 08:57:55 +03:00
utils.mts fix(desktop): make start-prod launch Electron correctly on NixOS 2026-07-18 13:29:30 +03:00
wipe-node-modules.mts chore(scripts): add a way to wipe node modules 2026-03-26 11:27:46 +02:00