From a96a02d65500d926dd87274b1164196d5a6793d3 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 07:50:18 +0000 Subject: [PATCH 1/2] fix(i18n): replace the expired pkg.pr.new lunaria build with @lunariajs/core 0.2.0 packages/i18n pinned @lunariajs/core to a pkg.pr.new preview build that now returns 404, so every clean `aube ci` fails before any task runs. Depend on the published 0.2.0 release instead. Its API is the one i18n-status.ts already uses; missing keys are now reported as key paths (string arrays), so the status report joins them with dots. The lockfile was regenerated with `aube add`, which also rewrote the @prisma/client and drizzle-orm peer references of the two @better-auth/*-adapter@1.6.26 snapshots to a variant with no snapshot of its own. A frozen `aube ci` then links the drizzle adapter to a drizzle-orm directory that is never created and the dashboard build fails, so those two references keep their main values; `aube install` accepts the result unchanged. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Xv8HFiGBXf14HBy5yko6J --- packages/i18n/package.json | 2 +- packages/i18n/scripts/i18n-status.ts | 6 ++- pnpm-lock.yaml | 70 ++++++++++++++++++++-------- 3 files changed, 55 insertions(+), 23 deletions(-) diff --git a/packages/i18n/package.json b/packages/i18n/package.json index bfc5974..025c8b9 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -38,7 +38,7 @@ "typecheck": "tsc --project tsconfig.json --pretty false --noEmit" }, "dependencies": { - "@lunariajs/core": "https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@904b935", + "@lunariajs/core": "^0.2.0", "vue-i18n-extract": "2.0.7" }, "devDependencies": { diff --git a/packages/i18n/scripts/i18n-status.ts b/packages/i18n/scripts/i18n-status.ts index 340e81b..fa09998 100644 --- a/packages/i18n/scripts/i18n-status.ts +++ b/packages/i18n/scripts/i18n-status.ts @@ -1,5 +1,5 @@ // Translation status reporter, inspired by npmx.dev's Lunaria build script (MIT license). -// The pinned @lunariajs/core build has no CLI, so the status is computed through its API. +// The status is computed through @lunariajs/core's API rather than its CLI. import { mkdirSync, writeFileSync } from 'node:fs'; import { createLunaria } from '@lunariajs/core'; @@ -27,7 +27,9 @@ const summaries = lunaria.config.locales.map((locale) => { } if ('missingKeys' in localization) { - missingKeys.push(...localization.missingKeys.map((key) => `${localization.path}: ${key}`)); + missingKeys.push( + ...localization.missingKeys.map((key) => `${localization.path}: ${key.join('.')}`), + ); } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 493da9c..0aed57e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -644,8 +644,8 @@ importers: packages/i18n: dependencies: '@lunariajs/core': - specifier: https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@904b935 - version: https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@904b935 + specifier: ^0.2.0 + version: 0.2.0(supports-color@8.1.1) vue-i18n-extract: specifier: 2.0.7 version: 2.0.7 @@ -3836,9 +3836,10 @@ packages: resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==} engines: {node: '>=8'} - '@lunariajs/core@https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@904b935': - resolution: {integrity: sha512-N0PDFIitA/Vzh5V6BtTacWU9jgSDJJtPLHamRLMU85mohmyuVW/pggHX8dzdV5ieqZeHEz8pDZSzH4I0hOYxOg==, tarball: https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@904b935} - version: 0.1.1 + '@lunariajs/core@0.2.0': + resolution: {integrity: sha512-JuQsDStxiznw4Km0ab/FNH2VxVfWm08oJdjevRUOY7duN6nPKvBkk9rvXD6zPDlvauPWTf9RFuJ3lD4l+o9M4g==} + engines: {node: '>=18.17.0'} + hasBin: true '@maizzle/framework@6.1.0': resolution: {integrity: sha512-DrwSD3CuTQHGy7cClLtyi+W0d3v9j3KOUatdfDjzJQa13WMMsQupaxEhT2WN1lQRTgh0R7ViojeQteaUGeTxMA==} @@ -10516,6 +10517,9 @@ packages: encoding-sniffer@0.2.1: resolution: {integrity: sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==} + encoding@0.1.13: + resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} + end-of-stream@1.4.5: resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==} @@ -11375,6 +11379,10 @@ packages: resolution: {integrity: sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==} engines: {node: '>= 14'} + gettext-parser@9.1.1: + resolution: {integrity: sha512-ZLeqWPz9OMNrTgMuww0C22kkcNqis+e4059R94t7L7ERlZ2rUNpiDbaAUus+esBC6uBAQWbS9N+R5vJIJg//lw==} + engines: {node: '>=20'} + giget@3.3.1: resolution: {integrity: sha512-r+mvuDjrjMpsdw46Kmeydb8bdHm7wOKw8wNBtTndkjbPjgAp5oUJUxRE76wZFknxIPokfWvep2qSXK37aXE6zg==} hasBin: true @@ -12136,10 +12144,6 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} - jiti@2.3.3: - resolution: {integrity: sha512-EX4oNDwcXSivPrw2qKH2LB5PoFxEvgtv2JgwW0bU858HoLQ+kutSvjLMUqBd0PeJYEinLWhoI9Ol0eYMqj/wNQ==} - hasBin: true - jiti@2.6.1: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true @@ -13103,8 +13107,8 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - neotraverse@0.6.18: - resolution: {integrity: sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==} + neotraverse@1.0.1: + resolution: {integrity: sha512-WmmLty1YWwJl9yZi77v2dVIV6X2kuYV8YYBI/G3LWGKdGHmHUvL1z7FW0iDvEvGAwNEoc5x1tOOOyDnf5jJw/w==} engines: {node: '>= 10'} netmask@2.1.1: @@ -13853,6 +13857,10 @@ packages: resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} engines: {node: '>=12'} + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} @@ -16713,6 +16721,11 @@ packages: engines: {node: '>= 14.6'} hasBin: true + yaml@2.9.1: + resolution: {integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==} + engines: {node: '>= 14.6'} + hasBin: true + yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -16798,6 +16811,9 @@ packages: zod@4.4.3: resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + zod@4.6.5: + resolution: {integrity: sha512-v5l/aFXZQeai4awLbOpSoHecE9UiMrnfx75tEXLjNonXVARxQ5mOeipTjROUchszUNCqnE+hqAMujRsRHsut2Q==} + zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} @@ -19641,19 +19657,20 @@ snapshots: '@lukeed/csprng@1.1.0': {} - '@lunariajs/core@https://pkg.pr.new/lunariajs/lunaria/@lunariajs/core@904b935': + '@lunariajs/core@0.2.0(supports-color@8.1.1)': dependencies: consola: 3.4.2 - jiti: 2.3.3 - js-yaml: 4.3.1 - neotraverse: 0.6.18 + gettext-parser: 9.1.1 + jiti: 2.7.0 + neotraverse: 1.0.1 p-all: 5.0.1 path-to-regexp: 6.3.0 - picomatch: 4.0.5 + picomatch: 4.0.7 simple-git: 3.36.0(supports-color@8.1.1) tinyglobby: 0.2.17 ultramatter: 0.0.4 - zod: 3.25.76 + yaml: 2.9.1 + zod: 4.6.5 '@maizzle/framework@6.1.0(shiki@4.4.3)(tailwind-merge@3.6.0)(vue@3.5.41)': dependencies: @@ -26288,6 +26305,10 @@ snapshots: iconv-lite: 0.6.3 whatwg-encoding: 3.1.1 + encoding@0.1.13: + dependencies: + iconv-lite: 0.6.3 + end-of-stream@1.4.5: dependencies: once: 1.4.0 @@ -27239,6 +27260,11 @@ snapshots: data-uri-to-buffer: 6.0.2 debug: 4.4.3(supports-color@8.1.1) + gettext-parser@9.1.1: + dependencies: + content-type: 1.0.5 + encoding: 0.1.13 + giget@3.3.1: {} git-up@8.1.1: @@ -28126,8 +28152,6 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jiti@2.3.3: {} - jiti@2.6.1: {} jiti@2.7.0: {} @@ -29193,7 +29217,7 @@ snapshots: neo-async@2.6.2: {} - neotraverse@0.6.18: {} + neotraverse@1.0.1: {} netmask@2.1.1: {} @@ -30410,6 +30434,8 @@ snapshots: picomatch@4.0.5: {} + picomatch@4.0.7: {} + pify@4.0.1: {} piscina@4.9.3: @@ -33696,6 +33722,8 @@ snapshots: yaml@2.9.0: {} + yaml@2.9.1: {} + yargs-parser@20.2.9: {} yargs-parser@22.0.0: {} @@ -33821,4 +33849,6 @@ snapshots: zod@4.4.3: {} + zod@4.6.5: {} + zwitch@2.0.4: {} From 1561a629bbc0a23446ac248fc7d199279e4828f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 08:15:16 +0000 Subject: [PATCH 2/2] test(i18n): cover the missing-key path format of the status report Extract the formatting into scripts/utils/lunaria-status.ts and assert that key path segments are dot-joined, so a wrong separator fails the package tests instead of only surfacing in status.json. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Xv8HFiGBXf14HBy5yko6J --- packages/i18n/scripts/i18n-status.ts | 4 +++- packages/i18n/scripts/utils/lunaria-status.ts | 11 +++++++++++ packages/i18n/src/lunaria-status.test.ts | 17 +++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 packages/i18n/scripts/utils/lunaria-status.ts create mode 100644 packages/i18n/src/lunaria-status.test.ts diff --git a/packages/i18n/scripts/i18n-status.ts b/packages/i18n/scripts/i18n-status.ts index fa09998..cf52a43 100644 --- a/packages/i18n/scripts/i18n-status.ts +++ b/packages/i18n/scripts/i18n-status.ts @@ -4,6 +4,8 @@ import { mkdirSync, writeFileSync } from 'node:fs'; import { createLunaria } from '@lunariajs/core'; +import { formatMissingKey } from './utils/lunaria-status.ts'; + // `force: true` bypasses git caching so the status stays correct after rebases and merges. const lunaria = await createLunaria({ force: true }); const status = await lunaria.getFullStatus(); @@ -28,7 +30,7 @@ const summaries = lunaria.config.locales.map((locale) => { if ('missingKeys' in localization) { missingKeys.push( - ...localization.missingKeys.map((key) => `${localization.path}: ${key.join('.')}`), + ...localization.missingKeys.map((key) => formatMissingKey(localization.path, key)), ); } } diff --git a/packages/i18n/scripts/utils/lunaria-status.ts b/packages/i18n/scripts/utils/lunaria-status.ts new file mode 100644 index 0000000..2e86f88 --- /dev/null +++ b/packages/i18n/scripts/utils/lunaria-status.ts @@ -0,0 +1,11 @@ +// Formatting for the translation status report written by `scripts/i18n-status.ts`. + +/** + * One missing-key entry: the localization file, then the key as a dotted path. + * + * @lunariajs/core reports a missing key as its path segments (`['auth', 'signIn', 'title']`), so + * the segments are joined here rather than interpolated, which would comma-separate them. + */ +export function formatMissingKey(localizationPath: string, key: readonly string[]): string { + return `${localizationPath}: ${key.join('.')}`; +} diff --git a/packages/i18n/src/lunaria-status.test.ts b/packages/i18n/src/lunaria-status.test.ts new file mode 100644 index 0000000..c5bac64 --- /dev/null +++ b/packages/i18n/src/lunaria-status.test.ts @@ -0,0 +1,17 @@ +import { describe, expect, it } from 'vitest'; + +import { formatMissingKey } from '../scripts/utils/lunaria-status.js'; + +describe('formatMissingKey', () => { + it('joins the key path segments with dots after the localization path', () => { + expect(formatMissingKey('locales/it/auth.json', ['auth', 'signIn', 'title'])).toBe( + 'locales/it/auth.json: auth.signIn.title', + ); + }); + + it('renders a top-level key without a separator', () => { + expect(formatMissingKey('locales/it/common.json', ['appName'])).toBe( + 'locales/it/common.json: appName', + ); + }); +});