Fix Typescript error during build-lib. (#38342)

* Fix Typescript error during build-lib.

Also allow build-lib to run on Windows.

Fixes #33432

Signed-off-by: Stan Silvert <ssilvert@redhat.com>

* Allow account build-lib to run on Windows.

Fixes #33432

Signed-off-by: Stan Silvert <ssilvert@redhat.com>

* Add cross-env to account console.

Fixes #33432

Signed-off-by: Stan Silvert <ssilvert@redhat.com>

---------

Signed-off-by: Stan Silvert <ssilvert@redhat.com>
This commit is contained in:
Stan Silvert 2025-03-24 07:50:05 -04:00 committed by GitHub
parent 11cb332964
commit f2628a9615
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 21 additions and 3 deletions

View File

@ -47,6 +47,7 @@
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react-swc": "^3.8.1",
"cross-env": "^7.0.3",
"lightningcss": "^1.29.3",
"vite": "^6.2.2",
"vite-plugin-checker": "^0.9.1",
@ -84,7 +85,7 @@
]
},
"build-lib": {
"command": "LIB=true vite build",
"command": "cross-env LIB=true vite build",
"dependencies": [
"../../libs/ui-shared:build",
"../../libs/keycloak-admin-client:build"

View File

@ -57,7 +57,7 @@
]
},
"build-lib": {
"command": "LIB=true vite build",
"command": "cross-env LIB=true vite build",
"dependencies": [
"../../libs/ui-shared:build",
"../../libs/keycloak-admin-client:build"
@ -117,6 +117,7 @@
"@types/react": "^18.3.18",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react-swc": "^3.8.1",
"cross-env": "^7.0.3",
"jsdom": "^26.0.0",
"lightningcss": "^1.29.3",
"ts-node": "^10.9.2",

View File

@ -1,4 +1,5 @@
import { createInstance } from "i18next";
import type { i18n as i18nType } from "i18next";
import FetchBackend from "i18next-fetch-backend";
import { initReactI18next } from "react-i18next";
@ -10,7 +11,7 @@ type KeyValue = { key: string; value: string };
export const DEFAULT_LOCALE = "en";
export const KEY_SEPARATOR = ".";
export const i18n = createInstance({
export const i18n: i18nType = createInstance({
fallbackLng: DEFAULT_LOCALE,
keySeparator: KEY_SEPARATOR,
interpolation: {

15
js/pnpm-lock.yaml generated
View File

@ -129,6 +129,9 @@ importers:
'@vitejs/plugin-react-swc':
specifier: ^3.8.1
version: 3.8.1(vite@6.2.2(@types/node@22.13.11)(lightningcss@1.29.3)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0))
cross-env:
specifier: ^7.0.3
version: 7.0.3
lightningcss:
specifier: ^1.29.3
version: 1.29.3
@ -253,6 +256,9 @@ importers:
'@vitejs/plugin-react-swc':
specifier: ^3.8.1
version: 3.8.1(vite@6.2.2(@types/node@22.13.11)(lightningcss@1.29.3)(terser@5.39.0)(tsx@4.19.3)(yaml@2.7.0))
cross-env:
specifier: ^7.0.3
version: 7.0.3
jsdom:
specifier: ^26.0.0
version: 26.0.0
@ -2157,6 +2163,11 @@ packages:
create-require@1.1.1:
resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==}
cross-env@7.0.3:
resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==}
engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'}
hasBin: true
cross-spawn@7.0.6:
resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
engines: {node: '>= 8'}
@ -6156,6 +6167,10 @@ snapshots:
create-require@1.1.1: {}
cross-env@7.0.3:
dependencies:
cross-spawn: 7.0.6
cross-spawn@7.0.6:
dependencies:
path-key: 3.1.1