From c40b706c34a15dc300c6d90d321c3c1e8f1a4855 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 21 Oct 2026 08:56:04 +0100 Subject: [PATCH 1/2] fix: highlight TypeScript enum declaration names --- .changeset/clear-masks-improve.md | 5 +++++ packages/kirari/src/tokenize.ts | 2 +- packages/kirari/test/corpus/fixtures.ts | 11 +++++++++++ sites/docs/changelog/kirari/1.1.1.md | 9 +++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .changeset/clear-masks-improve.md create mode 100644 sites/docs/changelog/kirari/1.1.1.md diff --git a/.changeset/clear-masks-improve.md b/.changeset/clear-masks-improve.md new file mode 100644 index 0000000..f2e87c1 --- /dev/null +++ b/.changeset/clear-masks-improve.md @@ -0,0 +1,5 @@ +--- +"@vortexlabs/kirari": patch +--- + +Highlight TypeScript enum declaration names as types. diff --git a/packages/kirari/src/tokenize.ts b/packages/kirari/src/tokenize.ts index df55f18..2e6fb07 100644 --- a/packages/kirari/src/tokenize.ts +++ b/packages/kirari/src/tokenize.ts @@ -232,7 +232,7 @@ export function* scan(source: string, language: Language, start = 0, previous?: else if (booleans.has(name)) type = 'boolean' else if (nulls.has(name)) type = 'null' // Built-in types, class names, and names in TypeScript type positions. - else if (types.has(name) || previous?.value === 'class' || typed && (context.annotation || previous?.type === 'keyword' && /^(type|interface)$/.test(previous.value))) type = 'type' + else if (types.has(name) || previous?.value === 'class' || typed && (context.annotation || previous?.type === 'keyword' && /^(type|interface|enum)$/.test(previous.value))) type = 'type' else if ((previous?.value === '{' || previous?.value === ',') && nextVisibleChar(source, end) === ':') type = 'property' // { name: value } else if (nextVisibleChar(source, end) === '(') type = 'function' // name(…) // Look ahead for definitions such as `name = () => …` or `name: function () {}`. diff --git a/packages/kirari/test/corpus/fixtures.ts b/packages/kirari/test/corpus/fixtures.ts index 212050b..cc087d9 100644 --- a/packages/kirari/test/corpus/fixtures.ts +++ b/packages/kirari/test/corpus/fixtures.ts @@ -133,6 +133,17 @@ export const corpus: readonly CorpusFixture[] = [ { text: 'Parcel', type: 'type', occurrence: 1 }, ], }, + { + id: 'typescript-enum-declaration-names', language: 'typescript', + source: 'enum Color { Red, Blue }\ndeclare enum D { Up }\ninterface I {}\nabstract class A {}\ntype K = string;', + assertions: [ + { text: 'enum', type: 'keyword', occurrence: 0 }, { text: 'Color', type: 'type' }, + { text: 'enum', type: 'keyword', occurrence: 1 }, { text: 'D', type: 'type' }, + { text: 'interface', type: 'keyword' }, { text: 'I', type: 'type' }, + { text: 'class', type: 'keyword' }, { text: 'A', type: 'type' }, + { text: 'type', type: 'keyword' }, { text: 'K', type: 'type' }, + ], + }, { id: 'tsx-component-props', language: 'tsx', source: 'const panel: unknown = ;', diff --git a/sites/docs/changelog/kirari/1.1.1.md b/sites/docs/changelog/kirari/1.1.1.md new file mode 100644 index 0000000..9898401 --- /dev/null +++ b/sites/docs/changelog/kirari/1.1.1.md @@ -0,0 +1,9 @@ +--- +package: kirari +version: 1.1.1 +date: 2026-10-21 +--- + +### Bug fixes + +- TypeScript enum declaration names are now highlighted as types, like class, interface, and type alias names. From 913b3b0c9e0f45c71e25d1594047318f9b06afea Mon Sep 17 00:00:00 2001 From: ugi-dev Date: Wed, 21 Oct 2026 23:17:43 +1100 Subject: [PATCH 2/2] chore(docs): deploy to Vercel only from main --- sites/docs/vercel.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sites/docs/vercel.json b/sites/docs/vercel.json index 632b223..921424d 100644 --- a/sites/docs/vercel.json +++ b/sites/docs/vercel.json @@ -3,5 +3,11 @@ "framework": "nextjs", "installCommand": "cd ../.. && bun install --frozen-lockfile", "buildCommand": "cd ../.. && bun run build", - "outputDirectory": ".next" + "outputDirectory": ".next", + "git": { + "deploymentEnabled": { + "**": false, + "main": true + } + } }