react-native-ui-lib 7.46.3-snapshot.7341 → 7.46.3-snapshot.7352

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/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uilib-native",
3
- "version": "5.0.0-snapshot.7341",
3
+ "version": "5.0.0-snapshot.7352",
4
4
  "homepage": "https://github.com/wix/react-native-ui-lib",
5
5
  "description": "uilib native components (separated from js components)",
6
6
  "main": "components/index",
@@ -17,7 +17,7 @@
17
17
  "shell-utils": "^1.0.10"
18
18
  },
19
19
  "peerDependencies": {
20
- "react": ">=17.0.1",
21
- "react-native": ">=0.64.1"
20
+ "react": ">=18.3.1",
21
+ "react-native": ">=0.77.3"
22
22
  }
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "7.46.3-snapshot.7341",
3
+ "version": "7.46.3-snapshot.7352",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -78,10 +78,10 @@
78
78
  "@react-native-community/cli-platform-ios": "15.0.1",
79
79
  "@react-native-community/datetimepicker": "8.2.0",
80
80
  "@react-native-community/netinfo": "11.3.3",
81
- "@react-native/babel-preset": "0.77.2",
82
- "@react-native/eslint-config": "0.77.2",
83
- "@react-native/metro-config": "0.77.2",
84
- "@react-native/typescript-config": "0.77.2",
81
+ "@react-native/babel-preset": "0.77.3",
82
+ "@react-native/eslint-config": "0.77.3",
83
+ "@react-native/metro-config": "0.77.3",
84
+ "@react-native/typescript-config": "0.77.3",
85
85
  "@shopify/flash-list": "1.7.6",
86
86
  "@testing-library/react-hooks": "^8.0.1",
87
87
  "@testing-library/react-native": "^11.5.1",
@@ -89,7 +89,7 @@
89
89
  "@types/jest": "^29.5.13",
90
90
  "@types/lodash": "^4.0.0",
91
91
  "@types/prop-types": "^15.5.3",
92
- "@types/react": "18.3.7",
92
+ "@types/react": "18.3.24",
93
93
  "@types/react-test-renderer": "^18.3.0",
94
94
  "@types/tinycolor2": "^1.4.2",
95
95
  "@types/url-parse": "^1.4.3",
@@ -111,12 +111,12 @@
111
111
  "postcss-js": "^4.0.0",
112
112
  "prettier": "^3.2.5",
113
113
  "prettier-eslint": "16.3.0",
114
- "react": "18.2.0",
114
+ "react": "18.3.1",
115
115
  "react-autobind": "^1.0.6",
116
- "react-dom": "^18.2.0",
117
- "react-native": "0.77.2",
116
+ "react-dom": "18.3.1",
117
+ "react-native": "0.77.3",
118
118
  "react-native-fs": "^2.20.0",
119
- "react-native-gesture-handler": "2.22.1",
119
+ "react-native-gesture-handler": "2.24.0",
120
120
  "react-native-haptic-feedback": "^1.11.0",
121
121
  "react-native-linear-gradient": "2.6.2",
122
122
  "react-native-mmkv": "3.2.0",
@@ -132,9 +132,9 @@
132
132
  "typescript": "5.0.4"
133
133
  },
134
134
  "peerDependencies": {
135
- "react": ">=17.0.1",
136
- "react-native": ">=0.77.0",
137
- "react-native-gesture-handler": ">=2.22.0",
135
+ "react": ">=18.3.1",
136
+ "react-native": ">=0.77.3",
137
+ "react-native-gesture-handler": ">=2.24.0",
138
138
  "react-native-reanimated": ">=3.17.5",
139
139
  "react-native-ui-lib": "*"
140
140
  },
@@ -71,6 +71,7 @@ async function fetchMergedPRs(postMergedDate, _repo, isPatchRelease) {
71
71
  info: parsePR(pr.body)
72
72
  };
73
73
  } catch {
74
+ // eslint-disable-next-line no-restricted-syntax
74
75
  console.error('Failed parsing PR: ', pr.url);
75
76
  return null;
76
77
  }
@@ -164,9 +165,7 @@ function getReleaseNotesForType(PRs, title) {
164
165
  return releaseNotes;
165
166
  }
166
167
 
