
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@volvo-cars/babel-preset-react-app
Advanced tools
This package includes a Babel preset suitable for React apps and libraries at Volvo Cars.
This preset uses the useBuiltIns
option with some transforms, which assumes that Object.assign
is available or polyfilled. It should be if you use @babel/polyfill
or @volvo-cars/polyfill.
npm install @volvo-cars/babel-preset-react-app
# or
yarn add @volvo-cars/babel-preset-react-app
Add the following to your .babelrc
or "babel"
in package.json
:
{
"presets": ["@volvo-cars/babel-preset-react-app"]
}
You should not need any other presets (like preset-env
or preset-react
) for production builds. If you are missing a transform that you believe can be useful, feel free to make a pull request to this preset to add it.
To compile your code add something like this to your package.json:
{
"main": "lib/index.js",
"module": "es/index.js",
"files": ["lib", "es"],
"scripts": {
"build:lib": "babel src --out-dir lib --delete-dir-on-start",
"build:es": "babel src --env-name esmodules --out-dir es --delete-dir-on-start",
"build": "yarn run build:lib && yarn run build:es"
}
}
To avoid duplicating Babel's helper functions in each compiled file, you can do
yarn add @babel/runtime@^7.4.0
{
"presets": [["@volvo-cars/babel-preset-react-app", { "importHelpers": true }]]
}
This is not the default because it requires an extra package to be installed, but is highly recommended.
importHelpers
(boolean
, defaults to false
) - Replace Babel helpers (classCallCheck, extends, etc) are with imports from @babel/runtime
.targets
- Describes the compile target/browser support. See @babel/preset-env#targets. By default uses @volvo-cars/browserslist-config.modules
- The module format to target. See @babel/preset-env#modulesTo compile for different targets but otherwise using the same config, you can use Babel's --env-name
flag to set some options.
--env-name esmodules
- Sets modules: false
to make sure modules are not compiled to Common JS.FAQs
Babel preset for React apps in Volvo Cars
The npm package @volvo-cars/babel-preset-react-app receives a total of 1,747 weekly downloads. As such, @volvo-cars/babel-preset-react-app popularity was classified as popular.
We found that @volvo-cars/babel-preset-react-app demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.