react-native-update 10.34.4 → 10.34.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "10.34.4",
3
+ "version": "10.34.6",
4
4
  "description": "react-native hot update",
5
5
  "main": "src/index",
6
6
  "scripts": {
@@ -0,0 +1 @@
1
+ module.exports = {};
package/src/client.ts CHANGED
@@ -110,8 +110,7 @@ export class Pushy {
110
110
  this.clientType = clientType || 'Pushy';
111
111
  this.options.server = SERVER_PRESETS[this.clientType];
112
112
 
113
- // Initialize i18n based on clientType
114
- i18n.setLocale(this.clientType === 'Pushy' ? 'zh' : 'en');
113
+ i18n.setLocale(options.locale ?? this.clientType === 'Pushy' ? 'zh' : 'en');
115
114
 
116
115
  if (Platform.OS === 'ios' || Platform.OS === 'android') {
117
116
  if (!options.appKey) {
package/src/type.ts CHANGED
@@ -86,6 +86,7 @@ export interface ClientOptions {
86
86
  appKey: string;
87
87
  server?: UpdateServerConfig;
88
88
  logger?: UpdateEventsLogger;
89
+ locale?: 'zh' | 'en';
89
90
  updateStrategy?:
90
91
  | 'alwaysAlert'
91
92
  | 'alertUpdateAndIgnoreError'