Skip to content

Commit 1cef6e8

Browse files
committed
Merge branch 'dev-0.13'
2 parents 038d9fd + 85ca857 commit 1cef6e8

File tree

9 files changed

+655
-831
lines changed

9 files changed

+655
-831
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ defaults: &defaults
22
docker:
33
- image: cimg/node:lts
44

5-
version: 2
5+
version: 2.1
66
jobs:
77
test:
88
<<: *defaults

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v20.11.1
1+
v20.12.2

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@
1414
[copyFileAssets()]: https://github.com/birdofpreyru/react-native-fs?tab=readme-ov-file#copyfileassets
1515
[Error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
1616
[Example App]: https://github.com/birdofpreyru/react-native-static-server/tree/master/example
17+
[Expo Example App]: https://github.com/jole141/expo-examples/tree/react-native-static-server
1718
[Expo]: https://expo.dev
1819
[getDeviceType()]: https://www.npmjs.com/package/react-native-device-info#getDeviceType
20+
[Issue#8]: https://github.com/birdofpreyru/react-native-static-server/issues/8
21+
[jole141]: https://github.com/jole141
1922
[Lighttpd]: https://www.lighttpd.net
2023
[MainBundlePath]: https://www.npmjs.com/package/@dr.pogodin/react-native-fs#mainbundlepath
2124
[mod_alias]: https://redmine.lighttpd.net/projects/lighttpd/wiki/Mod_alias
@@ -118,7 +121,12 @@ and [old][Old Architecture] RN architectures.
118121
- Building for Android target on Windows host
119122
([open issues](https://github.com/birdofpreyru/react-native-static-server/issues?q=is%3Aissue+is%3Aopen+label%3A%22Windows+-%3E+Android%22)).
120123
Prefer building for Android on macOS or Ubuntu host.
124+
121125
- [Expo] ([open issues](https://github.com/birdofpreyru/react-native-static-server/issues?q=is%3Aissue+is%3Aopen+label%3AExpo)).
126+
127+
Though, presumably the library in its current state already works fine
128+
with [Expo] &mdash; see [Issue#8] and [Expo Example App] by [jole141].
129+
122130
- [tvOS](https://developer.apple.com/tvos) ([open issues](https://github.com/birdofpreyru/react-native-static-server/issues?q=is%3Aissue+is%3Aopen+label%3AtvOS)).
123131

124132

@@ -184,11 +192,11 @@ and [old][Old Architecture] RN architectures.
184192
$ pod install
185193
```
186194
187-
- For [Expo]: \
188-
_It probably works with some additional setup (see
189-
[Issue#8](https://github.com/birdofpreyru/react-native-static-server/issues/8)),
190-
however at the moment we don't support it officially. If anybody wants
191-
to help with this, contributions to the documentation / codebase are welcome._
195+
- For [Expo]:
196+
197+
Presumably, it works with some additional setup (see [Issue#8] and
198+
[Expo Example App] by [jole141]; though it is not officially supported
199+
(tested) for new releases.
192200
193201
- For **Mac Catalyst**:
194202
- Disable Flipper in your app's Podfile.

example/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PODS:
22
- boost (1.83.0)
33
- CocoaAsyncSocket (7.6.5)
44
- DoubleConversion (1.1.6)
5-
- dr-pogodin-react-native-fs (2.24.1):
5+
- dr-pogodin-react-native-fs (2.24.4):
66
- glog
77
- hermes-engine
88
- RCT-Folly (= 2022.05.16.00)
@@ -981,7 +981,7 @@ PODS:
981981
- React-Mapbuffer (0.73.6):
982982
- glog
983983
- React-debug
984-
- react-native-webview (13.8.1):
984+
- react-native-webview (13.8.4):
985985
- glog
986986
- hermes-engine
987987
- RCT-Folly (= 2022.05.16.00)
@@ -1424,7 +1424,7 @@ SPEC CHECKSUMS:
14241424
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
14251425
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
14261426
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
1427-
dr-pogodin-react-native-fs: 1dbe759b5855245c5f968aa8994d0db22041d73f
1427+
dr-pogodin-react-native-fs: 1104ecc47f2e717b60a67c52f981fd26885ddd56
14281428
dr-pogodin-react-native-static-server: 4d885462b4e22d5a96335fb24b77cc0d6823ac4e
14291429
FBLazyVector: f64d1e2ea739b4d8f7e4740cde18089cd97fe864
14301430
Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44
@@ -1462,7 +1462,7 @@ SPEC CHECKSUMS:
14621462
React-jsitracing: 4fed160d939e93a39049481f47744af246a7ac2c
14631463
React-logger: 3eb80a977f0d9669468ef641a5e1fabbc50a09ec
14641464
React-Mapbuffer: 84ea43c6c6232049135b1550b8c60b2faac19fab
1465-
react-native-webview: 95083ac8aed57e568ed309c06d5157196000bc93
1465+
react-native-webview: 84b5ff28cc8cfcc2bb955e9456f8d482be3ecb18
14661466
React-nativeconfig: b4d4e9901d4cabb57be63053fd2aa6086eb3c85f
14671467
React-NativeModulesApple: cd26e56d56350e123da0c1e3e4c76cb58a05e1ee
14681468
React-perflogger: 5f49905de275bac07ac7ea7f575a70611fa988f2

example/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
"windows": "react-native run-windows"
1313
},
1414
"dependencies": {
15-
"@dr.pogodin/react-native-fs": "^2.24.1",
15+
"@dr.pogodin/react-native-fs": "^2.24.4",
1616
"react": "18.2.0",
1717
"react-native": "0.73.6",
18-
"react-native-webview": "^13.8.1",
19-
"react-native-windows": "^0.73.10"
18+
"react-native-webview": "^13.8.4",
19+
"react-native-windows": "^0.73.11"
2020
},
2121
"devDependencies": {
22-
"@babel/core": "^7.24.0",
23-
"@babel/preset-env": "^7.24.0",
24-
"@babel/runtime": "^7.24.0",
22+
"@babel/core": "^7.24.4",
23+
"@babel/preset-env": "^7.24.4",
24+
"@babel/runtime": "^7.24.4",
2525
"@react-native/babel-preset": "^0.73.21",
2626
"@react-native/metro-config": "^0.73.5",
2727
"@react-native/typescript-config": "^0.73.1",
2828
"babel-plugin-module-resolver": "^5.0.0",
29-
"metro-config": "^0.80.6",
29+
"metro-config": "^0.80.8",
3030
"pod-install": "^0.2.0"
3131
},
3232
"engines": {

example/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export default function App() {
181181
<WebView
182182
cacheMode="LOAD_NO_CACHE"
183183
// This way we can receive messages sent by the WebView content.
184-
onMessage={(event) => {
184+
onMessage={(event: any) => {
185185
const message = event.nativeEvent.data;
186186
Alert.alert('Got a message from the WebView content', message);
187187
}}
@@ -192,7 +192,7 @@ export default function App() {
192192
// there when links inside WebView are pressed. However, it is worth
193193
// to re-test, troubleshoot, and probably fix. It works fine both
194194
// Android and iOS.
195-
onShouldStartLoadWithRequest={(request) => {
195+
onShouldStartLoadWithRequest={(request: any) => {
196196
const load = request.url.startsWith(origin);
197197
if (!load) {
198198
Linking.openURL(request.url);

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,24 @@
5050
"registry": "https://registry.npmjs.org/"
5151
},
5252
"devDependencies": {
53-
"@dr.pogodin/react-native-fs": "^2.24.1",
53+
"@dr.pogodin/react-native-fs": "^2.24.4",
5454
"@react-native/eslint-config": "^0.73.2",
5555
"@types/jest": "^29.5.12",
56-
"@types/react": "^18.2.66",
56+
"@types/react": "^18.2.77",
5757
"@types/uuid": "^9.0.8",
5858
"del-cli": "^5.1.0",
5959
"eslint": "^8.57.0",
6060
"eslint-config-prettier": "^9.1.0",
6161
"eslint-plugin-prettier": "^5.1.3",
6262
"jest": "^29.7.0",
63-
"metro-config": "^0.80.6",
63+
"metro-config": "^0.80.8",
6464
"pod-install": "^0.2.0",
6565
"prettier": "^3.2.5",
6666
"react": "18.2.0",
6767
"react-native": "0.73.6",
6868
"react-native-builder-bob": "^0.23.2",
69-
"react-native-windows": "^0.73.10",
70-
"typescript": "^5.4.2"
69+
"react-native-windows": "^0.73.11",
70+
"typescript": "^5.4.5"
7171
},
7272
"resolutions": {
7373
"@types/react": "^18.2.48"

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ class StaticServer {
410410
}
411411

412412
async _handleAppStateChange(appState: AppStateStatus) {
413-
const starting = appState === 'active';
413+
const starting = appState === 'active' || appState === 'inactive';
414414
try {
415415
if (starting) await this.start('App entered foreground');
416416
else await this._stop('App entered background');

0 commit comments

Comments
 (0)