diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml new file mode 100644 index 000000000..839353b7d --- /dev/null +++ b/.github/workflows/build-android.yml @@ -0,0 +1,47 @@ +name: Test Android build +on: + pull_request: + paths: + - .github/workflows/build-android.yml + - android/** + - cpp/** + - example/package.json + - example/android/** + - react-native.config.js + merge_group: + branches: + - main + push: + branches: + - main + paths: + - .github/workflows/build-android.yml + - android/** + - cpp/** + - example/package.json + - example/android/** + - react-native.config.js + +jobs: + build: + if: github.repository == 'Expensify/react-native-live-markdown' + runs-on: ubuntu-latest + concurrency: + group: build-android-${{ github.ref }} + cancel-in-progress: true + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: Setup Java 17 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + + - name: Install node_modules + run: yarn install --immutable + + - name: Build app + working-directory: example/android + run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml new file mode 100644 index 000000000..4432388bd --- /dev/null +++ b/.github/workflows/build-ios.yml @@ -0,0 +1,77 @@ +name: Test iOS build +on: + pull_request: + paths: + - .github/workflows/build-ios.yml + - RNLiveMarkdown.podspec + - ios/** + - cpp/** + - example/package.json + - example/ios/** + merge_group: + branches: + - main + push: + branches: + - main + paths: + - .github/workflows/build-ios.yml + - RNLiveMarkdown.podspec + - ios/** + - cpp/** + - example/package.json + - example/ios/** + +jobs: + build: + if: github.repository == 'Expensify/react-native-live-markdown' + runs-on: macos-13 + concurrency: + group: build-ios-${{ github.ref }} + cancel-in-progress: true + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: Restore node_modules from cache + uses: actions/cache@v4 + with: + path: | + node_modules + example/node_modules + key: build-ios-node-modules-${{ hashFiles('yarn.lock') }} + restore-keys: build-ios-node-modules- + + - name: Install node_modules + run: yarn install --immutable + + - name: Restore Pods from cache + uses: actions/cache@v4 + with: + path: | + example/ios/Pods + ~/Library/Caches/CocoaPods + ~/.cocoapods + key: build-ios-pods-${{ hashFiles('example/ios/Podfile.lock') }} + restore-keys: build-ios-pods- + + - name: Install Pods + working-directory: example/ios + run: | + bundler install + bundler exec pod install + + - name: Remove .xcode.env.local + working-directory: example/ios + run: rm -rf .xcode.env.local + + - name: Restore build artifacts from cache + uses: actions/cache@v4 + with: + path: ~/Library/Developer/Xcode/DerivedData + key: build-ios-derived-data-${{ hashFiles('example/ios/Podfile.lock') }} + restore-keys: build-ios-derived-data- + + - name: Build app + working-directory: example + run: npx react-native@latest run-ios --no-packager diff --git a/.github/workflows/build-web.yml b/.github/workflows/build-web.yml new file mode 100644 index 000000000..f72701aad --- /dev/null +++ b/.github/workflows/build-web.yml @@ -0,0 +1,39 @@ +name: Test web build +on: + pull_request: + paths: + - .github/workflows/build-web.yml + - src/** + - WebExample/** + merge_group: + branches: + - main + push: + branches: + - main + paths: + - .github/workflows/build-web.yml + - src/** + - WebExample/** + +jobs: + build: + if: github.repository == 'Expensify/react-native-live-markdown' + runs-on: ubuntu-latest + concurrency: + group: build-web-${{ github.ref }} + cancel-in-progress: true + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: Install node_modules + run: yarn install --immutable + + - name: Install WebExample node_modules + working-directory: WebExample + run: npm ci + + - name: Build app + working-directory: WebExample + run: npx expo export:web diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 000000000..0d5893728 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,64 @@ +name: Typecheck, lint and test +on: + pull_request: + merge_group: + branches: + - main + push: + branches: + - main + +jobs: + check: + if: github.repository == 'Expensify/react-native-live-markdown' + runs-on: ubuntu-latest + concurrency: + group: check-root-${{ github.ref }} + cancel-in-progress: true + steps: + - name: Check out Git repository + uses: actions/checkout@v4 + + - name: Use Node.js 18 + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install node_modules + run: yarn install --immutable + + - name: Install parser node_modules + working-directory: parser + run: npm ci + + - name: Install WebExample node_modules + working-directory: WebExample + run: npm ci + + - name: Verify there's no parser diff + working-directory: parser + run: | + npm run build + if ! git diff --name-only --exit-code; then + # shellcheck disable=SC2016 + echo 'Error: Parser diff detected! Please run `cd parser && npm run build` and commit the changes.' + exit 1 + fi + + - name: Typecheck library + run: yarn tsc --project tsconfig.json --noEmit + + - name: Typecheck parser + run: yarn tsc --project parser/tsconfig.json --noEmit + + - name: Typecheck example app + run: yarn tsc --project example/tsconfig.json --noEmit + + - name: Typecheck WebExample app + run: yarn tsc --project WebExample/tsconfig.json --noEmit + + - name: Lint + run: yarn lint + + - name: Test + run: yarn test diff --git a/example/Gemfile.lock b/example/Gemfile.lock new file mode 100644 index 000000000..25a023a63 --- /dev/null +++ b/example/Gemfile.lock @@ -0,0 +1,103 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.7) + base64 + nkf + rexml + activesupport (7.0.8.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + atomos (0.1.3) + base64 (0.2.0) + claide (1.1.0) + cocoapods (1.14.3) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.14.3) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 2.1, < 3.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.14.3) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (2.1) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored2 (3.1.2) + concurrent-ruby (1.2.3) + escape (0.0.4) + ethon (0.16.0) + ffi (>= 1.15.0) + ffi (1.16.3) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + httpclient (2.8.3) + i18n (1.14.4) + concurrent-ruby (~> 1.0) + json (2.7.2) + minitest (5.22.3) + molinillo (0.8.0) + nanaimo (0.3.0) + nap (1.1.0) + netrc (0.11.0) + nkf (0.2.0) + public_suffix (4.0.7) + rexml (3.2.6) + ruby-macho (2.5.1) + typhoeus (1.4.1) + ethon (>= 0.9.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + xcodeproj (1.24.0) + CFPropertyList (>= 2.3.3, < 4.0) + atomos (~> 0.1.3) + claide (>= 1.0.2, < 2.0) + colored2 (~> 3.1) + nanaimo (~> 0.3.0) + rexml (~> 3.2.4) + +PLATFORMS + ruby + +DEPENDENCIES + activesupport (>= 6.1.7.5, < 7.1.0) + cocoapods (>= 1.13, < 1.15) + +RUBY VERSION + ruby 2.7.8p225 + +BUNDLED WITH + 2.1.4 diff --git a/example/ios/LiveMarkdownExample.xcodeproj/project.pbxproj b/example/ios/LiveMarkdownExample.xcodeproj/project.pbxproj index 2bfea67ac..1fc07b3e4 100644 --- a/example/ios/LiveMarkdownExample.xcodeproj/project.pbxproj +++ b/example/ios/LiveMarkdownExample.xcodeproj/project.pbxproj @@ -8,12 +8,12 @@ /* Begin PBXBuildFile section */ 00E356F31AD99517003FC87E /* LiveMarkdownExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* LiveMarkdownExampleTests.m */; }; - 0C80B921A6F3F58F76C31292 /* libPods-LiveMarkdownExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-LiveMarkdownExample.a */; }; 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 7699B88040F8A987B510C191 /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a */; }; + 3F545849586378DB145C0BEC /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6BD0CE0B72FAB8F571B88146 /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + DFB7B3EC38BFA93658908FE7 /* libPods-LiveMarkdownExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D76D1B9DE3FB85C3FCBD5ECA /* libPods-LiveMarkdownExample.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -36,13 +36,13 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = LiveMarkdownExample/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = LiveMarkdownExample/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = LiveMarkdownExample/main.m; sourceTree = ""; }; - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B4392A12AC88292D35C810B /* Pods-LiveMarkdownExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiveMarkdownExample.debug.xcconfig"; path = "Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample.debug.xcconfig"; sourceTree = ""; }; - 5709B34CF0A7D63546082F79 /* Pods-LiveMarkdownExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiveMarkdownExample.release.xcconfig"; path = "Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample.release.xcconfig"; sourceTree = ""; }; - 5B7EB9410499542E8C5724F5 /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig"; sourceTree = ""; }; - 5DCACB8F33CDC322A6C60F78 /* libPods-LiveMarkdownExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LiveMarkdownExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6BD0CE0B72FAB8F571B88146 /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = LiveMarkdownExample/LaunchScreen.storyboard; sourceTree = ""; }; - 89C6BE57DB24E9ADA2F236DE /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig"; path = "Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig"; sourceTree = ""; }; + B00BAAF5C014FE7B2882F3D2 /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig"; sourceTree = ""; }; + CAA9E8DF265937F29F5F14B9 /* Pods-LiveMarkdownExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiveMarkdownExample.debug.xcconfig"; path = "Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample.debug.xcconfig"; sourceTree = ""; }; + CC1D7F32CF951D3C7E3766C2 /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig"; path = "Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig"; sourceTree = ""; }; + D26F35BF6D6F4E3DBD015150 /* Pods-LiveMarkdownExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LiveMarkdownExample.release.xcconfig"; path = "Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample.release.xcconfig"; sourceTree = ""; }; + D76D1B9DE3FB85C3FCBD5ECA /* libPods-LiveMarkdownExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LiveMarkdownExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -51,7 +51,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7699B88040F8A987B510C191 /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a in Frameworks */, + 3F545849586378DB145C0BEC /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -59,7 +59,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 0C80B921A6F3F58F76C31292 /* libPods-LiveMarkdownExample.a in Frameworks */, + DFB7B3EC38BFA93658908FE7 /* libPods-LiveMarkdownExample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -100,8 +100,8 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 5DCACB8F33CDC322A6C60F78 /* libPods-LiveMarkdownExample.a */, - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a */, + D76D1B9DE3FB85C3FCBD5ECA /* libPods-LiveMarkdownExample.a */, + 6BD0CE0B72FAB8F571B88146 /* libPods-LiveMarkdownExample-LiveMarkdownExampleTests.a */, ); name = Frameworks; sourceTree = ""; @@ -140,10 +140,10 @@ BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( - 3B4392A12AC88292D35C810B /* Pods-LiveMarkdownExample.debug.xcconfig */, - 5709B34CF0A7D63546082F79 /* Pods-LiveMarkdownExample.release.xcconfig */, - 5B7EB9410499542E8C5724F5 /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig */, - 89C6BE57DB24E9ADA2F236DE /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig */, + CAA9E8DF265937F29F5F14B9 /* Pods-LiveMarkdownExample.debug.xcconfig */, + D26F35BF6D6F4E3DBD015150 /* Pods-LiveMarkdownExample.release.xcconfig */, + B00BAAF5C014FE7B2882F3D2 /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig */, + CC1D7F32CF951D3C7E3766C2 /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -155,12 +155,12 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "LiveMarkdownExampleTests" */; buildPhases = ( - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, + 0F2B0B8E979111BFF61F15EA /* [CP] Check Pods Manifest.lock */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, + 798EA0E1F799EC1B69CBBB5E /* [CP] Embed Pods Frameworks */, + A735729E412A034D73FB9B19 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -176,13 +176,13 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "LiveMarkdownExample" */; buildPhases = ( - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, + 3DE647B710DAF56B186A1661 /* [CP] Check Pods Manifest.lock */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, + 5734006B2999D658A146FA79 /* [CP] Embed Pods Frameworks */, + C236B8991053A9731BCD3AF6 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -265,24 +265,29 @@ shellPath = /bin/sh; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { + 0F2B0B8E979111BFF61F15EA /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-LiveMarkdownExample-LiveMarkdownExampleTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { + 3DE647B710DAF56B186A1661 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -297,36 +302,31 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-LiveMarkdownExample-LiveMarkdownExampleTests-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-LiveMarkdownExample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { + 5734006B2999D658A146FA79 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-LiveMarkdownExample-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { + 798EA0E1F799EC1B69CBBB5E /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -343,38 +343,38 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { + A735729E412A034D73FB9B19 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-resources-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-resources-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { + C236B8991053A9731BCD3AF6 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-resources-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample-LiveMarkdownExampleTests/Pods-LiveMarkdownExample-LiveMarkdownExampleTests-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LiveMarkdownExample/Pods-LiveMarkdownExample-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -410,7 +410,7 @@ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig */; + baseConfigurationReference = B00BAAF5C014FE7B2882F3D2 /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -437,7 +437,7 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig */; + baseConfigurationReference = CC1D7F32CF951D3C7E3766C2 /* Pods-LiveMarkdownExample-LiveMarkdownExampleTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; COPY_PHASE_STRIP = NO; @@ -461,7 +461,7 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-LiveMarkdownExample.debug.xcconfig */; + baseConfigurationReference = CAA9E8DF265937F29F5F14B9 /* Pods-LiveMarkdownExample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -488,7 +488,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-LiveMarkdownExample.release.xcconfig */; + baseConfigurationReference = D26F35BF6D6F4E3DBD015150 /* Pods-LiveMarkdownExample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 2fb373473..a17d6d5d3 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1111,7 +1111,12 @@ PODS: - React-jsi (= 0.73.4) - React-logger (= 0.73.4) - React-perflogger (= 0.73.4) - - RNLiveMarkdown (0.1.44): + - RNLiveMarkdown (0.1.48): + - glog + - RCT-Folly (= 2022.05.16.00) + - React-Core + - RNLiveMarkdown/common (= 0.1.48) + - RNLiveMarkdown/common (0.1.48): - glog - RCT-Folly (= 2022.05.16.00) - React-Core @@ -1371,7 +1376,7 @@ SPEC CHECKSUMS: React-runtimescheduler: ed48e5faac6751e66ee1261c4bd01643b436f112 React-utils: 6e5ad394416482ae21831050928ae27348f83487 ReactCommon: 840a955d37b7f3358554d819446bffcf624b2522 - RNLiveMarkdown: b0fe5fbcfa24b0dc190b6d246793d528a1c7c452 + RNLiveMarkdown: 403a9ad8073e337116a1dae1c954ae39212698ee SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Yoga: 64cd2a583ead952b0315d5135bf39e053ae9be70 diff --git a/example/package.json b/example/package.json index 3015fa426..5dd5ba95f 100644 --- a/example/package.json +++ b/example/package.json @@ -5,9 +5,7 @@ "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", - "start": "react-native start", - "build:android": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a", - "build:ios": "cd ios && xcodebuild -workspace LiveMarkdownExample.xcworkspace -scheme LiveMarkdownExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO" + "start": "react-native start" }, "dependencies": { "patch-package": "^8.0.0", diff --git a/package.json b/package.json index d2e0f9900..4a87ac056 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,10 @@ "test": "jest", "typecheck": "tsc --noEmit", "lint": "eslint . --ext .js,.ts,.tsx", - "lint:root": "eslint . --ext .js,.ts,.tsx --ignore-pattern '/example/**/*' --ignore-pattern '/WebExample/**/*' --ignore-pattern '/parser/**/*'", - "lint:example": "eslint example --ext .js,.ts,.tsx", + "lint:root": "eslint . --ext .js,.ts,.tsx --ignore-pattern '/parser/**/*' --ignore-pattern '/example/**/*' --ignore-pattern '/WebExample/**/*'", "lint:parser": "eslint parser --ext .js,.ts,.tsx", - "lint:web": "eslint WebExample --ext .js,.ts,.tsx", + "lint:example": "eslint example --ext .js,.ts,.tsx", + "lint:WebExample": "eslint WebExample --ext .js,.ts,.tsx", "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib", "prepare": "bob build && mkdir -p lib/parser && cp parser/react-native-live-markdown-parser.js lib/parser/react-native-live-markdown-parser.js", "release": "release-it" diff --git a/turbo.json b/turbo.json index ba8a8aa72..17e6cb8ac 100644 --- a/turbo.json +++ b/turbo.json @@ -1,24 +1,3 @@ { - "$schema": "https://turbo.build/schema.json", - "pipeline": { - "build:android": { - "inputs": [ - "package.json", - "android", - "!android/build", - "src/*.ts", - "src/*.tsx", - "example/package.json", - "example/android", - "!example/android/.gradle", - "!example/android/build", - "!example/android/app/build" - ], - "outputs": [] - }, - "build:ios": { - "inputs": ["package.json", "*.podspec", "ios", "src/*.ts", "src/*.tsx", "example/package.json", "example/ios", "!example/ios/build", "!example/ios/Pods"], - "outputs": [] - } - } + "$schema": "https://turbo.build/schema.json" }