[Snyk] Upgrade react-native-web from 0.13.18 to 0.18.9 #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade react-native-web from 0.13.18 to 0.18.9.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version fixes:
SNYK-JS-NODEFETCH-674311
Why? CVSS 5.9
SNYK-JS-NODEFETCH-2342118
Why? CVSS 5.9
(*) Note that the real score may have changed since the PR was raised.
Release notes
Package name: react-native-web
0.18.9
0.18.8
0.18.7
0.18.6
0.18.5
0.18.4
0.18.3
0.18.2
0.18.1
Breaking changes
StyleSheet.create()
is now the identify function, returning the input style objects. Previously, it replaced styles with numeric ids. This improves compatibility with React Native, but accessing the returned style objects at runtime is still not recommended as it can prevent static extraction to CSS. (#2068)StyleSheet.getSheet()
can be used on the server to retrieve the current style sheet as a CSS string. (#2196)I18nManager
is now a mock API included only for compatibility with React Native. The ability to flip left/right properties or values has now been removed entirely (use start/end instead). See below for new localization APIs.StyleSheet.create()
.accessible
,accessibilityState
, andaccessibilityValue
props have been removed.:focus-visible
polyfill has been removed, as by default modern browsers no longer show focus rings for pointer interactions.unstable_createElement
API has changed. Children are no longer accepted as the 3rd argument, they must be included in the props as the 2nd argument. The 3rd argument is now an options object with a field to set the expected writing direction ({ writingDirection }
).New features
dir
orlang
prop on a component. By default, layouts are rendering RTL. To render RTL you must setdir="rtl"
on an outer element rendered by React.useLocaleContext
is a new export API. Use it to query a component's locale and writing direction context for fine-grained control over localized layout.StyleSheet.flatten
cannot work with extracted styles. (See below for more details.)Fixes
CheckBox
andSwitch
elements. (#2242)Linking.openURL
supportstarget
value. (#2277)Notes
StyleSheet runtime
StyleSheet
has been rewritten to better separate the runtime from the compiler. The performance of the new merging runtime is on par with using css-modules. The core runtime is a standalone package called styleQ; refer to the styleQ documentation for more details.The performance of inline styles has also been significantly improved, although
StyleSheet
still has to perform extra work to transform non-standard React Native styles and polyfill logical styles.The
StyleSheet
import is now a standalone module.StyleSheet
itself is a function that can be called to resolve styles to DOMclassName
andstyle
values, e.g.,StyleSheet extraction
One of the benefits behind the new architecture is that
StyleSheet
can resolve compiled styles that conform to the expected format, whether they are produced by the built-in compiler or an external source. However, this is not yet recommended, as explained below.Style compilers must produce annotated objects that are treated as class name maps, and classes are de-duplicated based on whether they share the same key, e.g.,
This is the first step towards allowing 3rd party tools to extract styles to static CSS files, and optionally dropping the client-side compiler, without needing to integrate deeply with the
StyleSheet
runtime or having to modify props/prop values in the source code, i.e., only theStyleSheet.create()
call needs transforming by the compiler.The existence of the
StyleSheet.flatten()
API is a problem for build-time compiling of some styles. Components that flatten styles (e.g.,Animated
,Image
) expect to be able to work with the source styles, and use the source values at runtime. A compiler that aims to extract all styles and have no runtime transform would also need to disallow the use ofStyleSheet.flatten()
entirely. A future release of React Native for Web may remove use ofStyleSheet.flatten
from internal implementations, but cannot prevent this API from being used in product code or 3rd party packages.Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs