Skip to content

Commit 8dbbd95

Browse files
authored
fix: remove use of deprecated RN core apis (#869)
* fix: remove use of deprecated apis * chore: add badge * chore: lockfile * Remove deprecated APIs from documents package
1 parent be7770c commit 8dbbd95

File tree

16 files changed

+651
-766
lines changed

16 files changed

+651
-766
lines changed

.changeset/swift-worms-approve.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@react-native-documents/picker": patch
3+
"@react-native-documents/viewer": patch
4+
---
5+
6+
fix: remove use of deprecated apis

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
rules: {
55
// flags jest.config.ts as a problem
66
'jest/no-jest-import': 'off',
7+
'react-native/no-inline-styles': 'off',
78
},
89
ignorePatterns: ['**/lib/*', 'node_modules/*', '**/build/*'],
910
}

.github/workflows/android.yml

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ on:
1515
jobs:
1616
android-build:
1717
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
arch: [old, new]
21+
include:
22+
- arch: old
23+
new-arch-enabled: false
24+
description: "old architecture"
25+
- arch: new
26+
new-arch-enabled: true
27+
description: "new architecture"
1828
steps:
1929
- uses: actions/checkout@v4
2030
- name: Use Node.js lts
@@ -27,23 +37,6 @@ jobs:
2737
java-version: '17'
2838
- name: Install dependencies
2939
run: yarn install --immutable
30-
- name: Build android example app on old architecture
31-
run: ./gradlew app:assembleDebug -PnewArchEnabled=false
32-
working-directory: example/android
33-
android-build-new-arch:
34-
runs-on: ubuntu-latest
35-
steps:
36-
- uses: actions/checkout@v3
37-
- name: Use Node.js lts
38-
uses: actions/setup-node@v4
39-
with:
40-
node-version: lts/*
41-
- uses: actions/setup-java@v4
42-
with:
43-
distribution: 'temurin'
44-
java-version: '17'
45-
- name: Install dependencies
46-
run: yarn install --immutable
47-
- name: Build android example app on new architecture
48-
run: ./gradlew app:assembleDebug -PnewArchEnabled=true
40+
- name: Build android example app on ${{ matrix.description }}
41+
run: ./gradlew app:assembleDebug -PnewArchEnabled=${{ matrix.new-arch-enabled }}
4942
working-directory: example/android

.github/workflows/ios.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@ on:
1616

1717
jobs:
1818
ios-build:
19-
runs-on: macos-latest
19+
runs-on: macos-26
20+
strategy:
21+
matrix:
22+
arch: [old, new]
23+
include:
24+
- arch: old
25+
new-arch-enabled: 0
26+
description: "old architecture"
27+
- arch: new
28+
new-arch-enabled: 1
29+
description: "new architecture"
2030
steps:
2131
- uses: actions/checkout@v4
2232
- name: Use Node.js lts
@@ -31,29 +41,8 @@ jobs:
3141
- name: Install dependencies
3242
run: yarn install --immutable
3343
- name: Install pods
34-
run: RCT_NEW_ARCH_ENABLED=0 RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 npx pod-install
44+
run: RCT_NEW_ARCH_ENABLED=${{ matrix.new-arch-enabled }} RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 npx pod-install
3545
working-directory: example/ios
36-
- name: Build ios example app on old architecture
37-
run: xcodebuild -scheme ReactTestApp -workspace document-picker-example.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug
38-
working-directory: example/ios
39-
ios-build-new-arch:
40-
runs-on: macos-latest
41-
steps:
42-
- uses: actions/checkout@v4
43-
- name: Use Node.js lts
44-
uses: actions/setup-node@v4
45-
with:
46-
node-version: lts/*
47-
- uses: ruby/setup-ruby@v1
48-
with:
49-
ruby-version: 2.7
50-
working-directory: example/ios
51-
bundler-cache: true
52-
- name: Install dependencies
53-
run: yarn install --immutable
54-
- name: Install pods for new arch
55-
run: RCT_NEW_ARCH_ENABLED=1 RCT_USE_PREBUILT_RNCORE=1 RCT_USE_RN_DEP=1 npx pod-install
56-
working-directory: example/ios
57-
- name: Build ios example app on new architecture
46+
- name: Build ios example app on ${{ matrix.description }}
5847
run: xcodebuild -scheme ReactTestApp -workspace document-picker-example.xcworkspace ONLY_ACTIVE_ARCH=NO -sdk iphonesimulator -configuration Debug
5948
working-directory: example/ios

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# react-native-documents
22

3+
[![npm](https://img.shields.io/badge/npm-@react--native--documents-red?logo=npm)](https://www.npmjs.com/org/react-native-documents)
4+
35
React Native modules for document picking and viewing.
46

57
If this is useful to you, [say thanks](https://github.com/sponsors/vonovak). Your support is greatly appreciated!

example/android/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
4040
# to write custom TurboModules/Fabric components OR use libraries that
4141
# are providing them.
4242
# Note that this is incompatible with web debugging.
43-
newArchEnabled=false
44-
bridgelessEnabled=false
43+
newArchEnabled=true
44+
bridgelessEnabled=true
4545

4646
# Uncomment the line below to build React Native from source.
4747
#react.buildFromSource=true

0 commit comments

Comments
 (0)