From ca9b952dffb873ee33ad7d409d7066fbefd9d399 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sun, 9 May 2021 19:15:57 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20MAJ=20Typescript=20vers=20?= =?UTF-8?q?4.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mon-entreprise/package.json | 2 +- .../source/components/NewsletterRegister.tsx | 11 ++++---- .../components/conversation/Question.tsx | 4 +-- .../components/layout/Footer/Footer.css | 2 +- .../source/locales/translateRules.ts | 8 +++--- package.json | 2 +- publicodes/core/package.json | 2 +- publicodes/ui-react/package.json | 2 +- yarn.lock | 27 ++++++------------- 9 files changed, 25 insertions(+), 35 deletions(-) diff --git a/mon-entreprise/package.json b/mon-entreprise/package.json index d5eda7044..082b67898 100644 --- a/mon-entreprise/package.json +++ b/mon-entreprise/package.json @@ -35,7 +35,7 @@ "@types/react-router": "^5.1.2", "@types/recharts": "^1.8.16", "@types/redux-sentry-middleware": "^0.1.2", - "@types/styled-components": "^5.1.4", + "@types/styled-components": "^5.1.9", "@types/webpack": "^4.41.10", "@typescript-eslint/eslint-plugin": "^4.0.1", "@typescript-eslint/parser": "^4.0.1", diff --git a/mon-entreprise/source/components/NewsletterRegister.tsx b/mon-entreprise/source/components/NewsletterRegister.tsx index 3df737bab..8d40d7bab 100644 --- a/mon-entreprise/source/components/NewsletterRegister.tsx +++ b/mon-entreprise/source/components/NewsletterRegister.tsx @@ -19,7 +19,7 @@ export default function NewsletterRegister() { ) const formElement = useRef(null) const [userJustRegistered, setUserJustRegistered] = useState(false) - const { t, i18n } = useTranslation() + const { i18n } = useTranslation() const onSubmit = (evt: React.FormEvent) => { evt.preventDefault() @@ -85,12 +85,13 @@ export default function NewsletterRegister() {
- + className="ui__ plain small button" + > + S'inscrire +
diff --git a/mon-entreprise/source/components/conversation/Question.tsx b/mon-entreprise/source/components/conversation/Question.tsx index 16cda9f1f..af72e267b 100644 --- a/mon-entreprise/source/components/conversation/Question.tsx +++ b/mon-entreprise/source/components/conversation/Question.tsx @@ -175,8 +175,8 @@ export default function Question({ } const choiceElements = Array.isArray(choices) - ? renderBinaryQuestion(choices) - : renderChildren(choices) + ? renderBinaryQuestion((choices as unknown) as typeof binaryQuestion) + : renderChildren(choices as Choice) return (
input[type='submit'] { +.footer__registerField > button[type='submit'] { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; margin: -1px !important; diff --git a/mon-entreprise/source/locales/translateRules.ts b/mon-entreprise/source/locales/translateRules.ts index ea5b354c1..c4c5f9c46 100644 --- a/mon-entreprise/source/locales/translateRules.ts +++ b/mon-entreprise/source/locales/translateRules.ts @@ -69,11 +69,11 @@ function translateRule( ) } -export default function translateRules( +export default function translateRules( lang: string, - translations: Record, - rules: Record -): Record { + translations: Record, + rules: Record +): Record { const translatedRules = mapObjIndexed( (rule: Rule, name: string) => translateRule(lang, translations, name, rule), rules diff --git a/package.json b/package.json index 4794f1b46..cea2fb1ba 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "style-loader": "^0.23.1", "terser-webpack-plugin": "^3.0.2", "toml-loader": "^1.0.0", - "typescript": "^4.1.0", + "typescript": "^4.2.4", "url-loader": "^4.1.0", "webpack": "^4.42.0", "webpack-bundle-analyzer": "^3.7.0", diff --git a/publicodes/core/package.json b/publicodes/core/package.json index 13dd25438..c1408a8db 100644 --- a/publicodes/core/package.json +++ b/publicodes/core/package.json @@ -27,7 +27,7 @@ "devDependencies": { "chai": "^4.2.0", "intl": "^1.2.5", - "typescript": "3.4.3", + "typescript": "^4.2.4", "dedent-js": "1.0.1", "@dagrejs/graphlib": "^2.1.4" }, diff --git a/publicodes/ui-react/package.json b/publicodes/ui-react/package.json index 959b93613..edad380e8 100644 --- a/publicodes/ui-react/package.json +++ b/publicodes/ui-react/package.json @@ -33,6 +33,6 @@ }, "devDependencies": { "js-yaml": "^4.0.0", - "typescript": "^4.1.3" + "typescript": "^4.2.4" } } diff --git a/yarn.lock b/yarn.lock index ff696c845..5c6ef5836 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2568,14 +2568,13 @@ "@types/react-native" "*" csstype "^3.0.2" -"@types/styled-components@^5.1.4": - version "5.1.4" - resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.1.4.tgz#11f167dbde268635c66adc89b5a5db2e69d75384" - integrity sha512-78f5Zuy0v/LTQNOYfpH+CINHpchzMMmAt9amY2YNtSgsk1TmlKm8L2Wijss/mtTrsUAVTm2CdGB8VOM65vA8xg== +"@types/styled-components@^5.1.9": + version "5.1.9" + resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-5.1.9.tgz#00d3d84b501420521c4db727e3c195459f87a6cf" + integrity sha512-kbEG6YlwK8rucITpKEr6pA4Ho9KSQHUUOzZ9lY3va1mtcjvS3D0wDciFyHEiNHKLL/npZCKDQJqm0x44sPO9oA== dependencies: "@types/hoist-non-react-statics" "*" "@types/react" "*" - "@types/react-native" "*" csstype "^3.0.2" "@types/tapable@*": @@ -13423,25 +13422,15 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@3.4.3: - version "3.4.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.3.tgz#0eb320e4ace9b10eadf5bc6103286b0f8b7c224f" - integrity sha512-FFgHdPt4T/duxx6Ndf7hwgMZZjZpB+U0nMNGVCYPq0rEzWKjEDobm4J6yb3CS7naZ0yURFqdw9Gwc7UOh/P9oQ== - typescript@^3.6.4: version "3.9.7" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== -typescript@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.2.tgz#6369ef22516fe5e10304aae5a5c4862db55380e9" - integrity sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== - -typescript@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" - integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== +typescript@^4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961" + integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg== uglify-js@3.4.x: version "3.4.10"