Skip to content

Commit

Permalink
Upgrade major dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ungaralex committed Sep 29, 2023
1 parent 7f9c7f3 commit 28f9929
Show file tree
Hide file tree
Showing 3 changed files with 478 additions and 342 deletions.
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"body-parser": "^1.20.2",
"currency.js": "^2.0.4",
"dotenv": "^16.0.3",
"envalid": "^7.3.1",
"envalid": "^8.0.0",
"express": "^4.18.2",
"express-async-errors": "^3.1.1",
"express-async-handler": "^1.2.0",
"express-openapi-validator": "^5.0.3",
"express-winston": "^4.2.0",
"helmet": "^6.0.1",
"helmet": "^7.0.0",
"http-status-codes": "^2.2.0",
"mongoose": "^7.0.2",
"openapi-typescript": "^6.2.0",
Expand All @@ -40,22 +40,23 @@
"@types/express": "^4.17.17",
"@types/jest": "^29.5.0",
"@types/morgan": "^1.9.4",
"@types/node": "^18.15.0",
"@types/node": "^20.7.2",
"@types/uuid": "^9.0.1",
"@typescript-eslint/eslint-plugin": "^5.54.1",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.7.3",
"copyfiles": "^2.4.1",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-config-standard-with-typescript": "^34.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint": "^8.0.1",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard-with-typescript": "^39.1.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-promise": "^6.0.0",
"jest": "^29.5.0",
"nodemon": "^2.0.21",
"nodemon": "^3.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.4",
"rimraf": "^4.4.0",
"prettier": "^3.0.3",
"rimraf": "^5.0.5",
"supertest": "^6.3.3",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
Expand Down
10 changes: 5 additions & 5 deletions src/usecase/budget/budgetService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { type Budget, type BudgetSummary } from "../../domain/budget";
import UUID from "../../domain/uuid";

export const createBudget: (
insertBudgetSummary: BudgetSummaryRepository["insert"]
insertBudgetSummary: BudgetSummaryRepository["insert"],
) => BudgetUseCases["createBudget"] =
(insertBudgetSummary) => async (newBudget) => {
// We could also create a class for our domain objects and put functionalities s.a.
Expand All @@ -30,27 +30,27 @@ export const createBudget: (
};

export const getBudgetSummary: (
findBudget: BudgetSummaryRepository["find"]
findBudget: BudgetSummaryRepository["find"],
) => BudgetUseCases["getBudgetSummary"] = (findBudget) => async (budgetId) => {
return await findBudget(budgetId);
};

export const getBudgets: (
findBudgets: BudgetRepository["findAll"]
findBudgets: BudgetRepository["findAll"],
) => BudgetUseCases["getBudgets"] = (findAll) => async () => {
return await findAll();
};

export const deleteBudget: (
deleteFromPersistence: BudgetRepository["delete"]
deleteFromPersistence: BudgetRepository["delete"],
) => BudgetUseCases["deleteBudget"] =
(deleteFromPersistence) => async (budgetId) => {
return await deleteFromPersistence(budgetId);
};

const BudgetService: (
budgetSummaryRepo: BudgetSummaryRepository,
budgetRepo: BudgetRepository
budgetRepo: BudgetRepository,
) => BudgetUseCases = (budgetSummaryRepo, budgetRepo) => ({
createBudget: createBudget(budgetSummaryRepo.insert),
getBudgetSummary: getBudgetSummary(budgetSummaryRepo.find),
Expand Down
Loading

0 comments on commit 28f9929

Please sign in to comment.