From 3f65beafccc80dc6ae743e8e288d6bd2913f86f9 Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Thu, 20 Sep 2018 20:42:55 +0300 Subject: [PATCH 1/2] Updated to GB master that includes mobile as a submodule --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index f8747043e85bd7..dd25c7d0925221 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit f8747043e85bd7c1dd643e978b0a92dc2fb84eaa +Subproject commit dd25c7d09252219993331f99a1af9c502420a139 From ccdbf58fa6e6970ae492d2f44ad931345836ec68 Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Thu, 20 Sep 2018 20:53:14 +0300 Subject: [PATCH 2/2] Need to ignore the deeply nested mobile submodule dir It's unfortunate that with the current (temporary) situation, there is a cyclic dependency between the mobile and web submodules, ending up in the mobile submodule re-appering inside the already nested Gutenberg dorectory. Until we break the circle, we need to ignore that deeply nested mobile code tree, otherwise both Metro and Jest complain for duplicate packages/modules. --- jest.config.js | 8 +++++++- rn-cli.config.js | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index f458299fb3f268..840c00dc7b9f0b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -15,7 +15,12 @@ module.exports = { verbose: true, preset: 'jest-react-native', testEnvironment: 'jsdom', - testPathIgnorePatterns: [ '/node_modules/', '/gutenberg/test/', '/gutenberg/packages/' ], + testPathIgnorePatterns: [ + '/node_modules/', + '/gutenberg/gutenberg-mobile/', + '/gutenberg/test/', + '/gutenberg/packages/', + ], moduleFileExtensions: [ 'native.js', 'android.js', @@ -31,6 +36,7 @@ module.exports = { 'jsx', 'node', ], + modulePathIgnorePatterns: [ '/gutenberg/gutenberg-mobile' ], moduleNameMapper: { '@wordpress\\/(block-serialization-default-parser|blocks|data|element|deprecated|editor|block-library|components|keycodes|url|a11y|viewport|core-data|api-fetch|nux)$': '/gutenberg/packages/$1/src/index', diff --git a/rn-cli.config.js b/rn-cli.config.js index 10fe819e20f93d..2cab5ae0491bc7 100644 --- a/rn-cli.config.js +++ b/rn-cli.config.js @@ -10,6 +10,7 @@ module.exports = { // are automagically resolved by Metro so, there is no list of them anywhere. return blacklist( [ /gutenberg\/packages\/(autop|compose|deprecated|hooks|i18n|is-shallow-equal|blob|redux-routine)\/.*/, + /gutenberg\/gutenberg-mobile\/.*/, ] ); }, getTransformModulePath() {