Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
babel-preset-episource
Advanced tools
A babel preset for transforming your JavaScript for Episource
A babel preset for transforming your JavaScript for Episource.
Currently contains transforms for all stage 4 (ES2018) and stage 3 syntax. Additionally, stage 4 syntax that is excluded is as follows:
regenerator-runtime
is too heavyweight for our use.async/await
: regenerator-runtime
is too heavyweight for our use, and async-to-promises is not yet complete enough to be safely used.async function
sTo install with all necessary peerDependencies
, use install-peerdeps:
npx install-peerdeps --dev babel-preset-episource
.babelrc
(Recommended).babelrc
{
"presets": ["episource"]
}
$ babel script.js --presets episource
require('@babel/core').transform('code', {
presets: ['episource']
});
This module uses @babel/preset-env to target specific environments.
Please refer to @babel/preset-env#targets for a list of available options.
For a list of browsers please see browserlist.
You may override our default list of targets by providing your own targets
key.
{
"presets": [["episource", {
"targets": {
"chrome": 50,
"ie": 11,
"firefox": 45
}
}]]
}
The following transpiles only for Node v6.
{
"presets": [["episource", {
"targets": {
"node": 6
}
}]]
}
If you wish, you can also inherit our default list of browsers and extend them using additionalTargets
.
{
"presets": [["episource", {
"additionalTargets": {
"chrome": 42,
"ie": 8
}
}]]
}
You may override our default debug option by providing your own debug
key.
{
"presets": [["episource", {
"debug": true
}]]
}
When process.env.NODE_ENV
is 'development'
, the development
mode will be set for @babel/preset-react
.
You may override our default development option by providing your own boolean development
key.
{
"presets": [["episource", {
"development": false
}]]
}
This preset can be configured to remove propTypes using babel-plugin-transform-react-remove-prop-types with the following default options:
To enable this transformation with the default options, set the removePropTypes
option to true
:
{
"presets": [["episource", {
"removePropTypes": true
}]]
}
The default options that will be used are:
{
mode: 'wrap',
additionalLibraries: ['episource-prop-types'],
ignoreFilenames: ['node_modules'],
}
Default options can be overridden using the removePropTypes
option. These options will be shallow-merged with the defaults:
{
"presets": [["episource", {
"removePropTypes": {
"mode": "remove"
}
}]]
}
For example, if you are using this plugin in a deployable app, you might want to use the remove mode for your production build (and disable this transform entirely in development for optimal build speeds).
By default, this preset will compile classes in normal mode. This is safer, but comes with a bundle size and runtime overhead. To compile classes in loose mode, set the looseClasses
option to true
:
{
"presets": [["episource", {
"looseClasses": true,
}]]
}
The risks of enabling loose classes are outlined in the Babel docs.
FAQs
A babel preset for transforming your JavaScript for Episource
The npm package babel-preset-episource receives a total of 95 weekly downloads. As such, babel-preset-episource popularity was classified as not popular.
We found that babel-preset-episource 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.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.