From e2e7f367d53d9bcce1d3d0e123fbe62ac8a5699f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 27 May 2022 09:06:52 +0000 Subject: [PATCH 1/2] chore(devdeps): update dependency typescript to v4.7.2 --- package.json | 2 +- packages/eslint-config-react/package.json | 2 +- pnpm-lock.yaml | 84 +++++++++++------------ 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/package.json b/package.json index c24d8fef8..45ccbea16 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "rollup": "2.74.1", "rollup-plugin-dts": "4.2.2", "rollup-plugin-visualizer": "5.6.0", - "typescript": "4.6.4", + "typescript": "4.7.2", "wait-for-expect": "3.0.2" }, "scripts": { diff --git a/packages/eslint-config-react/package.json b/packages/eslint-config-react/package.json index bb768020e..37a0f8196 100644 --- a/packages/eslint-config-react/package.json +++ b/packages/eslint-config-react/package.json @@ -33,6 +33,6 @@ }, "devDependencies": { "eslint": "8.16.0", - "typescript": "4.6.4" + "typescript": "4.7.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 126b290e0..6c3eed288 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,7 +40,7 @@ importers: rollup: 2.74.1 rollup-plugin-dts: 4.2.2 rollup-plugin-visualizer: 5.6.0 - typescript: 4.6.4 + typescript: 4.7.2 wait-for-expect: 3.0.2 devDependencies: '@babel/core': 7.18.0 @@ -77,9 +77,9 @@ importers: react-dom: 18.1.0_react@18.1.0 read-pkg: 7.1.0 rollup: 2.74.1 - rollup-plugin-dts: 4.2.2_lq4dy2bb4fhoyaf2vwyb4geyfa + rollup-plugin-dts: 4.2.2_durm56y4qsrp7annnznb67puce rollup-plugin-visualizer: 5.6.0_rollup@2.74.1 - typescript: 4.6.4 + typescript: 4.7.2 wait-for-expect: 3.0.2 packages/countries: @@ -98,10 +98,10 @@ importers: eslint-plugin-jsx-a11y: 6.5.1 eslint-plugin-react: 7.30.0 eslint-plugin-react-hooks: 4.5.0 - typescript: 4.6.4 + typescript: 4.7.2 dependencies: - '@typescript-eslint/eslint-plugin': 5.26.0_gu4clceiw6ditaem5r577qrdpi - '@typescript-eslint/parser': 5.26.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/eslint-plugin': 5.26.0_hzuh7e2up357pvq3mkokjvu2lq + '@typescript-eslint/parser': 5.26.0_xztl6dhthcahlo6akmb2bmjmle eslint-config-airbnb: 19.0.4_dwfgiixbwetqupsqmiuv57rzoi eslint-config-airbnb-typescript: 17.0.0_omfmjsp36rj32txxzmcgovksfy eslint-config-prettier: 8.5.0_eslint@8.16.0 @@ -112,7 +112,7 @@ importers: eslint-plugin-react-hooks: 4.5.0_eslint@8.16.0 devDependencies: eslint: 8.16.0 - typescript: 4.6.4 + typescript: 4.7.2 packages/jest-helpers: specifiers: @@ -1604,10 +1604,10 @@ packages: '@types/node': 17.0.31 chalk: 4.1.2 cosmiconfig: 7.0.1 - cosmiconfig-typescript-loader: 2.0.0_l47be6km5p57gglrggidw5gsgm + cosmiconfig-typescript-loader: 2.0.0_x6gru2ks54jsho4brac6b5uphe lodash: 4.17.21 resolve-from: 5.0.0 - typescript: 4.6.4 + typescript: 4.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -4469,7 +4469,7 @@ packages: '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin/5.26.0_gu4clceiw6ditaem5r577qrdpi: + /@typescript-eslint/eslint-plugin/5.26.0_hzuh7e2up357pvq3mkokjvu2lq: resolution: {integrity: sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4480,23 +4480,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.26.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/parser': 5.26.0_xztl6dhthcahlo6akmb2bmjmle '@typescript-eslint/scope-manager': 5.26.0 - '@typescript-eslint/type-utils': 5.26.0_utdtartgf6fqqgkivzeynh76la - '@typescript-eslint/utils': 5.26.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/type-utils': 5.26.0_xztl6dhthcahlo6akmb2bmjmle + '@typescript-eslint/utils': 5.26.0_xztl6dhthcahlo6akmb2bmjmle debug: 4.3.4 eslint: 8.16.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.6.4 - typescript: 4.6.4 + tsutils: 3.21.0_typescript@4.7.2 + typescript: 4.7.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/parser/5.26.0_utdtartgf6fqqgkivzeynh76la: + /@typescript-eslint/parser/5.26.0_xztl6dhthcahlo6akmb2bmjmle: resolution: {integrity: sha512-n/IzU87ttzIdnAH5vQ4BBDnLPly7rC5VnjN3m0xBG82HK6rhRxnCb3w/GyWbNDghPd+NktJqB/wl6+YkzZ5T5Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4508,10 +4508,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.26.0 '@typescript-eslint/types': 5.26.0 - '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.6.4 + '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.2 debug: 4.3.4 eslint: 8.16.0 - typescript: 4.6.4 + typescript: 4.7.2 transitivePeerDependencies: - supports-color dev: false @@ -4524,7 +4524,7 @@ packages: '@typescript-eslint/visitor-keys': 5.26.0 dev: false - /@typescript-eslint/type-utils/5.26.0_utdtartgf6fqqgkivzeynh76la: + /@typescript-eslint/type-utils/5.26.0_xztl6dhthcahlo6akmb2bmjmle: resolution: {integrity: sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4534,11 +4534,11 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.26.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/utils': 5.26.0_xztl6dhthcahlo6akmb2bmjmle debug: 4.3.4 eslint: 8.16.0 - tsutils: 3.21.0_typescript@4.6.4 - typescript: 4.6.4 + tsutils: 3.21.0_typescript@4.7.2 + typescript: 4.7.2 transitivePeerDependencies: - supports-color dev: false @@ -4548,7 +4548,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: false - /@typescript-eslint/typescript-estree/5.26.0_typescript@4.6.4: + /@typescript-eslint/typescript-estree/5.26.0_typescript@4.7.2: resolution: {integrity: sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4563,13 +4563,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.6.4 - typescript: 4.6.4 + tsutils: 3.21.0_typescript@4.7.2 + typescript: 4.7.2 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/utils/5.26.0_utdtartgf6fqqgkivzeynh76la: + /@typescript-eslint/utils/5.26.0_xztl6dhthcahlo6akmb2bmjmle: resolution: {integrity: sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -4578,7 +4578,7 @@ packages: '@types/json-schema': 7.0.11 '@typescript-eslint/scope-manager': 5.26.0 '@typescript-eslint/types': 5.26.0 - '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.6.4 + '@typescript-eslint/typescript-estree': 5.26.0_typescript@4.7.2 eslint: 8.16.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.16.0 @@ -5495,7 +5495,7 @@ packages: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true - /cosmiconfig-typescript-loader/2.0.0_l47be6km5p57gglrggidw5gsgm: + /cosmiconfig-typescript-loader/2.0.0_x6gru2ks54jsho4brac6b5uphe: resolution: {integrity: sha512-2NlGul/E3vTQEANqPziqkA01vfiuUU8vT0jZAuUIjEW8u3eCcnCQWLggapCjhbF76s7KQF0fM0kXSKmzaDaG1g==} engines: {node: '>=12', npm: '>=6'} peerDependencies: @@ -5504,8 +5504,8 @@ packages: dependencies: '@types/node': 17.0.31 cosmiconfig: 7.0.1 - ts-node: 10.7.0_l47be6km5p57gglrggidw5gsgm - typescript: 4.6.4 + ts-node: 10.7.0_x6gru2ks54jsho4brac6b5uphe + typescript: 4.7.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -5966,8 +5966,8 @@ packages: eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.3 dependencies: - '@typescript-eslint/eslint-plugin': 5.26.0_gu4clceiw6ditaem5r577qrdpi - '@typescript-eslint/parser': 5.26.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/eslint-plugin': 5.26.0_hzuh7e2up357pvq3mkokjvu2lq + '@typescript-eslint/parser': 5.26.0_xztl6dhthcahlo6akmb2bmjmle eslint: 8.16.0 eslint-config-airbnb-base: 15.0.0_btspkuwbqkl4adpiufzbathtpi eslint-plugin-import: 2.26.0_grfei5yostfimvqdpf73rlhy3e @@ -6029,7 +6029,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.26.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/parser': 5.26.0_xztl6dhthcahlo6akmb2bmjmle debug: 3.2.7 eslint-import-resolver-node: 0.3.6 find-up: 2.1.0 @@ -6058,7 +6058,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.26.0_utdtartgf6fqqgkivzeynh76la + '@typescript-eslint/parser': 5.26.0_xztl6dhthcahlo6akmb2bmjmle array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 @@ -9440,7 +9440,7 @@ packages: dependencies: glob: 7.2.0 - /rollup-plugin-dts/4.2.2_lq4dy2bb4fhoyaf2vwyb4geyfa: + /rollup-plugin-dts/4.2.2_durm56y4qsrp7annnznb67puce: resolution: {integrity: sha512-A3g6Rogyko/PXeKoUlkjxkP++8UDVpgA7C+Tdl77Xj4fgEaIjPSnxRmR53EzvoYy97VMVwLAOcWJudaVAuxneQ==} engines: {node: '>=v12.22.11'} peerDependencies: @@ -9449,7 +9449,7 @@ packages: dependencies: magic-string: 0.26.2 rollup: 2.74.1 - typescript: 4.6.4 + typescript: 4.7.2 optionalDependencies: '@babel/code-frame': 7.16.7 dev: true @@ -10072,7 +10072,7 @@ packages: engines: {node: '>=8'} dev: true - /ts-node/10.7.0_l47be6km5p57gglrggidw5gsgm: + /ts-node/10.7.0_x6gru2ks54jsho4brac6b5uphe: resolution: {integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==} hasBin: true peerDependencies: @@ -10098,7 +10098,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.6.4 + typescript: 4.7.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -10118,14 +10118,14 @@ packages: /tslib/2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} - /tsutils/3.21.0_typescript@4.6.4: + /tsutils/3.21.0_typescript@4.7.2: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.6.4 + typescript: 4.7.2 dev: false /type-check/0.3.2: @@ -10190,8 +10190,8 @@ packages: resolution: {integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=} dev: true - /typescript/4.6.4: - resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==} + /typescript/4.7.2: + resolution: {integrity: sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==} engines: {node: '>=4.2.0'} hasBin: true From 0d6d84d5f560adfe2bb81e6913e8062c58235f01 Mon Sep 17 00:00:00 2001 From: Emmanuel Chambon Date: Fri, 27 May 2022 11:18:29 +0200 Subject: [PATCH 2/2] fix: correct use-i18n types --- packages/use-i18n/src/formatDate.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/use-i18n/src/formatDate.ts b/packages/use-i18n/src/formatDate.ts index 220d143e6..51f5bb518 100644 --- a/packages/use-i18n/src/formatDate.ts +++ b/packages/use-i18n/src/formatDate.ts @@ -31,7 +31,7 @@ const formatOptions = { month: 'short', year: 'numeric', }, -} +} as const const complexFormatOptions = { // Expected output format: 2020-02-13 @@ -40,10 +40,10 @@ const complexFormatOptions = { numericHour: (date: Date, locale: string): string => `${formatISO(date, { representation: 'date' })} ${intlFormat( date, - formatOptions.hourOnly as Intl.DateTimeFormatOptions, + formatOptions.hourOnly, { locale }, )}`, -} +} as const export const supportedFormats = [ ...Object.keys(formatOptions), @@ -87,7 +87,7 @@ const formatDate = ( : format if (properDate instanceof Date) { - return intlFormat(properDate, options as Intl.DateTimeFormatOptions, { + return intlFormat(properDate, options as Parameters[1], { locale, }) }