Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
af25be0
Target gutenberg monorepo branch
Tug Apr 21, 2020
c949524
Add react-native as a dependency of the project
Tug Apr 23, 2020
e41c28b
Simply export @wordpress/react-native-editor metro config file as our…
Tug Apr 24, 2020
d319899
Merge remote-tracking branch 'origin/develop' into try/after-monorepo
Tug Apr 24, 2020
340421d
install node_modules in gutenberg
Tug Apr 24, 2020
071bafb
Update bundles
Tug Apr 25, 2020
6346513
Add test (failing)
Tug Apr 27, 2020
693799b
Skip tests for now
Tug Apr 27, 2020
1f3a66d
Experiment using @carimus/metro-symlinked-deps to support symlinks
Tug Apr 28, 2020
5a71853
Merge remote-tracking branch 'origin/develop' into try/after-monorepo
Tug Apr 28, 2020
14a7520
Revert __device-tests__ to origin/develop
Tug Apr 28, 2020
cfbe041
Revert bundle to origin/develop
Tug Apr 28, 2020
69d2ffd
Revert symlinked module experiment, test and update gutenberg ref
Tug Apr 28, 2020
3577857
Add simple test
Tug Apr 29, 2020
4f54976
Fix prettier
Tug Apr 29, 2020
98d52b7
Fix lint
Tug Apr 29, 2020
6ca43c6
Do not reinstall gutenberg dependency on each pot generation
Tug Apr 29, 2020
de1620a
Target future e2e jest config file
Tug Apr 29, 2020
c0ada20
Merge remote-tracking branch 'origin/develop' into try/after-monorepo
Tug May 15, 2020
5b6bef2
Add core script to run core RN scripts
Tug May 15, 2020
2cc6cfe
Split block_editor_props action in 2 depending if we're receiving pro…
Tug May 15, 2020
9fd8503
Fix ios command and update gb ref
Tug May 15, 2020
93ae601
Fix core command
Tug May 16, 2020
84318ca
Minor cleanup
Tug May 18, 2020
5adc595
Remove gutenberg-mobile dependencies
ceyhun May 19, 2020
9aff836
Remove scripts running native apps
ceyhun May 19, 2020
18e41f6
Remove duplicate device tests
ceyhun May 19, 2020
dc4c9c2
Try running iOS e2e tests on Circle CI
ceyhun May 19, 2020
e4c825b
Disable jobs other than iOS e2e tests
ceyhun May 19, 2020
62ee086
Remove patch-package step
ceyhun May 19, 2020
4d117b6
Try running android e2e tests
ceyhun May 19, 2020
fc580e0
Try running android e2e tests via bundling from gutenberg-mobile
ceyhun May 19, 2020
a34052d
Update gutenberg ref
ceyhun May 19, 2020
3e1b337
Remove duplicate node_modules and symlink resolver from gutenberg-mobile
ceyhun May 19, 2020
2621722
Update wpandroid command and gutenberg ref
Tug May 19, 2020
a07aca6
Remove node-sass dependency from gutenberg-mobile
ceyhun May 19, 2020
f2b2351
Use correct package-lock.json for iOS build cache key
ceyhun May 19, 2020
2afb80b
Fix linter errors
ceyhun May 19, 2020
e3a4883
Fix jest tests
ceyhun May 19, 2020
98aa80f
Update gutenberg ref
ceyhun May 19, 2020
fea0c68
Update ci-checks-js script
ceyhun May 19, 2020
d9eabf6
Update ci-checks-js script
ceyhun May 19, 2020
380298d
Update react-native-get-random-values in bridge build
Tug May 20, 2020
7f2fea9
Merge branch 'try/after-monorepo' into try/after-monorepo-e2e-tests
ceyhun May 20, 2020
9483119
Merge pull request #2273 from wordpress-mobile/try/after-monorepo-e2e…
ceyhun May 20, 2020
942b3b3
Update gutenberg ref
Tug May 20, 2020
f4b584c
Regen package-lock.json
Tug May 20, 2020
8529ccb
Add back .watchmanconfig file
ceyhun May 20, 2020
847a868
Remove .prettierignore as .eslintignore is used
ceyhun May 20, 2020
9534e0f
Update lint script to include root of repo
ceyhun May 20, 2020
fee78fe
Add e2e test for contact info block
ceyhun May 20, 2020
654e120
Add jest config to run e2e tests
ceyhun May 20, 2020
f126ad6
Run extended e2e tests on CI
ceyhun May 20, 2020
cf93580
Fix contact info e2e test imports
ceyhun May 20, 2020
dda37b7
Add back scripts to run e2e tests locally
ceyhun May 20, 2020
7c6c6fd
Update gutenberg ref
Tug May 20, 2020
b7e4fdc
Update gutenberg ref
Tug May 20, 2020
4562fed
fix android-device-checks
Tug May 20, 2020
c274821
Fix .watchmanconfig file name
ceyhun May 20, 2020
91a227d
Update gutenberg ref
ceyhun May 22, 2020
2ffb937
Update gutenberg ref
ceyhun May 22, 2020
cec3b2d
Use different npm cache path
ceyhun May 22, 2020
e07f079
Update gutenberg ref
ceyhun May 22, 2020
fc38c76
Update Gutenberg podspec
ceyhun May 26, 2020
c086897
Update generate-podspecs script
ceyhun May 26, 2020
b4998ad
Generate third-party-podspecs folder
ceyhun May 26, 2020
b03645f
Update Gutenberg podspec
ceyhun May 26, 2020
70a6c4a
Update Gutenberg podspec
ceyhun May 26, 2020
ac4e4f3
Update third-party-podspecs folder from develop branch
ceyhun May 26, 2020
67258e3
Update Gutenberg podspec
ceyhun May 26, 2020
f646e11
Re-add RNTAztecView.podspec and point to gutenberg package
ceyhun May 26, 2020
bacc6df
Update gutenberg ref
ceyhun May 26, 2020
b058cb4
Update package-lock
Tug May 27, 2020
e5a8856
Update gutenberg ref
Tug May 27, 2020
6561422
Increase memory for react-native cli process
Tug May 27, 2020
1323062
Update .gitignore
Tug Jun 1, 2020
974d4b6
Update gutenberg
Tug Jun 1, 2020
d54edb8
Update bundle to try building WPAndroid
Tug Jun 1, 2020
6c8dcca
Revert increase memory limit for react-native script
Tug Jun 2, 2020
de65d2f
Remove yarn.lock
Tug Jun 2, 2020
d030a86
Remove unused commands and update clean commands
Tug Jun 2, 2020
0ff57d9
fix npm run reset:cache
Tug Jun 2, 2020
eea10ee
Remove installing dependencies during genstrings script
Tug Jun 3, 2020
b82998c
Fix missing dependency gettext-parser
Tug Jun 3, 2020
076a17c
Increase max memory for php process to 4GB (2GB needed when last run)
Tug Jun 3, 2020
7fdd5cc
Update gutenberg ref
ceyhun Jun 3, 2020
fdcfd19
Try using a higher resource class for the circleCI VM
Tug Jun 4, 2020
e6b732e
Try using a higher resource class for the circleCI VM
Tug Jun 4, 2020
d09d19a
Fix genstrings
Tug Jun 5, 2020
d00b8c6
Update translation files
Tug Jun 5, 2020
2980788
Update gutenberg ref
Tug Jun 5, 2020
7e00651
Try fixing error 137 on circleci
Tug Jun 5, 2020
822188a
Try reverting CicleCI config change resource_class: large
Tug Jun 5, 2020
7f394fc
Merge remote-tracking branch 'origin/develop' into try/after-monorepo
Tug Jun 5, 2020
869d0ff
Update gutenberg ref
cameronvoell Jun 17, 2020
31a34ed
Merge branch 'develop' into try/after-monorepo
ceyhun Jun 18, 2020
47d1cfc
Bump Gutenberg hash
hypest Jun 18, 2020
f997702
Patch react-native without using patch-package
ceyhun Jun 18, 2020
3c63307
Remove patch-package and postinstall-prepare packages
ceyhun Jun 18, 2020
5e204d9
Update package-lock.json
ceyhun Jun 18, 2020
24e44f6
Use git to apply react-native patch
ceyhun Jun 18, 2020
b709537
Revert unneeded changes to podspecs
ceyhun Jun 18, 2020
81e4828
Updating gutenberg ref
cameronvoell Jun 18, 2020
3dc9bf2
Use correct package.json for versioning in podspec
ceyhun Jun 19, 2020
03c88f0
Bump Gutenberg hash
hypest Jun 18, 2020
51d42e8
Ignore RN patching is already done
hypest Jun 19, 2020
b359cee
Show initial title in DEV only if it's undefined
ceyhun Jun 19, 2020
735a705
Update gutenberg reeef
ceyhun Jun 19, 2020
ef092c1
Fix RN patch script using the wrong -p option
ceyhun Jun 22, 2020
1b9eab8
Merge branch 'develop' into try/after-monorepo
ceyhun Jun 23, 2020
dbebfc2
Update guteneberg ref
ceyhun Jun 23, 2020
7aa10e6
Fix merge issues in CircleCI config
ceyhun Jun 23, 2020
0e70da3
Remove no longer used flow-bin package
ceyhun Jun 23, 2020
65f6154
Update README
ceyhun Jun 23, 2020
c1d703d
Update README
ceyhun Jun 23, 2020
b853387
Fix Android native unit tests on CI
ceyhun Jun 23, 2020
96fe3d7
Updating gutenberg ref to master
cameronvoell Jun 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
80 changes: 40 additions & 40 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ orbs:
slack: circleci/slack@3.4.2