167
- async function _generateReleaseNotes(latestVersion, newVersion, fileNamePrefix, repo, header, tagPrefix, categories, isPatchRelease) {
168
- const latestReleaseDate = fetchLatestReleaseDate(tagPrefix, latestVersion);
169
- const PRs = await fetchMergedPRs(latestReleaseDate, repo, isPatchRelease);
168
+ function generateReleaseNotesFromPRs(PRs, categories, header) {
170
169
  if (!PRs) {
171
170
  return;
172
171
  }
@@ -198,10 +197,20 @@ async function _generateReleaseNotes(latestVersion, newVersion, fileNamePrefix,
198
197
 
199
198
  releaseNotes += getTitle(':bulb: Deprecations & Migrations');
200
199
 
200
+ return releaseNotes;
201
+ }
202
+
203
+ // eslint-disable-next-line max-len, max-params
204
+ async function _generateReleaseNotes(latestVersion, newVersion, fileNamePrefix, repo, header, tagPrefix, categories, isPatchRelease) {
205
+ const latestReleaseDate = fetchLatestReleaseDate(tagPrefix, latestVersion);
206
+ const PRs = await fetchMergedPRs(latestReleaseDate, repo, isPatchRelease);
207
+ const releaseNotes = generateReleaseNotesFromPRs(PRs, categories, header);
208
+
201
209
  fs.writeFileSync(`${process.env.HOME}/Downloads/${fileNamePrefix}-release-notes_${newVersion}.txt`, releaseNotes, {
202
210
  encoding: 'utf8'
203
211
  });
204
212
 
213
+ // eslint-disable-next-line max-len
205
214
  console.log(`\x1b[1m\x1b[32m✔\x1b[0m \x1b[32m${fileNamePrefix}-release-notes.txt was successfully written to ${process.env.HOME}/Downloads\x1b[0m \x1b[1m\x1b[32m✔\x1b[0m`);
206
215
  }
207
216
 
@@ -212,6 +221,7 @@ function isPatchRelease(lastVersion, newVersion) {
212
221
  return lastMajor === newMajor && lastMinor === newMinor && newPatch - lastPatch > 0;
213
222
  }
214
223
 
224
+ // eslint-disable-next-line max-params
215
225
  async function generateReleaseNotes(latestVersion,
216
226
  newVersion,
217
227
  fileNamePrefix,
@@ -238,8 +248,9 @@ async function generateReleaseNotes(latestVersion,
238
248
  const header = getHeader(newVer);
239
249
  console.info(`Current latest version is v${latestVer}`);
240
250
  console.info(`Generating release notes out or PRs for v${newVer}`);
251
+ // eslint-disable-next-line max-len
241
252
  _generateReleaseNotes(latestVer, newVer, fileNamePrefix, repo, header, tagPrefix, categories, isPatchRelease(latestVer, newVer));
242
253
  });
243
254
  }
244
255
 
245
- module.exports = {generateReleaseNotes};
256
+ module.exports = {generateReleaseNotes, generateReleaseNotesFromPRs, parsePR};
@@ -1,5 +1,5 @@
1
1
  // TODO: consider unify this component functionality with our Image component
2
- import React, { useState, useCallback, useMemo } from 'react';
2
+ import React, { useState, useCallback, useMemo, useEffect } from 'react';
3
3
  import { StyleSheet } from 'react-native';
4
4
  import Animated, { useSharedValue, useAnimatedStyle, withTiming } from 'react-native-reanimated';
5
5
  import View from "../../components/view";
@@ -31,6 +31,11 @@ const AnimatedImage = props => {
31
31
  opacity.value = 1;
32
32
  }
33
33
  }, [loader]);
34
+ useEffect(() => {
35
+ setIsLoading(true);
36
+ propsOnLoadStart?.();
37
+ // eslint-disable-next-line react-hooks/exhaustive-deps
38
+ }, [source]);
34
39
  const onLoad = useCallback(event => {
35
40
  setIsLoading(false);
36
41
  propsOnLoad?.(event);
@@ -43,10 +48,13 @@ const AnimatedImage = props => {
43
48
  },
44
49
  // eslint-disable-next-line react-hooks/exhaustive-deps
45
50
  [setIsLoading, propsOnLoad, animationDuration]);
46
- const onLoadStart = useCallback(() => {
47
- setIsLoading(true);
48
- propsOnLoadStart?.();
49
- }, [setIsLoading, propsOnLoadStart, animationDuration]);
51
+
52
+ // TODO: revert to this solution when iOS is fixed (RN77 bug)
53
+ // const onLoadStart = useCallback(() => {
54
+ // setIsLoading(true);
55
+ // propsOnLoadStart?.();
56
+ // }, [setIsLoading, propsOnLoadStart, animationDuration]);
57
+
50
58
  const fadeInStyle = useAnimatedStyle(() => {
51
59
  return {
52
60
  opacity: opacity.value
@@ -56,7 +64,9 @@ const AnimatedImage = props => {
56
64
  // eslint-disable-next-line react-hooks/exhaustive-deps
57
65
  const _style = useMemo(() => [style, fadeInStyle], [style]);
58
66
  return <View style={containerStyle}>
59
- <UIAnimatedImage {...others} style={_style} source={source} onLoad={onLoad} onLoadStart={onLoadStart} testID={testID} imageStyle={undefined} />
67
+ <UIAnimatedImage {...others} style={_style} source={source} onLoad={onLoad}
68
+ // onLoadStart={onLoadStart}
69
+ testID={testID} imageStyle={undefined} />
60
70
  {isLoading && loader && <View style={styles.loader}>{loader}</View>}
61
71
  </View>;
62
72
  };