From 94f3fe21096602dd9e799b09de32afea9caa10a6 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 15 Aug 2018 10:17:27 +0100 Subject: [PATCH 01/20] Add components to flow list. --- .flowconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/.flowconfig b/.flowconfig index 920bfb4396731..78d0efc47499f 100644 --- a/.flowconfig +++ b/.flowconfig @@ -87,6 +87,7 @@ module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|we module.name_mapper='@gutenberg' -> '/gutenberg' module.name_mapper='@wordpress/blocks' -> '/gutenberg/packages/blocks/src' module.name_mapper='@wordpress/element' -> '/gutenberg/packages/element/src' +module.name_mapper='@wordpress/components' -> '/gutenberg/packages/components/src' ; mock/ignore style files module.name_mapper='.*\(.scss\)' -> 'empty/object' From e3f99fe25758718cd12f8cf47936efea14c7c71a Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 15 Aug 2018 10:17:57 +0100 Subject: [PATCH 02/20] Add Svg library to the project. --- android/app/build.gradle | 1 + .../java/com/gutenberg/MainApplication.java | 2 + android/settings.gradle | 2 + ios/gutenberg.xcodeproj/project.pbxproj | 73 ++++++++++++++++++- package.json | 1 + yarn.lock | 40 +++++++++- 6 files changed, 116 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 9858d93b9fc22..87e50c1e5d4fe 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -158,6 +158,7 @@ repositories { } dependencies { + compile project(':react-native-svg') implementation project(':react-native-aztec') implementation project(':react-native-recyclerview-list') // compile fileTree(dir: "libs", include: ["*.jar"]) diff --git a/android/app/src/main/java/com/gutenberg/MainApplication.java b/android/app/src/main/java/com/gutenberg/MainApplication.java index 418c99c1418d8..dbb6fd866dbf5 100644 --- a/android/app/src/main/java/com/gutenberg/MainApplication.java +++ b/android/app/src/main/java/com/gutenberg/MainApplication.java @@ -3,6 +3,7 @@ import android.app.Application; import com.facebook.react.ReactApplication; +import com.horcrux.svg.SvgPackage; import org.wordpress.mobile.ReactNativeAztec.ReactAztecPackage; import com.github.godness84.RNRecyclerViewList.RNRecyclerviewListPackage; import com.facebook.react.ReactNativeHost; @@ -25,6 +26,7 @@ public boolean getUseDeveloperSupport() { protected List getPackages() { return Arrays.asList( new MainReactPackage(), + new SvgPackage(), new ReactAztecPackage(), new RNRecyclerviewListPackage() ); diff --git a/android/settings.gradle b/android/settings.gradle index 979767c6b7f91..42be4a60f8dd4 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,4 +1,6 @@ rootProject.name = 'gutenberg' +include ':react-native-svg' +project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android') include ':react-native-aztec' project(':react-native-aztec').projectDir = new File(rootProject.projectDir, '../react-native-aztec/android') include ':react-native-recyclerview-list' diff --git a/ios/gutenberg.xcodeproj/project.pbxproj b/ios/gutenberg.xcodeproj/project.pbxproj index 4c467a881c551..b640db4d25154 100644 --- a/ios/gutenberg.xcodeproj/project.pbxproj +++ b/ios/gutenberg.xcodeproj/project.pbxproj @@ -33,8 +33,10 @@ 2DF0FFEE2056DD460020B375 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; }; 5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; + 8C666FF0C9224FB88C2C0447 /* libRNSVG-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9BFAFEB337654221B2F14D03 /* libRNSVG-tvOS.a */; }; ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; }; CF45443564B845C8BDCFBAB6 /* libRNTAztecView.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3ADEFEC092CF4D00BEF1019E /* libRNTAztecView.a */; }; + DD2AE937473A49B2B5A0E7B6 /* libRNSVG.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EB766FE2F6D446A80AC6E6A /* libRNSVG.a */; }; F1289ECB2100E4320091E81D /* Aztec.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F1289ECA2100E4320091E81D /* Aztec.framework */; }; F151983B2100DC3D000F6E97 /* BridgeDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F15198382100DC3C000F6E97 /* BridgeDelegate.swift */; }; F151983C2100DC3D000F6E97 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F15198392100DC3D000F6E97 /* AppDelegate.swift */; }; @@ -323,6 +325,20 @@ remoteGlobalIDString = F145CFC62087D16A006C159A; remoteInfo = RNTAztecView; }; + FFEDF71821241BDF007FCC6D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9B18D59B9364468890D0E546 /* RNSVG.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 0CF68AC11AF0540F00FF9E5C; + remoteInfo = RNSVG; + }; + FFEDF71A21241BDF007FCC6D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 9B18D59B9364468890D0E546 /* RNSVG.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 94DDAC5C1F3D024300EED511; + remoteInfo = "RNSVG-tvOS"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -348,6 +364,7 @@ 00E356EE1AD99517003FC87E /* gutenbergTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = gutenbergTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* gutenbergTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = gutenbergTests.m; sourceTree = ""; }; + 0EB766FE2F6D446A80AC6E6A /* libRNSVG.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSVG.a; sourceTree = ""; }; 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* gutenberg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = gutenberg.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -362,6 +379,8 @@ 5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; + 9B18D59B9364468890D0E546 /* RNSVG.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSVG.xcodeproj; path = "../node_modules/react-native-svg/ios/RNSVG.xcodeproj"; sourceTree = ""; }; + 9BFAFEB337654221B2F14D03 /* libRNSVG-tvOS.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = "libRNSVG-tvOS.a"; sourceTree = ""; }; ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = ""; }; F1289ECA2100E4320091E81D /* Aztec.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Aztec.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F15198372100DC3C000F6E97 /* gutenberg-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "gutenberg-Bridging-Header.h"; sourceTree = ""; }; @@ -399,6 +418,7 @@ 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, CF45443564B845C8BDCFBAB6 /* libRNTAztecView.a in Frameworks */, + DD2AE937473A49B2B5A0E7B6 /* libRNSVG.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -414,6 +434,7 @@ 2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */, 2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */, 2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */, + 8C666FF0C9224FB88C2C0447 /* libRNSVG-tvOS.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -588,6 +609,7 @@ 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, F619623252704B46A619C33C /* RNTAztecView.xcodeproj */, + 9B18D59B9364468890D0E546 /* RNSVG.xcodeproj */, ); name = Libraries; sourceTree = ""; @@ -640,6 +662,8 @@ isa = PBXGroup; children = ( 3ADEFEC092CF4D00BEF1019E /* libRNTAztecView.a */, + 0EB766FE2F6D446A80AC6E6A /* libRNSVG.a */, + 9BFAFEB337654221B2F14D03 /* libRNSVG-tvOS.a */, ); name = "Recovered References"; sourceTree = ""; @@ -652,6 +676,15 @@ name = Products; sourceTree = ""; }; + FFEDF6EF21241BDF007FCC6D /* Products */ = { + isa = PBXGroup; + children = ( + FFEDF71921241BDF007FCC6D /* libRNSVG.a */, + FFEDF71B21241BDF007FCC6D /* libRNSVG-tvOS.a */, + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -742,7 +775,7 @@ TestTargetID = 13B07F861A680F5B00A75B9A; }; 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 0940; + LastSwiftMigration = 940; }; 2D02E47A1E0B4A5D006451C7 = { CreatedOnToolsVersion = 8.2.1; @@ -815,6 +848,10 @@ ProductGroup = 146834001AC3E56700842450 /* Products */; ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; }, + { + ProductGroup = FFEDF6EF21241BDF007FCC6D /* Products */; + ProjectRef = 9B18D59B9364468890D0E546 /* RNSVG.xcodeproj */; + }, { ProductGroup = F1B3E7B920FFA99B0042D8C3 /* Products */; ProjectRef = F619623252704B46A619C33C /* RNTAztecView.xcodeproj */; @@ -1097,6 +1134,20 @@ remoteRef = F1B3E7BC20FFA99B0042D8C3 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; + FFEDF71921241BDF007FCC6D /* libRNSVG.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRNSVG.a; + remoteRef = FFEDF71821241BDF007FCC6D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + FFEDF71B21241BDF007FCC6D /* libRNSVG-tvOS.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = "libRNSVG-tvOS.a"; + remoteRef = FFEDF71A21241BDF007FCC6D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ @@ -1238,6 +1289,7 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../react-native-aztec/example/iOS/example", + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = gutenbergTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; @@ -1245,6 +1297,8 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); OTHER_LDFLAGS = ( "-ObjC", @@ -1264,6 +1318,7 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../react-native-aztec/example/iOS/example", + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = gutenbergTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; @@ -1271,6 +1326,8 @@ LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); OTHER_LDFLAGS = ( "-ObjC", @@ -1292,6 +1349,7 @@ "$(inherited)", "$(SRCROOT)/../react-native-aztec/example/iOS/example", /usr/include/libxml2, + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = gutenberg/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1318,6 +1376,7 @@ "$(inherited)", "$(SRCROOT)/../react-native-aztec/example/iOS/example", /usr/include/libxml2, + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = gutenberg/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1348,12 +1407,15 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../react-native-aztec/example/iOS/example", + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = "gutenberg-tvOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); OTHER_LDFLAGS = ( "-ObjC", @@ -1382,12 +1444,15 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../react-native-aztec/example/iOS/example", + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = "gutenberg-tvOS/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); OTHER_LDFLAGS = ( "-ObjC", @@ -1415,12 +1480,15 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../react-native-aztec/example/iOS/example", + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = "gutenberg-tvOSTests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); OTHER_LDFLAGS = ( "-ObjC", @@ -1448,12 +1516,15 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)/../react-native-aztec/example/iOS/example", + "$(SRCROOT)/../node_modules/react-native-svg/ios/**", ); INFOPLIST_FILE = "gutenberg-tvOSTests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ( "$(inherited)", "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", + "\"$(SRCROOT)/$(TARGET_NAME)\"", ); OTHER_LDFLAGS = ( "-ObjC", diff --git a/package.json b/package.json index 486ae45666a89..37782b5ad065e 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,7 @@ "react": "16.3.1", "react-native": "0.55.4", "react-native-recyclerview-list": "git+https://github.com/wordpress-mobile/react-native-recyclerview-list.git#bfccbaab6b5954e18f8b0ed441ba38275853b79c", + "react-native-svg": "^6.5.2", "react-redux": "^5.0.7", "redux": "^3.7.2", "rememo": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 96501502a4c20..84d3984a74450 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2295,7 +2295,7 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0: +color-convert@^1.9.0, color-convert@^1.9.1: version "1.9.2" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" dependencies: @@ -2305,10 +2305,28 @@ color-name@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" +color-name@^1.0.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + +color-string@^1.5.2: + version "1.5.3" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" +color@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color/-/color-2.0.1.tgz#e4ed78a3c4603d0891eba5430b04b86314f4c839" + dependencies: + color-convert "^1.9.1" + color-string "^1.5.2" + combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" @@ -4063,6 +4081,10 @@ is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + is-buffer@^1.1.4, is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" @@ -4986,7 +5008,7 @@ lodash@^3.5.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" -lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.6.1, lodash@~4.17.10: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.16.6, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.6.1, lodash@~4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" @@ -6366,6 +6388,14 @@ react-native-sass-transformer@^1.1.1: css-to-react-native-transform "^1.7.0" semver "^5.5.0" +react-native-svg@^6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-6.5.2.tgz#1105896b8873b0856821b18daa0c6898cea6c00c" + dependencies: + color "^2.0.1" + lodash "^4.16.6" + pegjs "^0.10.0" + react-native@0.55.4: version "0.55.4" resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.55.4.tgz#eecffada3750a928e2ddd07cf11d857ae9751c30" @@ -7120,6 +7150,12 @@ simple-plist@^0.2.1: bplist-parser "0.1.1" plist "2.0.1" +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + dependencies: + is-arrayish "^0.3.1" + sjcl@^1.0.3: version "1.0.7" resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.7.tgz#32b365a50dc9bba26b88ba3c9df8ea34217d9f45" From d0483d4fba708dee7f4bafae3ab20d1e7094b055 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 15 Aug 2018 10:33:10 +0100 Subject: [PATCH 03/20] Update to gutenberg version with compatible code for RN. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 5ee1e26093fac..f295934010f44 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 5ee1e26093faca853480f07f6920dc1edfa8bc4a +Subproject commit f295934010f44d7b927d893737fa047842bfb57d From e5f9ee3d6bb76cbfe6b91cde782efd7c9cfaa6aa Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 15 Aug 2018 11:51:09 +0100 Subject: [PATCH 04/20] Add test configuration. --- jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index c5a873881cef2..c410ee156072c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -31,7 +31,7 @@ module.exports = { 'node', ], moduleNameMapper: { - '@wordpress\\/(blocks|data|element|deprecated|editor|redux-routine|block-library)$': '/gutenberg/packages/$1/src/index', + '@wordpress\\/(blocks|data|element|deprecated|editor|redux-routine|block-library|components)$': '/gutenberg/packages/$1/src/index', '@gutenberg': '/gutenberg', // Mock the CSS modules. See https://facebook.github.io/jest/docs/en/webpack.html#handling-static-assets From 3f2f017865e179258b30db0d10fbf362c06ab34e Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 15 Aug 2018 22:22:46 +0100 Subject: [PATCH 05/20] Update gutenberg version. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index f295934010f44..1b40eec253740 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit f295934010f44d7b927d893737fa047842bfb57d +Subproject commit 1b40eec2537407e18f94e99ae0eba125af137d14 From a975a0b91846721fbfb23c59eed603a202a4efab Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Thu, 16 Aug 2018 14:02:51 +0100 Subject: [PATCH 06/20] Make jest test work correctly. --- jest.config.js | 4 ++-- package.json | 2 +- yarn.lock | 11 ++++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/jest.config.js b/jest.config.js index c410ee156072c..f0a12cb61acbc 100644 --- a/jest.config.js +++ b/jest.config.js @@ -31,7 +31,7 @@ module.exports = { 'node', ], moduleNameMapper: { - '@wordpress\\/(blocks|data|element|deprecated|editor|redux-routine|block-library|components)$': '/gutenberg/packages/$1/src/index', + '@wordpress\\/(blocks|data|element|deprecated|editor|redux-routine|block-library|components|keycodes|url)$': '/gutenberg/packages/$1/src/index', '@gutenberg': '/gutenberg', // Mock the CSS modules. See https://facebook.github.io/jest/docs/en/webpack.html#handling-static-assets @@ -40,6 +40,6 @@ module.exports = { haste: { defaultPlatform: rnPlatform, platforms: [ 'android', 'ios', 'native' ], - providesModuleNodeModules: [ 'react-native' ], + providesModuleNodeModules: [ 'react-native', 'react-native-svg' ], }, }; diff --git a/package.json b/package.json index 37782b5ad065e..c66f6b5bd5858 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "prettier-eslint-cli": "^4.7.1", "react-dom": "^16.2.0", "react-native-sass-transformer": "^1.1.1", - "react-test-renderer": "16.2.0", + "react-test-renderer": "16.3.1", "remote-redux-devtools": "^0.5.12", "sprintf-js": "^1.1.1" }, diff --git a/yarn.lock b/yarn.lock index 84d3984a74450..d4454f8751f02 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6353,6 +6353,10 @@ react-dom@^16.2.0, react-dom@^16.4.1: object-assign "^4.1.1" prop-types "^15.6.0" +react-is@^16.3.1: + version "16.4.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.4.2.tgz#84891b56c2b6d9efdee577cc83501dfc5ecead88" + react-native-crypto@^2.0.1: version "2.1.2" resolved "https://registry.yarnpkg.com/react-native-crypto/-/react-native-crypto-2.1.2.tgz#cfe68cad51cd1f73a4202b7ac164f96c1144cb2a" @@ -6478,13 +6482,14 @@ react-redux@^5.0.7: loose-envify "^1.1.0" prop-types "^15.6.0" -react-test-renderer@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.2.0.tgz#bddf259a6b8fcd8555f012afc8eacc238872a211" +react-test-renderer@16.3.1: + version "16.3.1" + resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.3.1.tgz#d9257936d8535bd40f57f3d5a84e7b0452fb17f2" dependencies: fbjs "^0.8.16" object-assign "^4.1.1" prop-types "^15.6.0" + react-is "^16.3.1" react-timer-mixin@^0.13.2: version "0.13.4" From 64d8c2b41dc3342488d82cb9a9717da05264bd84 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Thu, 16 Aug 2018 14:13:59 +0100 Subject: [PATCH 07/20] Update gradle configuration. --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 87e50c1e5d4fe..5a32a316e4014 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -158,7 +158,7 @@ repositories { } dependencies { - compile project(':react-native-svg') + implementation project(':react-native-svg') implementation project(':react-native-aztec') implementation project(':react-native-recyclerview-list') // compile fileTree(dir: "libs", include: ["*.jar"]) From 36bfe575f7e3bc4e3d7ae2244bc4ddf28391b33b Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Fri, 17 Aug 2018 11:32:39 +0100 Subject: [PATCH 08/20] Update gutenberg version. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 1b40eec253740..fefcb3bd7dce1 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 1b40eec2537407e18f94e99ae0eba125af137d14 +Subproject commit fefcb3bd7dce132dafd33c9d719c0654b76fe371 From 336d365c079926f97d71e2ac78314058e7b9e414 Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Fri, 17 Aug 2018 16:07:11 +0300 Subject: [PATCH 09/20] Update to latest GB branch --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index fefcb3bd7dce1..f9964b38ba603 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit fefcb3bd7dce132dafd33c9d719c0654b76fe371 +Subproject commit f9964b38ba6038834a82f4036f9046542b825244 From 5e957dc0c889f9f41dd1b2fa7eafa93b968b2e69 Mon Sep 17 00:00:00 2001 From: Stefanos Togkoulidis Date: Fri, 17 Aug 2018 18:17:17 +0300 Subject: [PATCH 10/20] Need to import globals to define `wp` Otherwise the src/store/reducers/test.js test module fails with `ReferenceError: wp is not defined`. --- src/store/reducers/test.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/store/reducers/test.js b/src/store/reducers/test.js index 22fca7ea344d5..d9e87bf0be9cd 100644 --- a/src/store/reducers/test.js +++ b/src/store/reducers/test.js @@ -2,6 +2,8 @@ * @format */ +import '../../globals'; + import { reducer } from './'; import * as actions from '../actions/'; import { registerCoreBlocks } from '@wordpress/block-library'; From 984bdc3dbeafc2bb8c99cd6a576a689218e92237 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Mon, 20 Aug 2018 22:48:41 +0100 Subject: [PATCH 11/20] Update gutenberg version. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index f9964b38ba603..113df07881973 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit f9964b38ba6038834a82f4036f9046542b825244 +Subproject commit 113df07881973508bb511c66a7e1658bf82cfd13 From 7907259ecc35857f6d9a66699c7bf9f943da5e12 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Tue, 21 Aug 2018 11:26:13 +0100 Subject: [PATCH 12/20] Update gutenberg version. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 113df07881973..1a919db2ff884 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 113df07881973508bb511c66a7e1658bf82cfd13 +Subproject commit 1a919db2ff88471679a8886f324ab4f88fe2f518 From 7d11a7caef1fb338403ec887546c34d08e59eb66 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Tue, 21 Aug 2018 12:57:37 +0100 Subject: [PATCH 13/20] Update gutenberg version. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 1a919db2ff884..30cb9cc3091fd 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 1a919db2ff88471679a8886f324ab4f88fe2f518 +Subproject commit 30cb9cc3091fd6f2060f1f73e4301d9b857b1181 From 91ae5131d5ffed4d4a093c7253a367cf67b366d9 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 22 Aug 2018 10:45:50 +0100 Subject: [PATCH 14/20] Update gutenberg version. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index 30cb9cc3091fd..c497a56515b8c 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 30cb9cc3091fd6f2060f1f73e4301d9b857b1181 +Subproject commit c497a56515b8c9338b27c8ea9d6b1363a46e1050 From 6b8d3404eb3ed8a2b0a5ab1dab78ef83b2de38fe Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 22 Aug 2018 13:55:54 +0100 Subject: [PATCH 15/20] Update gutenberg. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index c497a56515b8c..b4eab299823e9 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit c497a56515b8c9338b27c8ea9d6b1363a46e1050 +Subproject commit b4eab299823e93ee4df579d46ba18123a52845af From 61f9ee7f774b551fcc2f026d89a5b9f3105642e7 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 22 Aug 2018 13:56:06 +0100 Subject: [PATCH 16/20] Update react-native-aztec version. --- react-native-aztec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react-native-aztec b/react-native-aztec index 6afc3c50fc4c6..1701085dceb93 160000 --- a/react-native-aztec +++ b/react-native-aztec @@ -1 +1 @@ -Subproject commit 6afc3c50fc4c635dcfbccaf75029cb95e6a73b94 +Subproject commit 1701085dceb9337dea4a76e24d035f5e55a0b18c From 02d30d370e685c07a14ab9ef5d9da9a03f7da1fa Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 22 Aug 2018 13:58:00 +0100 Subject: [PATCH 17/20] Update jest configuration. --- jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 5d6c57d020a67..f5183cee2652d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -32,7 +32,7 @@ module.exports = { 'node', ], moduleNameMapper: { - '@wordpress\\/(blocks|data|element|deprecated|editor|redux-routine|block-library|components|keycodes|url)$': '/gutenberg/packages/$1/src/index', + '@wordpress\\/(blocks|data|element|deprecated|editor|redux-routine|block-library|components|keycodes|url|a11y)$': '/gutenberg/packages/$1/src/index', // Mock the CSS modules. See https://facebook.github.io/jest/docs/en/webpack.html#handling-static-assets '\\.(scss)$': '/__mocks__/styleMock.js', From 97e4923d952e65d6a696ed23b51d25dc8b00734f Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 22 Aug 2018 18:47:41 +0100 Subject: [PATCH 18/20] Update gutenberg version. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index b4eab299823e9..bb13473394ae2 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit b4eab299823e93ee4df579d46ba18123a52845af +Subproject commit bb13473394ae259928ef261743e52f7b776addda From a1cc8a5a71bb0066daa34165f7d5e1f1b5ae36f7 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 22 Aug 2018 21:09:27 +0100 Subject: [PATCH 19/20] Update gutenberg version. --- gutenberg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gutenberg b/gutenberg index bb13473394ae2..55cac4e316815 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit bb13473394ae259928ef261743e52f7b776addda +Subproject commit 55cac4e3168158e5a4e90eb0366844a7b7744fa1 From 9282f05738f10163103dd3b5fa68387bea686656 Mon Sep 17 00:00:00 2001 From: SergioEstevao Date: Wed, 22 Aug 2018 21:40:08 +0100 Subject: [PATCH 20/20] Add globals to test. --- src/store/actions/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/actions/test.js b/src/store/actions/test.js index c9468a2c3a220..f5f788542d529 100644 --- a/src/store/actions/test.js +++ b/src/store/actions/test.js @@ -1,5 +1,5 @@ /** @format */ - +import '../../globals'; import * as actions from './'; import ActionTypes from './ActionTypes'; // Gutenberg imports