commands:
yarn-install:
npm-install:
steps:
- restore_cache:
name: Restore Yarn Cache
name: Restore NPM Cache
keys:
- yarn-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
- npm-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}
- run:
name: Yarn Install
command: yarn install --frozen-lockfile --prefer-offline --network-concurrency 1
name: NPM Install
command: npm ci --prefer-offline
- save_cache:
name: Save Yarn Cache
key: yarn-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "yarn.lock" }}
name: Save NPM Cache
key: npm-i18n-v4-cache-v{{ .Environment.CACHE_TRIGGER_VERSION }}-job-{{ .Environment.CIRCLE_JOB }}-{{ checksum "package-lock.json" }}
paths:
- node_modules
- ~/.npm
- i18n-cache/data
checkout-gutenberg:
checkout-submodules:
steps:
- run:
name: Checkout Gutenberg
name: Checkout Submodules
command: git submodule update --init --recursive
add-jest-reporter-dir:
steps:
Expand All @@ -46,8 +46,8 @@ jobs:
- image: circleci/node:10
steps:
- checkout
- checkout-gutenberg
- yarn-install
- checkout-submodules
- npm-install
- add-jest-reporter-dir
- run:
name: Set Environment Variables
Expand All @@ -73,12 +73,13 @@ jobs:
default: ""
docker:
- image: circleci/android:api-29-node
environment:
JAVA_OPTS: '-Xms512m -Xmx2g'
GRADLE_OPTS: '-Xmx3g -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx2g -XX:+HeapDumpOnOutOfMemoryError"'
steps:
- checkout
- run:
name: Checkout Gutenberg
command: git submodule update --init --recursive
- yarn-install
- checkout-submodules
- npm-install
- add-jest-reporter-dir
- run:
name: Set Environment Variables
Expand All @@ -87,15 +88,15 @@ jobs:
echo 'export TEST_ENV=sauce' >> $BASH_ENV
- run:
name: Bundle Android and Generate debug .apk file for testing
command: yarn test:e2e:build-app:android
command: npm run test:e2e:bundle:android && npm run test:e2e:build-app:android
- run:
name: Upload apk to sauce labs
command: |
source bin/sauce-pre-upload.sh
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.apk?overwrite=true --data-binary @./android/app/build/outputs/apk/debug/app-debug.apk
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.apk?overwrite=true --data-binary @./gutenberg/packages/react-native-editor/android/app/build/outputs/apk/debug/app-debug.apk
- run:
name: Run Device Tests
command: yarn device-tests<<parameters.is-canary>>
command: npm run device-tests<<parameters.is-canary>>
no_output_timeout: 1200
environment:
JEST_JUNIT_OUTPUT: "reports/test-results/android-test-results.xml"
Expand All @@ -119,10 +120,11 @@ jobs:
- image: circleci/android:api-29-node
steps:
- checkout
- yarn-install
- checkout-submodules
- npm-install
- run:
name: Run Android native unit tests
command: cd android && ./gradlew testDebug
command: cd gutenberg/packages/react-native-editor/android && ./gradlew testDebug
ios-device-checks:
parameters:
post-to-slack:
Expand All @@ -136,8 +138,8 @@ jobs:
xcode: "11.2.1"
steps:
- checkout
- checkout-gutenberg
- yarn-install
- checkout-submodules
- npm-install
- add-jest-reporter-dir
- run:
name: Set Environment Variables
Expand All @@ -146,59 +148,57 @@ jobs:
echo 'export TEST_ENV=sauce' >> $BASH_ENV
- run:
name: Prepare build cache key
command: find yarn.lock ios react-native-aztec/ios react-native-gutenberg-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt
command: find gutenberg/package-lock.json gutenberg/packages/react-native-editor/ios gutenberg/packages/react-native-aztec/ios gutenberg/packages/react-native-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt
- restore_cache:
name: Restore Build Cache
keys:
- ios-build-cache-{{ checksum "ios-checksums.txt" }}
- restore_cache:
name: Restore Dependencies Cache
keys:
- dependencies-v3-{{ checksum "ios/Gemfile.lock" }}-{{ checksum "ios/Podfile.lock" }}-{{
checksum "yarn.lock" }}
- dependencies-v3-{{ checksum "ios/Gemfile.lock" }}-{{ checksum "ios/Podfile.lock" }}
- dependencies-v3-{{ checksum "ios/Gemfile.lock" }}
- dependencies-v3-
- dependencies-v4-{{ checksum "gutenberg/packages/react-native-editor/ios/Gemfile.lock" }}-{{ checksum "gutenberg/packages/react-native-editor/ios/Podfile.lock" }}-{{ checksum "gutenberg/package-lock.json" }}
- dependencies-v4-{{ checksum "gutenberg/packages/react-native-editor/ios/Gemfile.lock" }}-{{ checksum "gutenberg/packages/react-native-editor/ios/Podfile.lock" }}
- dependencies-v4-{{ checksum "gutenberg/packages/react-native-editor/ios/Gemfile.lock" }}
- dependencies-v4-
- run:
name: Build (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || SKIP_BUNDLING=true yarn test:e2e:build-app:ios
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || SKIP_BUNDLING=true npm run core test:e2e:build-app:ios
- save_cache:
name: Save Dependencies Cache
key: dependencies-v3-{{ checksum "ios/Gemfile.lock" }}-{{ checksum "ios/Podfile.lock" }}-{{
checksum "yarn.lock" }}
key: dependencies-v4-{{ checksum "gutenberg/packages/react-native-editor/ios/Gemfile.lock" }}-{{ checksum "gutenberg/packages/react-native-editor/ios/Podfile.lock" }}-{{ checksum "gutenberg/package-lock.json" }}
paths:
- ios/Pods
- gutenberg/packages/react-native-editor/ios/Pods
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos/trunk
- ios/vendor
- gutenberg/packages/react-native-editor/ios/vendor
- run:
name: Bundle iOS
command: yarn test:e2e:bundle:ios
command: npm run test:e2e:bundle:ios
- run:
name: Generate .app file for testing
command: WORK_DIR=$(pwd) && cd ./ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/ios/GutenbergDemo.app.zip GutenbergDemo.app
command: WORK_DIR=$(pwd) && cd ./gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator && zip -r $WORK_DIR/gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip GutenbergDemo.app
- run:
name: Upload .app to sauce labs
command: |
source bin/sauce-pre-upload.sh
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.app.zip?overwrite=true --data-binary @./ios/GutenbergDemo.app.zip
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" -X POST -H "Content-Type: application/octet-stream" https://saucelabs.com/rest/v1/storage/automattic/Gutenberg-$SAUCE_FILENAME.app.zip?overwrite=true --data-binary @./gutenberg/packages/react-native-editor/ios/GutenbergDemo.app.zip
- run:
name: Run Device Tests
command: |
yarn device-tests<<parameters.is-canary>>
npm run device-tests<<parameters.is-canary>>
no_output_timeout: 1200
environment:
JEST_JUNIT_OUTPUT: "reports/test-results/ios-test-results.xml"
- store_test_results:
path: ./reports/test-results
- run:
name: Prepare build cache
command: rm ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle
command: rm gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app/main.jsbundle
- save_cache:
name: Save Build Cache
key: ios-build-cache-{{ checksum "ios-checksums.txt" }}
paths:
- ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app
- gutenberg/packages/react-native-editor/ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app
- when:
condition: << parameters.post-to-slack >>
steps:
Expand Down
4 changes: 1 addition & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
; ignore the submodules
gutenberg
symlinked-packages
symlinked-packages-in-parent
react-native-aztec
bundle
jetpack
bin
55 changes: 2 additions & 53 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,59 +16,8 @@ module.exports = {
"react",
"react-native",
"jest",
"flowtype"
],
extends: [
"plugin:@wordpress/eslint-plugin/recommended",
"plugin:flowtype/recommended",
],
settings: {
flowtype: {
onlyFilesWithFlowAnnotation: true,
},
react: {
pragma: "React",
version: "detect",
flowVersion: "0.92.0",
},
},
rules: {
'no-restricted-syntax': [
'error',
// NOTE: We can't include the forward slash in our regex or
// we'll get a `SyntaxError` (Invalid regular expression: \ at end of pattern)
// here. That's why we use \\u002F in the regexes below.
{
selector: 'ImportDeclaration[source.value=/^@wordpress\\u002F.+\\u002F/]',
message: 'Path access on WordPress dependencies is not allowed.',
},
{
selector: 'CallExpression[callee.name=/^(__|_x|_n|_nx)$/] Literal[value=/\\.{3}/]',
message: 'Use ellipsis character (…) in place of three dots',
},
{
selector: 'ImportDeclaration[source.value="lodash"] Identifier.imported[name="memoize"]',
message: 'Use memize instead of Lodash’s memoize',
},
{
selector: 'CallExpression[callee.object.name="page"][callee.property.name="waitFor"]',
message: 'Prefer page.waitForSelector instead.',
},
{
selector: 'JSXAttribute[name.name="id"][value.type="Literal"]',
message: 'Do not use string literals for IDs; use withInstanceId instead.',
},
{
// Discourage the usage of `Math.random()` as it's a code smell
// for UUID generation, for which we already have a higher-order
// component: `withInstanceId`.
selector: 'CallExpression[callee.object.name="Math"][callee.property.name="random"]',
message: 'Do not use Math.random() to generate unique IDs; use withInstanceId instead. (If you’re not generating unique IDs: ignore this message.)',
},
{
selector: 'CallExpression[callee.name="withDispatch"] > :function > BlockStatement > :not(VariableDeclaration,ReturnStatement)',
message: 'withDispatch must return an object with consistent keys. Avoid performing logic in `mapDispatchToProps`.',
},
],
},
}
]
};
113 changes: 0 additions & 113 deletions .flowconfig

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ buck-out/

# e2e output log
appium-out.log
ios-screen-recordings/
android-screen-recordings/

bin/wp-cli.phar

Expand Down
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

Loading