mirror of
https://github.com/Dvorinka/Trackeep.git
synced 2026-06-04 04:22:57 +00:00
fix: remove verbatimModuleSyntax to resolve CI TypeScript build errors
- Remove verbatimModuleSyntax: true from tsconfig.app.json - This option caused async/await syntax errors in CI/CD environment - Build now works consistently across local and CI environments - Fixes TS1308 errors on await expressions in updateService.ts
This commit is contained in:
@@ -17,7 +17,7 @@ export function UpdateChecker(props: UpdateCheckerProps) {
|
||||
const [showUpdateModal, setShowUpdateModal] = createSignal(false);
|
||||
|
||||
// Initialize update store
|
||||
updateStore.ensureInitialized();
|
||||
updateStore.ensureInitialized().catch(console.error);
|
||||
|
||||
const installUpdate = () => {
|
||||
updateStore.installUpdate();
|
||||
|
||||
@@ -148,7 +148,7 @@ export const updateService = {
|
||||
},
|
||||
|
||||
// Get current app version from package.json
|
||||
getCurrentVersion(): string {
|
||||
async getCurrentVersion(): Promise<string> {
|
||||
// Try to get version from package.json first, then fallback
|
||||
try {
|
||||
const response = await fetch('/package.json');
|
||||
|
||||
@@ -116,9 +116,9 @@ const cancelUpdate = () => {
|
||||
};
|
||||
|
||||
// Initialize update checking
|
||||
const initializeUpdateChecking = () => {
|
||||
const initializeUpdateChecking = async () => {
|
||||
// Set current version
|
||||
setCurrentVersion(updateService.getCurrentVersion());
|
||||
setCurrentVersion(await updateService.getCurrentVersion());
|
||||
|
||||
// Check if last check was more than 24 hours ago
|
||||
const lastCheckTimeStr = localStorage.getItem('lastUpdateCheck');
|
||||
@@ -150,9 +150,9 @@ const cleanup = () => {
|
||||
|
||||
// Auto-initialize when store is imported
|
||||
let initialized = false;
|
||||
const ensureInitialized = () => {
|
||||
const ensureInitialized = async () => {
|
||||
if (!initialized) {
|
||||
initializeUpdateChecking();
|
||||
await initializeUpdateChecking();
|
||||
initialized = true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user