Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency typescript to v5 #7994

Merged
merged 50 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
492aae4
chore(deps): update dependency typescript to v5
renovate[bot] Oct 29, 2024
db50637
fix: improve types in common
jamil314 Nov 7, 2024
aa8ffcc
fix: improve types in config
jamil314 Nov 7, 2024
398c1b7
fix: improve types in matrics
jamil314 Nov 7, 2024
7430486
fix: update tsconfigs
jamil314 Nov 7, 2024
054564b
chore: update types in user-mgnt
jamil314 Nov 8, 2024
f362959
chore: update types in workflow
jamil314 Nov 8, 2024
16b9636
chore: update gateway types
jamil314 Nov 10, 2024
a234444
chore: improve metrics types
jamil314 Nov 10, 2024
1398d49
chore: improve notification types
jamil314 Nov 10, 2024
e3fa4b5
chore: improve search types
jamil314 Nov 10, 2024
d951317
chore: improve webhooks types
jamil314 Nov 10, 2024
1dbdc74
chore: use same vite version: 5.4.8
jamil314 Nov 10, 2024
c1ab54e
chore: improve workflow types
jamil314 Nov 11, 2024
850f014
chore: improve webhooks types
jamil314 Nov 11, 2024
5a82cae
chore: improve metrics types
jamil314 Nov 11, 2024
d2f626e
merge develop
jamil314 Nov 11, 2024
502cd13
chore: update eslint-plugin-formatjs
jamil314 Nov 11, 2024
3f2a4ef
fix: add data-testid in props
jamil314 Nov 12, 2024
a6a333b
chore merge develop into renovate/typescript-5
jamil314 Nov 12, 2024
00d1f91
revert: 502cd133285a2f291e4b28cace5c330ea49feeb7
jamil314 Nov 13, 2024
b7fe2e1
chore: bumb up ts-jest
jamil314 Nov 13, 2024
42899dd
Merge branch 'develop' into renovate/typescript-5.x
rikukissa Nov 14, 2024
20a0ba9
chore: add jsdom
jamil314 Nov 14, 2024
e1ce230
fix: update snapshot
jamil314 Nov 14, 2024
61e3665
fix: import decode as function
jamil314 Nov 14, 2024
7ffdbfe
fix: update imports
jamil314 Nov 14, 2024
0ddebf8
fix: update imports
jamil314 Nov 14, 2024
6a32547
fix: update snapshot
jamil314 Nov 14, 2024
e4c5de7
fix: update imports
jamil314 Nov 14, 2024
0435951
chore: update yarn.lock
jamil314 Nov 14, 2024
c0a4990
Merge branch develop into renovate/typescript-5.x
jamil314 Nov 14, 2024
6019305
chore: bump up eslint-plugin-formatjs
jamil314 Nov 14, 2024
677f395
fix: use [email protected] for lerna
jamil314 Nov 14, 2024
e0bf4f2
Revert "chore: use same vite version: 5.4.8"
jamil314 Nov 14, 2024
353e751
chore: remove vite-plugin-babel-macros
jamil314 Nov 15, 2024
9924321
Merge branch 'develop' of github.com:opencrvs/opencrvs-core into reno…
rikukissa Nov 15, 2024
6a4925f
fix: remove allowJs from gateway tsconfig
jamil314 Nov 15, 2024
b0d3a84
fix: imports from mongoose
jamil314 Nov 15, 2024
51a313a
chore: update yarn.lock
jamil314 Nov 15, 2024
e6330de
Merge branch 'renovate/typescript-5.x' of https://github.com/opencrvs…
jamil314 Nov 15, 2024
3fa9956
Merge branch 'develop' into renovate/typescript-5.x
rikukissa Nov 15, 2024
8542541
fix: update type of EVENT in common
jamil314 Nov 15, 2024
8f65243
fix: update mongoose mock
jamil314 Nov 15, 2024
6ea35e1
Merge branch 'renovate/typescript-5.x' of https://github.com/opencrvs…
jamil314 Nov 15, 2024
dad8434
fix: unit tests
jamil314 Nov 15, 2024
baa07b9
chore: bump up jwt-decode
jamil314 Nov 15, 2024
e4c8ec9
Merge branch 'develop' into renovate/typescript-5.x
jamil314 Nov 15, 2024
3ada53d
chore: bump up uuid
jamil314 Nov 15, 2024
0fb9024
Merge branch develop into renovate/typescript-5.x
jamil314 Nov 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-prettier": "^4.0.0",
"jest": "27.5.1",
"jest": "29.7.0",
"jest-fetch-mock": "^2.1.2",
"nodemon": "^3.0.0",
"prettier": "2.8.8",
"redis-mock": "^0.56.0",
"ts-jest": "27.1.4",
"ts-jest": "29.2.5",
"ts-node": "^6.1.1",
"typescript": "4.9.5"
"typescript": "5.6.3"
},
"lint-staged": {
"src/**/*.ts": [
Expand Down
24 changes: 5 additions & 19 deletions packages/auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"compilerOptions": {
"baseUrl": "./src",
"paths": {
"@auth/*": [
"./*"
]
"@auth/*": ["./*"]
},
"target": "es6",
"module": "commonjs",
Expand All @@ -14,33 +12,21 @@
"sourceMap": true,
"moduleResolution": "node",
"rootDir": ".",
"lib": [
"esnext.asynciterable",
"es6",
"es2017"
],
"lib": ["esnext.asynciterable", "es6", "es2017"],
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"types": [
"fhir",
"jest"
]
"types": ["fhir", "jest"]
},
"include": [
"resources/**/*.ts",
"src/**/*.ts",
"typings"
],
"include": ["resources/**/*.ts", "src/**/*.ts", "typings"],
"exclude": [
"node_modules",
"build",
"scripts",
"acceptance-tests",
"src/setupTests.ts"
]
}
}
7 changes: 4 additions & 3 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@
"history": "^4.7.2",
"html-to-pdfmake": "^2.5.13",
"iframe-resizer-react": "^1.1.0",
"jsdom": "16.7.0",
"jsdom-worker": "^0.3.0",
"jwt-decode": "^2.2.0",
"jwt-decode": "^3.0.0",
"localforage": "^1.7.2",
"lodash": "^4.17.10",
"patch-package": "^6.1.2",
Expand Down Expand Up @@ -142,7 +143,7 @@
"eslint-config-prettier": "^9.0.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-formatjs": "2.21.0",
"eslint-plugin-formatjs": "4.10.0",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^4.0.0",
Expand All @@ -161,7 +162,7 @@
"stylelint-processor-styled-components": "^1.10.0",
"traverse": "^0.6.6",
"ts-node": "^7.0.1",
"typescript": "4.9.5",
"typescript": "5.6.3",
"vite-plugin-pwa": "^0.20.0",
"vitest": "0.25.5",
"vitest-fetch-mock": "^0.2.1"
Expand Down
8 changes: 4 additions & 4 deletions packages/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"@types/uuid": "^9.0.3",
"date-fns": "^2.28.0",
"elastic-apm-node": "^3.29.0",
"jest": "27.5.1",
"jwt-decode": "^2.2.0",
"jest": "29.7.0",
"jwt-decode": "^3.0.0",
"lodash": "^4.17.10",
"node-fetch": "^2.6.7",
"pkg-up": "^3.1.0",
"typescript": "4.9.5",
"typescript": "5.6.3",
"uuid": "^9.0.0",
"pino": "^7.0.0"
},
Expand All @@ -53,7 +53,7 @@
"eslint-plugin-prettier": "^4.0.0",
"jest-fetch-mock": "^2.1.2",
"pino-pretty": "^11.0.0",
"ts-jest": "27.1.4"
"ts-jest": "29.2.5"
},
"lint-staged": {
"src/**/*.ts": [
Expand Down
66 changes: 44 additions & 22 deletions packages/commons/src/assignment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ it('finds assignment from the latest task', () => {
]
},
focus: {
reference: 'Composition/c5811d36-934d-40f9-94b4-15194d562e45'
reference:
'Composition/c5811d36-934d-40f9-94b4-15194d562e45' as `Composition/${UUID}`
},
extension: [
{
Expand Down Expand Up @@ -122,7 +123,8 @@ it("finds assignment when it's in TaskHistory and status HAS NOT changed", () =>
]
},
focus: {
reference: 'Composition/c5811d36-934d-40f9-94b4-15194d562e45'
reference:
'Composition/c5811d36-934d-40f9-94b4-15194d562e45' as `Composition/${UUID}`
},
identifier: [
{
Expand All @@ -137,13 +139,15 @@ it("finds assignment when it's in TaskHistory and status HAS NOT changed", () =>
{
url: 'http://opencrvs.org/specs/extension/regLastUser',
valueReference: {
reference: 'Practitioner/00000000-0000-4000-8000-000000000001'
reference:
'Practitioner/00000000-0000-4000-8000-000000000001' as `Practitioner/${UUID}`
}
},
{
url: 'http://opencrvs.org/specs/extension/regLastOffice',
valueReference: {
reference: 'Location/00000000-0000-4000-8000-000000000010'
reference:
'Location/00000000-0000-4000-8000-000000000010' as `Location/${UUID}`
}
}
],
Expand Down Expand Up @@ -268,7 +272,8 @@ it("does not find assignment when it's in TaskHistory and status HAS changed", (
]
},
focus: {
reference: 'Composition/c5811d36-934d-40f9-94b4-15194d562e45'
reference:
'Composition/c5811d36-934d-40f9-94b4-15194d562e45' as `Composition/${UUID}`
},
identifier: [
{
Expand All @@ -283,13 +288,15 @@ it("does not find assignment when it's in TaskHistory and status HAS changed", (
{
url: 'http://opencrvs.org/specs/extension/regLastUser',
valueReference: {
reference: 'Practitioner/00000000-0000-4000-8000-000000000001'
reference:
'Practitioner/00000000-0000-4000-8000-000000000001' as `Practitioner/${UUID}`
}
},
{
url: 'http://opencrvs.org/specs/extension/regLastOffice',
valueReference: {
reference: 'Location/00000000-0000-4000-8000-000000000010'
reference:
'Location/00000000-0000-4000-8000-000000000010' as `Location/${UUID}`
}
}
],
Expand Down Expand Up @@ -317,7 +324,8 @@ it("does not find assignment when it's in TaskHistory and status HAS changed", (
]
},
focus: {
reference: 'Composition/c5811d36-934d-40f9-94b4-15194d562e45'
reference:
'Composition/c5811d36-934d-40f9-94b4-15194d562e45' as `Composition/${UUID}`
},
identifier: [
{
Expand All @@ -332,13 +340,15 @@ it("does not find assignment when it's in TaskHistory and status HAS changed", (
{
url: 'http://opencrvs.org/specs/extension/regLastUser',
valueReference: {
reference: 'Practitioner/00000000-0000-4000-8000-000000000002'
reference:
'Practitioner/00000000-0000-4000-8000-000000000002' as `Practitioner/${UUID}`
}
},
{
url: 'http://opencrvs.org/specs/extension/regLastOffice',
valueReference: {
reference: 'Location/00000000-0000-4000-8000-000000000010'
reference:
'Location/00000000-0000-4000-8000-000000000010' as `Location/${UUID}`
}
}
],
Expand Down Expand Up @@ -366,7 +376,8 @@ it("does not find assignment when it's in TaskHistory and status HAS changed", (
]
},
focus: {
reference: 'Composition/c5811d36-934d-40f9-94b4-15194d562e45'
reference:
'Composition/c5811d36-934d-40f9-94b4-15194d562e45' as `Composition/${UUID}`
},
identifier: [
{
Expand All @@ -381,13 +392,15 @@ it("does not find assignment when it's in TaskHistory and status HAS changed", (
{
url: 'http://opencrvs.org/specs/extension/regLastUser',
valueReference: {
reference: 'Practitioner/93e34962-cef1-446a-985f-ad0e46732939'
reference:
'Practitioner/93e34962-cef1-446a-985f-ad0e46732939' as `Practitioner/${UUID}`
}
},
{
url: 'http://opencrvs.org/specs/extension/regLastOffice',
valueReference: {
reference: 'Location/347ef736-2359-48cc-a513-5b9fae487fb7'
reference:
'Location/347ef736-2359-48cc-a513-5b9fae487fb7' as `Location/${UUID}`
}
}
],
Expand Down Expand Up @@ -443,7 +456,8 @@ it("does not find assignment when it's in TaskHistory and status has afterwards
]
},
focus: {
reference: 'Composition/c5811d36-934d-40f9-94b4-15194d562e45'
reference:
'Composition/c5811d36-934d-40f9-94b4-15194d562e45' as `Composition/${UUID}`
},
identifier: [
{
Expand All @@ -459,13 +473,15 @@ it("does not find assignment when it's in TaskHistory and status has afterwards
{
url: 'http://opencrvs.org/specs/extension/regLastUser',
valueReference: {
reference: 'Practitioner/00000000-0000-4000-8000-000000000001'
reference:
'Practitioner/00000000-0000-4000-8000-000000000001' as `Practitioner/${UUID}`
}
},
{
url: 'http://opencrvs.org/specs/extension/regLastOffice',
valueReference: {
reference: 'Location/00000000-0000-4000-8000-000000000010'
reference:
'Location/00000000-0000-4000-8000-000000000010' as `Location/${UUID}`
}
}
],
Expand All @@ -492,7 +508,8 @@ it("does not find assignment when it's in TaskHistory and status has afterwards
]
},
focus: {
reference: 'Composition/c5811d36-934d-40f9-94b4-15194d562e45'
reference:
'Composition/c5811d36-934d-40f9-94b4-15194d562e45' as `Composition/${UUID}`
},
identifier: [
{
Expand All @@ -508,13 +525,15 @@ it("does not find assignment when it's in TaskHistory and status has afterwards
{
url: 'http://opencrvs.org/specs/extension/regLastUser',
valueReference: {
reference: 'Practitioner/00000000-0000-4000-8000-000000000002'
reference:
'Practitioner/00000000-0000-4000-8000-000000000002' as `Practitioner/${UUID}`
}
},
{
url: 'http://opencrvs.org/specs/extension/regLastOffice',
valueReference: {
reference: 'Location/00000000-0000-4000-8000-000000000010'
reference:
'Location/00000000-0000-4000-8000-000000000010' as `Location/${UUID}`
}
}
],
Expand Down Expand Up @@ -542,7 +561,8 @@ it("does not find assignment when it's in TaskHistory and status has afterwards
]
},
focus: {
reference: 'Composition/c5811d36-934d-40f9-94b4-15194d562e45'
reference:
'Composition/c5811d36-934d-40f9-94b4-15194d562e45' as `Composition/${UUID}`
},
identifier: [
{
Expand All @@ -557,13 +577,15 @@ it("does not find assignment when it's in TaskHistory and status has afterwards
{
url: 'http://opencrvs.org/specs/extension/regLastUser',
valueReference: {
reference: 'Practitioner/93e34962-cef1-446a-985f-ad0e46732939'
reference:
'Practitioner/93e34962-cef1-446a-985f-ad0e46732939' as `Practitioner/${UUID}`
}
},
{
url: 'http://opencrvs.org/specs/extension/regLastOffice',
valueReference: {
reference: 'Location/347ef736-2359-48cc-a513-5b9fae487fb7'
reference:
'Location/347ef736-2359-48cc-a513-5b9fae487fb7' as `Location/${UUID}`
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion packages/commons/src/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

import { IAuthHeader } from './http'
import * as decode from 'jwt-decode'
import decode from 'jwt-decode'

/** All the scopes user can be assigned to */
export const userScopes = {
Expand Down
2 changes: 1 addition & 1 deletion packages/commons/src/fhir/composition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ type ReferenceType =

export type CompositionSectionCode = ReferenceType['code']

type ReferenceTypeByCode<U extends CompositionSectionCode> = Extract<
export type ReferenceTypeByCode<U extends CompositionSectionCode> = Extract<
ReferenceType,
{ code: U }
>
Expand Down
8 changes: 4 additions & 4 deletions packages/commons/src/fhir/transformers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ import {
CompositionSectionTitleByCode,
EVENT_TYPE
} from '..'
import { getUUID } from '../..'
import { getUUID, UUID } from '../..'
import { replaceFromBundle } from '../../record'
import {
AddressInput,
Expand Down Expand Up @@ -508,7 +508,7 @@ function createAddressBuilder<T extends CompositionSectionCode>(
{
url: 'http://opencrvs.org/specs/extension/part-of',
valueReference: {
reference: `Location/${fieldValue}`
reference: `Location/${fieldValue as UUID}`
}
}
],
Expand Down Expand Up @@ -642,7 +642,7 @@ function createLocationAddressBuilder(
context
)

location.partOf = { reference: `Location/${fieldValue}` }
location.partOf = { reference: `Location/${fieldValue as UUID}` }
}
}
}
Expand Down Expand Up @@ -2090,7 +2090,7 @@ const builders: IFieldBuilders = {
{
url: 'http://opencrvs.org/specs/extension/part-of',
valueReference: {
reference: `Location/${fieldValue}`
reference: `Location/${fieldValue as UUID}`
}
}
],
Expand Down
Loading
Loading