Skip to content

Commit

Permalink
upgrade Typescript version to ^4.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
baruchiro committed Jan 12, 2024
1 parent ad81d65 commit cd271d5
Show file tree
Hide file tree
Showing 11 changed files with 203 additions and 84 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
"@types/node": "12",
"@types/puppeteer-core": "^5.4.0",
"@types/webdriverio": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^3.7.0",
"@typescript-eslint/parser": "^3.2.0",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"@vue/cli-plugin-babel": "^4.5.12",
"@vue/cli-plugin-eslint": "^4.3.1",
"@vue/cli-plugin-router": "^4.5.12",
Expand All @@ -87,7 +87,7 @@
"@vue/cli-plugin-vuex": "^4.3.1",
"@vue/cli-service": "^4.3.1",
"@vue/compiler-dom": "^3.2.40",
"@vue/eslint-config-typescript": "^7.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^1.0.3",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
Expand Down Expand Up @@ -125,7 +125,7 @@
"semantic-release": "^19.0.5",
"spectron": "^19.0.0",
"ts-jest": "^26.3.0",
"typescript": "^3.9.7",
"typescript": "^4.1.2",
"vue-cli-plugin-electron-builder": "^2.1.1",
"vue-cli-plugin-vuetify": "^2.3.1",
"vue-jest": "4.0.0-beta.5",
Expand Down
2 changes: 1 addition & 1 deletion src/backend/export/exportTransactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function createTransactionsInExternalVendors(
exportedTransactionsNum: exportTransactionsResult.exportedTransactionsNum
}));
executionResult[outputVendor.name] = exportTransactionsResult;
} catch (e) {
} catch (e: any) {
await eventPublisher.emit(EventNames.EXPORTER_ERROR, new ExporterEvent({
message: e.message, error: e, ...baseEvent
}));
Expand Down
2 changes: 1 addition & 1 deletion src/backend/export/outputVendors/csv/csv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const parseTransactionsFile = async (filename: string) => {
try {
const content = await fs.readFile(filename, { encoding: 'utf8' });
return parseTransactions(content);
} catch (err) {
} catch (err: any) {
if (err.code === 'ENOENT') {
return [] as EnrichedTransaction[];
}
Expand Down
2 changes: 1 addition & 1 deletion src/backend/export/outputVendors/json/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const parseTransactionsFile = async (filename: string) => {
try {
const content = await fs.readFile(filename, { encoding: 'utf8' });
return JSON.parse(content) as EnrichedTransaction[];
} catch (err) {
} catch (err: any) {
if (err.code === 'ENOENT') {
return [] as EnrichedTransaction[];
}
Expand Down
2 changes: 1 addition & 1 deletion src/backend/export/outputVendors/ynab/ynab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const createTransactions: ExportTransactionsFunction = async ({ transactionsToCr
return {
exportedTransactionsNum: transactionsThatDontExistInYnab.length
};
} catch (e) {
} catch (e: any) {
await eventPublisher.emit(EventNames.EXPORTER_ERROR, new ExporterEvent({
message: e.message, error: e, exporterName: ynabOutputVendor.name, allTransactions: transactionsToCreate
}));
Expand Down
2 changes: 1 addition & 1 deletion src/backend/import/importTransactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ async function fetchTransactions(
);

return transactions;
} catch (error) {
} catch (error: any) {
await eventPublisher.emit(
EventNames.IMPORTER_ERROR,
buildImporterEvent(account, {
Expand Down
4 changes: 2 additions & 2 deletions src/backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ export async function scrapeAndUpdateOutputVendors(config: Config, optionalEvent

await eventPublisher.emit(Events.EventNames.IMPORT_PROCESS_START, { message: `Starting to scrape from ${startDate} to today` });

const companyIdToTransactions = await scrapeFinancialAccountsAndFetchTransactions(config.scraping, startDate, eventPublisher);
const companyIdToTransactions = await scrapeFinancialAccountsAndFetchTransactions(config.scraping, startDate, eventPublisher as Events.EventPublisher);
try {
const executionResult = await createTransactionsInExternalVendors(config.outputVendors, companyIdToTransactions, startDate, eventPublisher);

return executionResult;
} catch (e) {
} catch (e: any) {
await eventPublisher.emit(Events.EventNames.GENERAL_ERROR, new Events.BudgetTrackingEvent({ message: e.message, error: e }));
throw e;
}
Expand Down
2 changes: 1 addition & 1 deletion src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ app.on('ready', async () => {
// you can upgrade electron and uncomment these lines
try {
await installExtension(VUEJS_DEVTOOLS);
} catch (e) {
} catch (e: any) {
logger.info('Vue Devtools failed to install:', e.toString());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const arrayOfMappingObjectsToMapping = (mappingObjects: ConvertedType) => mappin
}), {} as Record<string, string>);
type ConvertedType = ReturnType<typeof mappingToArrayOfMappingObjects>
type ConvertedTypeElement = ConvertedType[number]
export default defineComponent({
name: 'YnabAccountMappingTable',
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"dom",
"dom.iterable",
"scripthost"
]
],
"skipLibCheck": true
},
"include": [
"src/**/*.ts",
Expand Down
Loading

0 comments on commit cd271d5

Please sign in to comment.