From 59bc687de0264ab866c67368a77436bd6b424e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Be=C3=B1at=20Espi=C3=B1a?= Date: Fri, 28 Dec 2018 18:15:16 +0100 Subject: [PATCH 1/2] Upgraded all dependencies removing alpha and beta versions --- .eslintrc.js | 8 +++++++- CHANGELOG.md | 4 +++- package.json | 34 +++++++++++++++++----------------- src/renderTranslatedRoutes.js | 8 -------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 90fbcae..8c6fde2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,6 +30,12 @@ module.exports = { 'templateStrings': true, }, }, + "settings": { + "react": { + "version": "16.3", + }, + "propWrapperFunctions": ["forbidExtraProps"] + }, 'plugins': ['react', 'class-property', 'babel', 'prettier'], 'rules': { 'arrow-body-style': 'off', @@ -58,7 +64,7 @@ module.exports = { 'max-depth': ['warn', 4], 'max-len': ['error', 120], 'max-nested-callbacks': ['warn', 2], - 'max-params': ['warn', 4], + 'max-params': ['warn', 5], 'max-statements': ['off', 10], 'new-cap': 'error', 'new-parens': 'error', diff --git a/CHANGELOG.md b/CHANGELOG.md index 199aa58..78bec34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,11 @@ To get the diff between two versions, go to https://github.com/FriendsOfECMAScri - 0.8.0 - React new Context API is now used to manage state - Decoupled from `react-intl` and `react-redux` - - Added React component testing using `react-testing-library` - [BC BREAK] Removed bridges for redux, browser, in-memory and local storage. - [BC BREAK] Removed support for React and ReactDOM < 16.3 (Context API is not supported in those versions) + - Added React component testing using `react-testing-library` + - Increased the test code coverage + - Upgraded all dependencies removing alpha and beta versions - 0.7.0 - Added support for using an string-array as the path property as `react-router` does. - 0.6.0 diff --git a/package.json b/package.json index 48d10af..0f4db2b 100644 --- a/package.json +++ b/package.json @@ -99,29 +99,29 @@ } }, "dependencies": { - "@babel/preset-env": "^7.0.0-beta.49", - "@babel/preset-react": "^7.0.0-beta.49", - "babel-preset-minify": "^0.5.0-alpha.a28b6b00" + "@babel/preset-env": "^7.2.3", + "@babel/preset-react": "^7.0.0", + "babel-preset-minify": "^0.5.0" }, "devDependencies": { - "@babel/cli": "^7.0.0-beta.49", - "@babel/core": "^7.0.0-beta.51", - "@babel/plugin-proposal-class-properties": "^7.0.0-beta.49", - "@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.49", - "@babel/plugin-transform-modules-commonjs": "^7.0.0-beta.49", + "@babel/cli": "^7.2.3", + "@babel/core": "^7.2.2", + "@babel/plugin-proposal-class-properties": "^7.2.3", + "@babel/plugin-proposal-object-rest-spread": "^7.2.0", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", "babel-core": "^7.0.0-0", - "babel-eslint": "^8.2.3", - "babel-jest": "^23.0.1", - "eslint": "^4.19.1", - "eslint-plugin-babel": "^5.1.0", + "babel-eslint": "^8.2.6", + "babel-jest": "^23.6.0", + "eslint": "^5.11.1", + "eslint-plugin-babel": "^5.3.0", "eslint-plugin-class-property": "^1.1.0", - "eslint-plugin-prettier": "^3.0.0", - "eslint-plugin-react": "^7.9.1", - "jest": "^23.1.0", + "eslint-plugin-prettier": "^3.0.1", + "eslint-plugin-react": "^7.12.0", + "jest": "^23.6.0", "mkdirp": "^0.5.1", "npm-install-peers": "^1.2.1", - "prettier": "^1.10.2", - "react-testing-library": "^5.3.2", + "prettier": "^1.15.3", + "react-testing-library": "^5.4.2", "regenerator-runtime": "^0.11.1", "rimraf": "^2.6.2" }, diff --git a/src/renderTranslatedRoutes.js b/src/renderTranslatedRoutes.js index fcb3033..73d6a35 100644 --- a/src/renderTranslatedRoutes.js +++ b/src/renderTranslatedRoutes.js @@ -9,7 +9,6 @@ import flatMap from 'lodash.flatmap'; -// eslint-disable-next-line max-params const getRouteConfig = (configRoute, locale, currentLocale, pathFromRouteForPathsAndLocale) => { const {paths, ...configRouteRest} = configRoute; @@ -21,9 +20,7 @@ const getRouteConfig = (configRoute, locale, currentLocale, pathFromRouteForPath getRouteConfigForLocale = (configRoute, currentLocale, pathFromRouteForPathsAndLocale) => locale => getRouteConfig(configRoute, locale, currentLocale, pathFromRouteForPathsAndLocale); -// eslint-disable-next-line max-params const renderTranslatedRoutesForLocales = ( - configRoute, routes, locales, currentLocale, @@ -45,16 +42,13 @@ const renderTranslatedRoutesForLocales = ( ); }), ), - // eslint-disable-next-line max-params renderTranslatedRoutesForConfig = ( - configRoute, routes, currentLocale, pathFromRouteForPathsAndLocale, getRouteConfigForCurrentLocale, ) => locales => renderTranslatedRoutesForLocales( - configRoute, routes, locales, currentLocale, @@ -62,7 +56,6 @@ const renderTranslatedRoutesForLocales = ( getRouteConfigForCurrentLocale, ); -// eslint-disable-next-line max-params const renderTranslatedRoutes = (locales, routes, pathFromRouteForPathsAndLocale) => currentLocale => ( config, iterationLocale, @@ -75,7 +68,6 @@ const renderTranslatedRoutes = (locales, routes, pathFromRouteForPathsAndLocale) pathFromRouteForPathsAndLocale, ), renderTranslatedRoutesForCurrentConfig = renderTranslatedRoutesForConfig( - configRoute, routes, currentLocale, pathFromRouteForPathsAndLocale, From 36e1597b6aeaccfad30a4892e0474076f7033421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Be=C3=B1at=20Espi=C3=B1a?= Date: Wed, 2 Jan 2019 10:42:16 +0100 Subject: [PATCH 2/2] Reverted unused parameter removal --- CHANGELOG.md | 15 ++++++++------- src/renderTranslatedRoutes.js | 6 ++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78bec34..759f939 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,16 +3,17 @@ This changelog references the relevant changes done between versions. To get the diff for a specific change, go to https://github.com/FriendsOfECMAScript/ReactI18nRouting/commit/XXX where XXX is the change hash -To get the diff between two versions, go to https://github.com/FriendsOfECMAScript/ReactI18nRouting/compare/v0.4.0...v0.5.0 +To get the diff between two versions, go to https://github.com/FriendsOfECMAScript/ReactI18nRouting/compare/v0.7.0...v0.8.0 +- 0.9.0 (future release) + - Upgraded all dependencies removing alpha and beta versions. - 0.8.0 - - React new Context API is now used to manage state - - Decoupled from `react-intl` and `react-redux` + - React new Context API is now used to manage state. + - Decoupled from `react-intl` and `react-redux`. - [BC BREAK] Removed bridges for redux, browser, in-memory and local storage. - - [BC BREAK] Removed support for React and ReactDOM < 16.3 (Context API is not supported in those versions) - - Added React component testing using `react-testing-library` - - Increased the test code coverage - - Upgraded all dependencies removing alpha and beta versions + - [BC BREAK] Removed support for React and ReactDOM < 16.3 (Context API is not supported in those versions). + - Added React component testing using `react-testing-library`. + - Increased test code coverage. - 0.7.0 - Added support for using an string-array as the path property as `react-router` does. - 0.6.0 diff --git a/src/renderTranslatedRoutes.js b/src/renderTranslatedRoutes.js index 73d6a35..1fcd6eb 100644 --- a/src/renderTranslatedRoutes.js +++ b/src/renderTranslatedRoutes.js @@ -20,7 +20,9 @@ const getRouteConfig = (configRoute, locale, currentLocale, pathFromRouteForPath getRouteConfigForLocale = (configRoute, currentLocale, pathFromRouteForPathsAndLocale) => locale => getRouteConfig(configRoute, locale, currentLocale, pathFromRouteForPathsAndLocale); +/* eslint-disable max-params */ const renderTranslatedRoutesForLocales = ( + configRoute, routes, locales, currentLocale, @@ -43,18 +45,21 @@ const renderTranslatedRoutesForLocales = ( }), ), renderTranslatedRoutesForConfig = ( + configRoute, routes, currentLocale, pathFromRouteForPathsAndLocale, getRouteConfigForCurrentLocale, ) => locales => renderTranslatedRoutesForLocales( + configRoute, routes, locales, currentLocale, pathFromRouteForPathsAndLocale, getRouteConfigForCurrentLocale, ); +/* eslint-enable max-params */ const renderTranslatedRoutes = (locales, routes, pathFromRouteForPathsAndLocale) => currentLocale => ( config, @@ -68,6 +73,7 @@ const renderTranslatedRoutes = (locales, routes, pathFromRouteForPathsAndLocale) pathFromRouteForPathsAndLocale, ), renderTranslatedRoutesForCurrentConfig = renderTranslatedRoutesForConfig( + configRoute, routes, currentLocale, pathFromRouteForPathsAndLocale,