ci(release): stop on a stale dialect, check it like CI would, give prereleases their own

A stable release without a dialect of its own now ships the one on main only while that one has 90 days left; dialect 0 or less stops the run before anything is committed, unless allow_stale_dialect is ticked. Fetching and checking moved into registration-dialect.yml, which never fails its caller and also type-checks the module under the strict config and lints it with --max-warnings 0, since the bump commit skips CI. The bump and everything after it run whatever became of the dialect job. Prereleases ask the issuer for a dialect of their -pre.N version and build it into the image without committing it. The release check reads the module token by token against an allowlist of keywords, globals and member names, refuses any assignment to a property, computed access and regular expressions, and names Object, JSON and defineProperty among the forbidden. The issuer's kitchen-sink sample is gone; the tests use a hand-written dialect instead.
This commit is contained in:
Maurice
2026-10-29 17:59:52 +01:00
parent cd5ce4b1d9
commit 12e22c258a
12 changed files with 732 additions and 439 deletions
+3 -7
View File
@@ -34,13 +34,9 @@ const root = fileURLToPath(new URL('..', import.meta.url));
// byte to its output by check:entities, so their layout is the generator's, not
// Prettier's. .prettierignore keeps `npm run format` off them for the same reason.
const GENERATED = 'src/db/entities/';
// The registration dialect and the issuer's sample of one are written by the
// TREK services issuer and committed as it wrote them (the release job takes
// the dialect over unchanged), so their layout is the issuer's generator's.
const ISSUER_WRITTEN = [
'src/nest/service-identity/registration-dialect.ts',
'tests/fixtures/service-identity/registration-dialect.sample.ts',
];
// The registration dialect is written by the TREK services issuer and taken
// over unchanged by the release job, so its layout is the issuer's generator's.
const ISSUER_WRITTEN = ['src/nest/service-identity/registration-dialect.ts'];
await runCli('lint:format', (args) =>
check({
prettier,