Skip to content

Commit e150db4

Browse files
committed
add cresc
1 parent 66c2504 commit e150db4

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

package.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-update",
3-
"version": "10.23.1",
3+
"version": "10.24.0",
44
"description": "react-native hot update",
55
"main": "src/index",
66
"scripts": {
@@ -74,6 +74,5 @@
7474
"react-native": "0.73",
7575
"ts-jest": "^29.2.5",
7676
"typescript": "^5.6.3"
77-
},
78-
"packageManager": "[email protected]+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
77+
}
7978
}

src/context.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const UpdateContext = createContext<{
4141
lastError?: Error;
4242
}>(defaultContext);
4343

44-
export const usePushy = () => useContext(UpdateContext);
44+
export const useUpdate = () => useContext(UpdateContext);
4545

46-
export const useCresc = () => useContext(UpdateContext);
46+
export const usePushy = useUpdate;
47+
48+
export const useCresc = useUpdate;

src/provider.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
import { Pushy, Cresc } from './client';
1616
import { currentVersion, packageVersion, getCurrentVersionInfo } from './core';
1717
import { CheckResult, ProgressData, UpdateTestPayload } from './type';
18-
import { ClientContext } from './context';
18+
import { UpdateContext } from './context';
1919
import { URL } from 'react-native-url-polyfill';
2020
import { isInRollout } from './isInRollout';
2121
import { log } from './utils';
@@ -335,7 +335,7 @@ export const UpdateProvider = ({
335335
}, [parseTestPayload]);
336336

337337
return (
338-
<ClientContext.Provider
338+
<UpdateContext.Provider
339339
value={{
340340
checkUpdate,
341341
switchVersion,
@@ -354,7 +354,7 @@ export const UpdateProvider = ({
354354
parseTestQrCode,
355355
}}>
356356
{children}
357-
</ClientContext.Provider>
357+
</UpdateContext.Provider>
358358
);
359359
};
360360

0 commit comments

Comments
 (0)