From 997e1246a8c764282b61e2c4295c4c00475a97b9 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Tue, 17 Apr 2018 16:45:32 +0200 Subject: [PATCH 1/3] Remove the i18n babel module resolver, @wordpress/i18n is now pulled from the git repository --- .babelrc | 7 ++-- gutenberg | 2 +- jest.config.js | 1 - yarn.lock | 94 +++++++++++++++++--------------------------------- 4 files changed, 38 insertions(+), 66 deletions(-) diff --git a/.babelrc b/.babelrc index 8b6ed031b14ae3..bb5f98c5b2b64a 100644 --- a/.babelrc +++ b/.babelrc @@ -10,7 +10,6 @@ "alias": { "@wordpress/element": "./gutenberg/element", "@wordpress/hooks": "./wordpress/hooks", - "@wordpress/i18n": "./gutenberg/i18n", "@wordpress/utils": "./gutenberg/utils", "@gutenberg": "./gutenberg" }, @@ -26,7 +25,11 @@ [ "react-native-platform-specific-extensions", { - "extensions": ["css", "scss", "sass"] + "extensions": [ + "css", + "scss", + "sass" + ] } ] ], diff --git a/gutenberg b/gutenberg index 737a4989899471..6cc5db35de29fb 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 737a4989899471fceead2a9bef0952e196a9e163 +Subproject commit 6cc5db35de29fb93e5c98a5fa8ae52d1766d5287 diff --git a/jest.config.js b/jest.config.js index aa929978194a1b..29bdd94169ca49 100644 --- a/jest.config.js +++ b/jest.config.js @@ -30,7 +30,6 @@ module.exports = { moduleNameMapper: { '@wordpress/element': '/gutenberg/element', '@wordpress/hooks': '/wordpress/hooks', - '@wordpress/i18n': '/gutenberg/i18n', '@wordpress/utils': '/gutenberg/utils', '@gutenberg': '/gutenberg', diff --git a/yarn.lock b/yarn.lock index 5a78de5cc772cd..74e885c5722bec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@babel/code-frame@7.0.0-beta.44", "@babel/code-frame@^7.0.0-beta.35", "@babel/code-frame@^7.0.0-beta.40": +"@babel/code-frame@7.0.0-beta.44", "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" dependencies: @@ -55,7 +55,7 @@ babylon "7.0.0-beta.44" lodash "^4.2.0" -"@babel/traverse@^7.0.0-beta.40": +"@babel/traverse@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.44.tgz#a970a2c45477ad18017e2e465a0606feee0d2966" dependencies: @@ -70,7 +70,7 @@ invariant "^2.2.0" lodash "^4.2.0" -"@babel/types@7.0.0-beta.44", "@babel/types@^7.0.0-beta.40": +"@babel/types@7.0.0-beta.44": version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.44.tgz#6b1b164591f77dec0a0342aca995f2d046b3a757" dependencies: @@ -79,15 +79,14 @@ to-fast-properties "^2.0.0" "@types/node@*": - version "9.6.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.4.tgz#0ef7b4cfc3499881c81e0ea1ce61a23f6f4f5b42" + version "9.6.5" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.5.tgz#ee700810fdf49ac1c399fc5980b7559b3e5a381d" "@wordpress/babel-preset-default@^1.1.2": - version "1.1.3" - resolved "https://registry.yarnpkg.com/@wordpress/babel-preset-default/-/babel-preset-default-1.1.3.tgz#254f5ce1d92367a9c2cd18c550f00c7e017826a7" + version "1.2.0" + resolved "https://registry.yarnpkg.com/@wordpress/babel-preset-default/-/babel-preset-default-1.2.0.tgz#33e406f90a18e2535246e82da22c9f13e65f7848" dependencies: "@wordpress/browserslist-config" "^2.1.3" - babel-plugin-lodash "^3.3.2" babel-plugin-transform-object-rest-spread "^6.23.0" babel-plugin-transform-react-jsx "^6.24.1" babel-plugin-transform-runtime "^6.23.0" @@ -448,13 +447,13 @@ babel-core@^6.0.0, babel-core@^6.24.1, babel-core@^6.26.0, babel-core@^6.7.2: source-map "^0.5.6" babel-eslint@^8.2.2: - version "8.2.2" - resolved "http://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.2.tgz#1102273354c6f0b29b4ea28a65f97d122296b68b" + version "8.2.3" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.2.3.tgz#1a2e6681cc9bc4473c32899e59915e19cd6733cf" dependencies: - "@babel/code-frame" "^7.0.0-beta.40" - "@babel/traverse" "^7.0.0-beta.40" - "@babel/types" "^7.0.0-beta.40" - babylon "^7.0.0-beta.40" + "@babel/code-frame" "7.0.0-beta.44" + "@babel/traverse" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" eslint-scope "~3.7.1" eslint-visitor-keys "^1.0.0" @@ -537,13 +536,6 @@ babel-helper-hoist-variables@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" -babel-helper-module-imports@^7.0.0-beta.3: - version "7.0.0-beta.3" - resolved "https://registry.yarnpkg.com/babel-helper-module-imports/-/babel-helper-module-imports-7.0.0-beta.3.tgz#e15764e3af9c8e11810c09f78f498a2bdc71585a" - dependencies: - babel-types "7.0.0-beta.3" - lodash "^4.2.0" - babel-helper-optimise-call-expression@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" @@ -625,16 +617,6 @@ babel-plugin-jest-hoist@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.4.3.tgz#7d8bcccadc2667f96a0dcc6afe1891875ee6c14a" -babel-plugin-lodash@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/babel-plugin-lodash/-/babel-plugin-lodash-3.3.2.tgz#da3a5b49ba27447f54463f6c4fa81396ccdd463f" - dependencies: - babel-helper-module-imports "^7.0.0-beta.3" - babel-types "^6.26.0" - glob "^7.1.1" - lodash "^4.17.4" - require-package-name "^2.0.1" - babel-plugin-module-resolver@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-3.1.1.tgz#881cf67e3d4b8400d5eaaefc1be44d2dc1fe404f" @@ -1260,14 +1242,6 @@ babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@7.0.0-beta.3: - version "7.0.0-beta.3" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-7.0.0-beta.3.tgz#cd927ca70e0ae8ab05f4aab83778cfb3e6eb20b4" - dependencies: - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^2.0.0" - babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" @@ -1281,7 +1255,7 @@ babylon@7.0.0-beta.34: version "7.0.0-beta.34" resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.34.tgz#2ccdf97bb4fbc1617619a030a6c0390b2c8f16d6" -babylon@7.0.0-beta.44, babylon@^7.0.0-beta.40: +babylon@7.0.0-beta.44: version "7.0.0-beta.44" resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.44.tgz#89159e15e6e30c5096e22d738d8c0af8a0e8ca1d" @@ -1290,8 +1264,8 @@ babylon@^6.18.0: resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" bail@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.2.tgz#f7d6c1731630a9f9f0d4d35ed1f962e2074a1764" + version "1.0.3" + resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.3.tgz#63cfb9ddbac829b02a3128cd53224be78e6c21a3" balanced-match@^1.0.0: version "1.0.0" @@ -1535,8 +1509,8 @@ camelcase@^3.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" caniuse-lite@^1.0.30000792: - version "1.0.30000828" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000828.tgz#048f98de213f7a3c047bf78a9523c611855d4fdd" + version "1.0.30000830" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000830.tgz#cb96b8a2dd3cbfe04acea2af3c4e894249095328" caseless@~0.11.0: version "0.11.0" @@ -1572,8 +1546,8 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: supports-color "^2.0.0" chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" + version "2.4.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.0.tgz#a060a297a6b57e15b61ca63ce84995daa0fe6e52" dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" @@ -1682,8 +1656,8 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" collapse-white-space@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.3.tgz#4b906f670e5a963a87b76b0e1689643341b6023c" + version "1.0.4" + resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.4.tgz#ce05cf49e54c3277ae573036a26851ba430a0091" collection-visit@^1.0.0: version "1.0.0" @@ -2324,8 +2298,8 @@ eslint-config-wordpress@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-config-wordpress/-/eslint-config-wordpress-2.0.0.tgz#5201206c6964d648315232edf6dfbd2e925e4cd6" eslint-plugin-flowtype@^2.46.1: - version "2.46.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.46.1.tgz#c4f81d580cd89c82bc3a85a1ccf4ae3a915143a4" + version "2.46.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.46.2.tgz#8749fddda6f6c30d0672011151bea726765b5753" dependencies: lodash "^4.15.0" @@ -4097,8 +4071,8 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jsdom@^11.5.1: - version "11.7.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.7.0.tgz#8b45b657dae90d6d2d3a5f5d1126bb7102d0a172" + version "11.8.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.8.0.tgz#a52e9a7d2b931284f62c80dad5f17d7390499d8b" dependencies: abab "^1.0.4" acorn "^5.3.0" @@ -5490,8 +5464,8 @@ react-devtools-core@3.0.0: ws "^2.0.3" react-dom@^16.2.0: - version "16.3.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.3.1.tgz#6a3c90a4fb62f915bdbcf6204422d93a7d4ca573" + version "16.3.2" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.3.2.tgz#cb90f107e09536d683d84ed5d4888e9640e0e4df" dependencies: fbjs "^0.8.16" loose-envify "^1.1.0" @@ -5948,10 +5922,6 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -require-package-name@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/require-package-name/-/require-package-name-2.0.1.tgz#c11e97276b65b8e2923f75dabf5fb2ef0c3841b9" - require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" @@ -6580,8 +6550,8 @@ supports-color@^4.0.0: has-flag "^2.0.0" supports-color@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: has-flag "^3.0.0" @@ -6734,8 +6704,8 @@ trim@0.0.1: resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" trough@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.1.tgz#a9fd8b0394b0ae8fff82e0633a0a36ccad5b5f86" + version "1.0.2" + resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.2.tgz#7f1663ec55c480139e2de5e486c6aef6cc24a535" "true-case-path@^1.0.2": version "1.0.2" From 2fc5205ebf01669165275c2fcdc84efc75d3587f Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Tue, 17 Apr 2018 16:59:18 +0200 Subject: [PATCH 2/3] Add exception to .flowconfig for gutenberg/node_modules/editions/es2015 --- .flowconfig | 1 + gutenberg | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.flowconfig b/.flowconfig index e9f87627226ce2..cc49efb8239b54 100644 --- a/.flowconfig +++ b/.flowconfig @@ -50,6 +50,7 @@ /gutenberg/node_modules/findup/.* /gutenberg/node_modules/cypress/.* /gutenberg/node_modules/config-chain/.* +/gutenberg/node_modules/editions/es2015/.* ; Mirror some ignores from Gutenberg tools /node_modules/config-chain/.* diff --git a/gutenberg b/gutenberg index 6cc5db35de29fb..49ceaa8c29e908 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 6cc5db35de29fb93e5c98a5fa8ae52d1766d5287 +Subproject commit 49ceaa8c29e9087c7af33e7e3bf8d2722f543914 From 49d72cac271718fa8f67bd450fd07bbc2d5e7a2c Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Tue, 17 Apr 2018 19:06:01 +0300 Subject: [PATCH 3/3] Need to have the i18n dep included --- package.json | 1 + yarn.lock | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 099f241e575586..22bed55255deb8 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "lint:fix": "eslint $npm_package_config_jsfiles --fix" }, "dependencies": { + "@wordpress/i18n": "^1.1.0", "babel-plugin-module-resolver": "^3.1.0", "classnames": "^2.2.5", "jed": "^1.1.1", diff --git a/yarn.lock b/yarn.lock index 74e885c5722bec..719de0a488ffd2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -96,6 +96,15 @@ version "2.1.3" resolved "https://registry.yarnpkg.com/@wordpress/browserslist-config/-/browserslist-config-2.1.3.tgz#3224c58f8bbec9d9fd88079c6ed31947080e6c57" +"@wordpress/i18n@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@wordpress/i18n/-/i18n-1.1.0.tgz#05ccae6eb220197a759fbbe4e94b010aa69f19fe" + dependencies: + gettext-parser "^1.3.1" + jed "^1.1.1" + lodash "^4.17.5" + memize "^1.0.5" + abab@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" @@ -2216,7 +2225,7 @@ encodeurl@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" -encoding@^0.1.11: +encoding@^0.1.11, encoding@^0.1.12: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" dependencies: @@ -2943,6 +2952,13 @@ getpass@^0.1.1: dependencies: assert-plus "^1.0.0" +gettext-parser@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/gettext-parser/-/gettext-parser-1.3.1.tgz#74b7a99e4b5fa8daab11fa515e8a582480448a12" + dependencies: + encoding "^0.1.12" + safe-buffer "^5.1.1" + glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"