chore: deliberate dependency upgrades; drop legacy-peer-deps; Capacitor 8.6.2 (shell build 2)
Platform-v2 step 2.99c. - Both apps on the same current versions: React 19.3.1, react-query 5.107.1, router 7.18.5, axios 1.21.1, zustand 5.1, vite 8.3.8, plugin-react 6.3; manager lucide-react 1.14 -> 1.73, recharts 3.8 -> 3.10. - i18next 27.1.1 + react-i18next 18.0.1 (exact pins). Shared options moved to packages/i18n/src/options.js with returnEmptyString: true (27 shows the key for an empty text otherwise); tests/instance.test.mjs guards it, plus fallback, code casing and plurals. - vite-plugin-pwa 2.0 lists Vite 8 as a peer: .npmrc (legacy-peer-deps) removed, `npm install` resolves without it. - Native (CS-10): @capacitor/core/android/cli 8.6.2, @capacitor/app 8.1.2, @capgo/capacitor-updater 8.54.2; versionCode 2 / versionName 1.1.0 and MIN_SHELL_BUILD 2. capacitor-updater 8.54 refuses plain-HTTP downloads by default, which broke every bundle check in the stacks suite: httpsOnly: false in capacitor.config.json (venues have no domains; zips are sha256-checked). - npm audit: 6 left, all in workbox-build 7.4.1 (build time). Full run-all incl. Android passes (Android re-run after the httpsOnly fix). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
# vite-plugin-pwa 1.2 (waiter) does not list Vite 8 as a peer yet; the waiter always
|
||||
# installed with --legacy-peer-deps. One setting for the whole workspace so local
|
||||
# installs, npm ci in the Dockerfiles and the e2e builds resolve the same way.
|
||||
legacy-peer-deps=true
|
||||
@@ -131,6 +131,7 @@ npm run apk:release # releases/xenia-waiter-<ver>.apk, signed, AND copied to p
|
||||
- **Native specifics:**
|
||||
- `androidScheme: http` (origin `http://localhost`)
|
||||
- cleartext allowed via `network_security_config.xml`
|
||||
- the updater may download bundles over plain HTTP (`httpsOnly: false` in `capacitor.config.json`; capacitor-updater 8.54 refuses http by default). Venues have no domains, and each zip is checked against the manifest's sha256
|
||||
- no service worker (`vite build --mode native` → `dist-native/`)
|
||||
- back button handled in `src/native/backButton.js`
|
||||
- first run shows only the pairing screen
|
||||
|
||||
@@ -11,34 +11,34 @@
|
||||
"lint": "eslint eslint.config.js tests src/shell src/live src/pages/platform src/pages/staff src/pages/Settings/sections src/pages/LoginPage.jsx src/components/NotificationBell.jsx src/components/UserMenuButton.jsx src/pages/reports/operations/LogsPanel.jsx src/api/client.js src/store/authStore.js src/main.jsx"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/react-query": "^5.62.0",
|
||||
"@tanstack/react-query": "^5.107.1",
|
||||
"@xenia/access": "^0.0.0",
|
||||
"@xenia/api": "^0.0.0",
|
||||
"@xenia/i18n": "^0.0.0",
|
||||
"@xenia/ui": "^0.0.0",
|
||||
"axios": "^1.7.9",
|
||||
"lucide-react": "^1.14.0",
|
||||
"axios": "^1.21.1",
|
||||
"lucide-react": "^1.73.0",
|
||||
"qrcode.react": "^4.2.0",
|
||||
"react": "^19.2.5",
|
||||
"react-dom": "^19.2.5",
|
||||
"react-hot-toast": "^2.4.1",
|
||||
"react-is": "^19.2.5",
|
||||
"react-router-dom": "^7.14.1",
|
||||
"recharts": "^3.8.1",
|
||||
"zustand": "^5.0.2"
|
||||
"react": "^19.3.1",
|
||||
"react-dom": "^19.3.1",
|
||||
"react-hot-toast": "^2.6.1",
|
||||
"react-is": "^19.3.1",
|
||||
"react-router-dom": "^7.18.5",
|
||||
"recharts": "^3.10.1",
|
||||
"zustand": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.39.4",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^6.0.1",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.39.4",
|
||||
"@eslint/js": "^9.39.5",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"@vitejs/plugin-react": "^6.3.0",
|
||||
"autoprefixer": "^10.6.2",
|
||||
"eslint": "^9.39.5",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.2",
|
||||
"globals": "^17.5.0",
|
||||
"postcss": "^8.4.49",
|
||||
"eslint-plugin-react-refresh": "^0.5.7",
|
||||
"globals": "^17.14.0",
|
||||
"postcss": "^8.5.33",
|
||||
"tailwindcss": "^3.4.16",
|
||||
"vite": "^8.0.9"
|
||||
"vite": "^8.3.8"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+5741
-5502
File diff suppressed because it is too large
Load Diff
@@ -14,8 +14,8 @@
|
||||
"check": "node scripts/check-i18n.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"i18next": "26.7.2",
|
||||
"react-i18next": "17.1.13"
|
||||
"i18next": "27.1.1",
|
||||
"react-i18next": "18.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^19.0.0"
|
||||
|
||||
@@ -2,6 +2,7 @@ import i18next from 'i18next'
|
||||
import { initReactI18next } from 'react-i18next'
|
||||
import { FALLBACK_LANGUAGE, SUPPORTED_LANGUAGES, normalizeLanguage } from './locale.js'
|
||||
import { NAMESPACES, resources } from './resources.js'
|
||||
import { BASE_OPTIONS } from './options.js'
|
||||
|
||||
const DEV = typeof import.meta !== 'undefined' && !!import.meta.env?.DEV
|
||||
|
||||
@@ -21,14 +22,9 @@ export function createI18n({ language = FALLBACK_LANGUAGE, defaultNS = 'common',
|
||||
i18n.use(initReactI18next).init({
|
||||
resources: mergeResources(resources, extra),
|
||||
lng: normalizeLanguage(language) || FALLBACK_LANGUAGE,
|
||||
fallbackLng: FALLBACK_LANGUAGE,
|
||||
supportedLngs: SUPPORTED_LANGUAGES,
|
||||
...BASE_OPTIONS,
|
||||
ns: NAMESPACES,
|
||||
defaultNS,
|
||||
fallbackNS: 'common',
|
||||
interpolation: { escapeValue: false }, // React escapes already
|
||||
returnNull: false,
|
||||
initAsync: false,
|
||||
saveMissing: DEV,
|
||||
missingKeyHandler: DEV ? (lngs, ns, key) => console.warn(`[i18n] missing key "${ns}:${key}" (${lngs.join(', ')})`) : undefined,
|
||||
react: { useSuspense: false },
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// The i18next options every app shares (createI18n in i18n.js adds resources, language and
|
||||
// namespaces). Kept apart from the locale files so node tests can import it (tests/instance.test.mjs).
|
||||
import { FALLBACK_LANGUAGE, SUPPORTED_LANGUAGES } from './locale.js'
|
||||
|
||||
export const BASE_OPTIONS = {
|
||||
fallbackLng: FALLBACK_LANGUAGE,
|
||||
supportedLngs: SUPPORTED_LANGUAGES,
|
||||
fallbackNS: 'common',
|
||||
interpolation: { escapeValue: false }, // React escapes already
|
||||
returnNull: false,
|
||||
returnEmptyString: true, // i18next 27 made '' fall back like a missing key; a few texts are '' on purpose (e.g. an untitled column)
|
||||
initAsync: false,
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// The shared i18next options (src/options.js) on i18next itself. Guards what i18next 27
|
||||
// changed (plan step 2.99c): empty texts, fallback language, language code casing, plurals.
|
||||
import assert from 'node:assert/strict'
|
||||
import { test } from 'node:test'
|
||||
import i18next from 'i18next'
|
||||
import { BASE_OPTIONS } from '../src/options.js'
|
||||
|
||||
const make = (lng, resources) => {
|
||||
const i18n = i18next.createInstance()
|
||||
i18n.init({ ...BASE_OPTIONS, lng, resources, ns: ['common'], defaultNS: 'common' })
|
||||
return i18n
|
||||
}
|
||||
const RES = {
|
||||
en: { common: { empty: '', onlyEn: 'Only English', times_one: '{{count}} time', times_other: '{{count}} times' } },
|
||||
el: { common: { empty: '', times_one: '{{count}} φορά', times_other: '{{count}} φορές' } },
|
||||
}
|
||||
|
||||
test('an empty text stays empty (i18next 27 alone would show the key)', () => {
|
||||
assert.equal(make('en', RES).t('empty'), '')
|
||||
})
|
||||
|
||||
test('a key Greek lacks falls back to English', () => {
|
||||
assert.equal(make('el', RES).t('onlyEn'), 'Only English')
|
||||
})
|
||||
|
||||
test('language code casing and plurals', () => {
|
||||
assert.equal(make('EN', RES).language, 'en')
|
||||
assert.equal(make('en', RES).t('times', { count: 1 }), '1 time')
|
||||
assert.equal(make('el', RES).t('times', { count: 3 }), '3 φορές')
|
||||
})
|
||||
@@ -19,8 +19,8 @@ android {
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
// Bump BOTH for every APK handed out: Android only installs an update over
|
||||
// an existing install when versionCode is higher.
|
||||
versionCode 1
|
||||
versionName "1.0.0"
|
||||
versionCode 2
|
||||
versionName "1.1.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
aaptOptions {
|
||||
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
|
||||
include ':capacitor-android'
|
||||
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
|
||||
project(':capacitor-android').projectDir = new File('../../node_modules/@capacitor/android/capacitor')
|
||||
|
||||
include ':capacitor-app'
|
||||
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
|
||||
project(':capacitor-app').projectDir = new File('../../node_modules/@capacitor/app/android')
|
||||
|
||||
include ':capgo-capacitor-updater'
|
||||
project(':capgo-capacitor-updater').projectDir = new File('../node_modules/@capgo/capacitor-updater/android')
|
||||
project(':capgo-capacitor-updater').projectDir = new File('../../node_modules/@capgo/capacitor-updater/android')
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
"appReadyTimeout": 15000,
|
||||
"resetWhenUpdate": true,
|
||||
"autoDeletePrevious": false,
|
||||
"autoDeleteFailed": true
|
||||
"autoDeleteFailed": true,
|
||||
"httpsOnly": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+22
-22
@@ -14,34 +14,34 @@
|
||||
"test": "node --test \"tests/*.test.mjs\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@capacitor/android": "8.5.2",
|
||||
"@capacitor/app": "8.1.1",
|
||||
"@capacitor/core": "8.5.2",
|
||||
"@capgo/capacitor-updater": "8.51.25",
|
||||
"@tanstack/react-query": "^5.100.11",
|
||||
"@capacitor/android": "8.6.2",
|
||||
"@capacitor/app": "8.1.2",
|
||||
"@capacitor/core": "8.6.2",
|
||||
"@capgo/capacitor-updater": "8.54.2",
|
||||
"@tanstack/react-query": "^5.107.1",
|
||||
"@xenia/api": "^0.0.0",
|
||||
"@xenia/ui": "^0.0.0",
|
||||
"axios": "^1.15.1",
|
||||
"dexie": "^4.4.2",
|
||||
"axios": "^1.21.1",
|
||||
"dexie": "^4.4.7",
|
||||
"qr-scanner": "^1.4.2",
|
||||
"react": "^19.2.5",
|
||||
"react-dom": "^19.2.5",
|
||||
"react-router-dom": "^7.14.1",
|
||||
"vite-plugin-pwa": "^1.2.0",
|
||||
"workbox-window": "^7.4.0",
|
||||
"zustand": "^5.0.12"
|
||||
"react": "^19.3.1",
|
||||
"react-dom": "^19.3.1",
|
||||
"react-router-dom": "^7.18.5",
|
||||
"vite-plugin-pwa": "^2.0.0",
|
||||
"workbox-window": "^7.4.1",
|
||||
"zustand": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@capacitor/cli": "8.5.2",
|
||||
"@eslint/js": "^9.39.4",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@vitejs/plugin-react": "^6.0.1",
|
||||
"eslint": "^9.39.4",
|
||||
"@capacitor/cli": "8.6.2",
|
||||
"@eslint/js": "^9.39.5",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"@vitejs/plugin-react": "^6.3.0",
|
||||
"eslint": "^9.39.5",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.2",
|
||||
"eslint-plugin-react-refresh": "^0.5.7",
|
||||
"fflate": "^0.8.3",
|
||||
"globals": "^17.5.0",
|
||||
"vite": "^8.0.9"
|
||||
"globals": "^17.14.0",
|
||||
"vite": "^8.3.8"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
* Bump it ONLY when this web code starts depending on something new in the
|
||||
* native project (android/…), in the same commit that bumps versionCode.
|
||||
*/
|
||||
export const MIN_SHELL_BUILD = 1
|
||||
export const MIN_SHELL_BUILD = 2 // 2: Capacitor 8.6.2, capacitor-updater 8.54.2 (platform-v2 2.99c)
|
||||
|
||||
Reference in New Issue
Block a user