mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-16 12:11:39 +08:00
Use nanoid
This commit is contained in:
@@ -21,6 +21,11 @@ if (!Pushy) {
|
||||
throw new Error('react-native-update模块无法加载,请对照安装文档检查配置。');
|
||||
}
|
||||
|
||||
// TODO: save and export current version info
|
||||
// name
|
||||
// description
|
||||
// metaInfo
|
||||
|
||||
export const downloadRootDir = Pushy.downloadRootDir;
|
||||
export const packageVersion = Pushy.packageVersion;
|
||||
export const currentVersion = Pushy.currentVersion;
|
||||
@@ -39,7 +44,7 @@ if (Platform.OS === 'android' && !Pushy.isUsingBundleUrl) {
|
||||
const eventEmitter = new NativeEventEmitter(Pushy);
|
||||
|
||||
if (!uuid) {
|
||||
uuid = require('uuid/v4')();
|
||||
uuid = require('nanoid/non-secure')();
|
||||
Pushy.setUuid(uuid);
|
||||
}
|
||||
|
||||
|
@@ -28,6 +28,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/reactnativecn/react-native-pushy#readme",
|
||||
"dependencies": {
|
||||
"uuid": "3"
|
||||
"nanoid": "^3.1.28"
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
uuid@3:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
|
||||
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
|
||||
nanoid@^3.1.28:
|
||||
version "3.1.28"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.28.tgz#3c01bac14cb6c5680569014cc65a2f26424c6bd4"
|
||||
integrity sha512-gSu9VZ2HtmoKYe/lmyPFES5nknFrHa+/DT9muUFWFMi6Jh9E1I7bkvlQ8xxf1Kos9pi9o8lBnIOkatMhKX/YUw==
|
||||
|
Reference in New Issue
Block a user