Open source personal finance application
chore(ci): guard reka-ui single version
Ilya Komichevd8a8bd3de6e3
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlnew file mode 100644index 00000000..505c5b5a--- /dev/null+++ b/.github/workflows/ci.yml@@ -0,0 +1,20 @@+name: CI++on:+ push:+ branches: [main]+ pull_request:++jobs:+ deps:+ name: reka-ui single version+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ - uses: pnpm/action-setup@v4+ - uses: actions/setup-node@v4+ with:+ node-version: 24+ cache: pnpm+ - run: pnpm install --frozen-lockfile+ - run: pnpm --filter @finapp/app check:depsdiff --git a/app/package.json b/app/package.jsonindex 21298c16..06486a81 100644--- a/app/package.json+++ b/app/package.json@@ -22,6 +22,7 @@"generate": "nuxt generate","preview": "nuxt generate && nuxt preview","typecheck": "nuxi typecheck",+ "check:deps": "node scripts/check-single-reka-ui.mjs","test": "vitest","test:coverage": "vitest run --coverage","test:e2e": "playwright test --project=demo",@@ -43,7 +44,7 @@"localforage": "^1.10.0","motion-v": "^2.3.0","pinia": "^3.0.4",- "reka-ui": "^2.10.0",+ "reka-ui": "2.9.10","swiper": "^12.2.0","vaul-vue": "^0.4.1","vite": "^8.0.16",diff --git a/app/scripts/check-single-reka-ui.mjs b/app/scripts/check-single-reka-ui.mjsnew file mode 100644index 00000000..d40b4a43--- /dev/null+++ b/app/scripts/check-single-reka-ui.mjs@@ -0,0 +1,19 @@+import { execSync } from 'node:child_process'++// reka-ui must resolve to ONE version in the app tree. Two copies make its+// createContext run twice and break provide/inject ("Injection+// Symbol(ContextMenuRootContext) not found") in the production bundle - it+// passes type-check and unit tests, only failing in the bundled app. The app+// pins reka-ui to @nuxt/ui's exact version to stay deduped; this guard fails+// loudly if a future bump (ours or @nuxt/ui's) reintroduces a second copy.++const out = execSync('pnpm --filter @finapp/app why reka-ui', { encoding: 'utf8' })+const versions = [...new Set(out.match(/reka-ui@\d+\.\d+\.\d+/g) ?? [])]++if (versions.length > 1) {+ console.error(`✗ reka-ui resolves to multiple versions: ${versions.join(', ')}`)+ console.error(' Align app/package.json "reka-ui" with @nuxt/ui\'s pinned version.')+ process.exit(1)+}++console.log(`✓ reka-ui single version: ${versions[0] ?? '(none)'}`)diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 70a5aab7..bc1677d4 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -86,14 +86,14 @@ importers:specifier: ^3.0.4reka-ui:- specifier: ^2.10.0- version: 2.10.0([email protected]([email protected]))+ specifier: 2.9.10+ version: 2.9.10([email protected]([email protected]))swiper:specifier: ^12.2.0version: 12.2.0vaul-vue:specifier: ^0.4.1- version: 0.4.1([email protected]([email protected]([email protected])))([email protected]([email protected]))+ version: 0.4.1([email protected]([email protected]([email protected])))([email protected]([email protected]))vite:specifier: ^8.0.16version: 8.0.16(@types/[email protected])([email protected])([email protected])([email protected])([email protected])@@ -8197,11 +8197,6 @@ packages:resolution: {integrity: sha512-Bxo+AKUIELcnnAZwJDt5zUDDRpt4uzhfz9d0PVGhcxYWsbFj5Cv35xuWxu5r1LeYNFNhgGqsr9Q2QiIOM/Qctg==}- resolution: {integrity: sha512-HIUVfSBM/AyGkcUI7aiOxxMc4N+0UD2ZEun8dcrT0H4fveotEoeDdvzyZu97eeEvEa1H9oGHoOpApkfxlgnC7g==}- peerDependencies:- vue: '>= 3.4.0'-resolution: {integrity: sha512-yuvZVTp4fWH2G3qk+ze/x6YYlyc2Xl1d+eMUlIYrKqzTowBKteoDoN17fitURmqSUck3mc7JbcYgp49DnGu2EQ==}peerDependencies:@@ -19297,22 +19292,6 @@ snapshots:'@types/hast': 3.0.4unist-util-visit: 5.1.0- dependencies:- '@floating-ui/dom': 1.7.6- '@floating-ui/vue': 1.1.11([email protected]([email protected]))- '@internationalized/date': 3.12.2- '@internationalized/number': 3.6.7- '@tanstack/vue-virtual': 3.13.29([email protected]([email protected]))- '@vueuse/core': 14.3.0([email protected]([email protected]))- '@vueuse/shared': 14.3.0([email protected]([email protected]))- aria-hidden: 1.2.6- defu: 6.1.7- ohash: 2.0.11- vue: 3.5.38([email protected])- transitivePeerDependencies:- - '@vue/composition-api'-dependencies:'@floating-ui/dom': 1.7.6@@ -20466,14 +20445,6 @@ snapshots:- [email protected]([email protected]([email protected]([email protected])))([email protected]([email protected])):- dependencies:- '@vueuse/core': 10.11.1([email protected]([email protected]))- reka-ui: 2.10.0([email protected]([email protected]))- vue: 3.5.38([email protected])- transitivePeerDependencies:- - '@vue/composition-api'-[email protected]([email protected]([email protected]([email protected])))([email protected]([email protected])):dependencies:'@vueuse/core': 10.11.1([email protected]([email protected]))