1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-16 12:11:39 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

add cresc

This commit is contained in:
sunnylqm
2025-02-21 18:41:39 +08:00
parent 66c2504718
commit e150db486a
3 changed files with 9 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "react-native-update", "name": "react-native-update",
"version": "10.23.1", "version": "10.24.0",
"description": "react-native hot update", "description": "react-native hot update",
"main": "src/index", "main": "src/index",
"scripts": { "scripts": {
@@ -74,6 +74,5 @@
"react-native": "0.73", "react-native": "0.73",
"ts-jest": "^29.2.5", "ts-jest": "^29.2.5",
"typescript": "^5.6.3" "typescript": "^5.6.3"
}, }
"packageManager": "yarn@1.22.21+sha1.1959a18351b811cdeedbd484a8f86c3cc3bbaf72"
} }

View File

@@ -41,6 +41,8 @@ export const UpdateContext = createContext<{
lastError?: Error; lastError?: Error;
}>(defaultContext); }>(defaultContext);
export const usePushy = () => useContext(UpdateContext); export const useUpdate = () => useContext(UpdateContext);
export const useCresc = () => useContext(UpdateContext); export const usePushy = useUpdate;
export const useCresc = useUpdate;

View File

@@ -15,7 +15,7 @@ import {
import { Pushy, Cresc } from './client'; import { Pushy, Cresc } from './client';
import { currentVersion, packageVersion, getCurrentVersionInfo } from './core'; import { currentVersion, packageVersion, getCurrentVersionInfo } from './core';
import { CheckResult, ProgressData, UpdateTestPayload } from './type'; import { CheckResult, ProgressData, UpdateTestPayload } from './type';
import { ClientContext } from './context'; import { UpdateContext } from './context';
import { URL } from 'react-native-url-polyfill'; import { URL } from 'react-native-url-polyfill';
import { isInRollout } from './isInRollout'; import { isInRollout } from './isInRollout';
import { log } from './utils'; import { log } from './utils';
@@ -335,7 +335,7 @@ export const UpdateProvider = ({
}, [parseTestPayload]); }, [parseTestPayload]);
return ( return (
<ClientContext.Provider <UpdateContext.Provider
value={{ value={{
checkUpdate, checkUpdate,
switchVersion, switchVersion,
@@ -354,7 +354,7 @@ export const UpdateProvider = ({
parseTestQrCode, parseTestQrCode,
}}> }}>
{children} {children}
</ClientContext.Provider> </UpdateContext.Provider>
); );
}; };