Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
babel-preset-react-native-stage-0
Advanced tools
Have you encountered weird errors in React Native when trying to use babel-preset-react-native
and babel-preset-stage-0
together? Are you generally just confused and frustrating by how hard it is to use the latest and greatest Babel features on RN? This preset is for you!
npm install babel-preset-react-native-stage-0 --save
Just add a .babelrc
file to your React Native project that looks like this:
{
"presets": ["react-native-stage-0"]
}
Do you want/need experimental legacy decorator support (provided by babel-plugin-transform-decorators-legacy)? Use this as your .babelrc instead:
{
"presets": ["react-native-stage-0/decorator-support"]
}
Q: I added stage-0
to my "presets" list, and now everything is broken!
A: Don't do that! This preset supersedes the need for including the stage-0 preset, and works properly with React Native.
Q: I changed my .babelrc to the above, but I'm still getting strange Babel errors!
A: Have you cleared your packager cache? Run the following:
watchman watch-del-all
[the command you use to start the packager] --reset-cache
If things are still broken, open an issue and I'll try to help you. I may say "not a problem with this preset", and make you go open an issue on the react-native repo. Don't be mad at me if I do that!
FAQs
Enable stage-0 Babel features on React Native.
The npm package babel-preset-react-native-stage-0 receives a total of 2,874 weekly downloads. As such, babel-preset-react-native-stage-0 popularity was classified as popular.
We found that babel-preset-react-native-stage-0 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.