Skip to content

Commit

Permalink
Merge pull request #114 from UN-OCHA/update-deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
Pl217 authored Apr 28, 2023
2 parents a87baa9 + 5c3cfe7 commit 41a2c33
Show file tree
Hide file tree
Showing 6 changed files with 352 additions and 271 deletions.
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@unocha/hpc-api-core",
"version": "4.5.2",
"version": "5.0.0",
"description": "Core libraries supporting HPC.Tools API Backend",
"license": "Apache-2.0",
"private": false,
Expand All @@ -16,23 +16,23 @@
"yarn": ">=1.22.10"
},
"dependencies": {
"@types/lodash": "^4.14.170",
"@types/node-fetch": "2.6.1",
"fp-ts": "^2.6.6",
"io-ts": "2.2.9",
"@types/lodash": "^4.14.194",
"@types/node-fetch": "2.6.3",
"fp-ts": "^2.14.0",
"io-ts": "2.2.20",
"knex": "0.21.1",
"lodash": "^4.17.21",
"node-fetch": "2.6.7",
"pg": "^8.5.1"
"node-fetch": "2.6.9",
"pg": "^8.10.0"
},
"devDependencies": {
"@types/node": "^16.11.21",
"@unocha/hpc-repo-tools": "^1.2.0",
"eslint": "8.19.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "2.7.1",
"typescript": "^4.9.4"
"@types/node": "^18.16.2",
"@unocha/hpc-repo-tools": "^2.0.0",
"eslint": "8.39.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.2",
"prettier": "2.8.8",
"typescript": "^5.0.4"
},
"lint-staged": {
"*.{ts,js}": [
Expand Down
2 changes: 1 addition & 1 deletion src/auth/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const AUTH_PERMISSIONS = {
* Get the union type of string permissions allowed for a particular target type
*/
export type PermissionStrings<K extends keyof typeof AUTH_PERMISSIONS> =
typeof AUTH_PERMISSIONS[K][keyof typeof AUTH_PERMISSIONS[K]];
(typeof AUTH_PERMISSIONS)[K][keyof (typeof AUTH_PERMISSIONS)[K]];

/**
* Type that represents an object containing the complete computed permissions
Expand Down
2 changes: 1 addition & 1 deletion src/auth/roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type RoleAuthTargetString = keyof typeof AUTH_ROLES;
* Get the union type of string permissions allowed for a particular target type
*/
export type RolesStrings<K extends RoleAuthTargetString> =
typeof AUTH_ROLES[K][keyof typeof AUTH_ROLES[K]] & string;
(typeof AUTH_ROLES)[K][keyof (typeof AUTH_ROLES)[K]] & string;

export const getValidRolesForTargetType = <K extends RoleAuthTargetString>(
targetType: K
Expand Down
2 changes: 1 addition & 1 deletion src/db/models/json/attachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const ATTACHMENT_VERSION_VALUE = {
} as const;

export type CostAttachmentValue = t.TypeOf<
typeof ATTACHMENT_VERSION_VALUE['cost']
(typeof ATTACHMENT_VERSION_VALUE)['cost']
>;

export const ANY_ATTACHMENT_VERSION_VALUE = t.union([
Expand Down
2 changes: 1 addition & 1 deletion src/util/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const STATUS_CODES = {
USE_PROXY: 305,
} as const;

type StatusCode = typeof STATUS_CODES[keyof typeof STATUS_CODES];
type StatusCode = (typeof STATUS_CODES)[keyof typeof STATUS_CODES];

export class ExtendableError extends Error {
constructor(message: string) {
Expand Down
Loading

0 comments on commit 41a2c33

Please sign in to comment.