Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@babel/cli
Advanced tools
The @babel/cli package is a command-line interface for Babel, a widely used JavaScript compiler. It allows developers to compile their JavaScript files using Babel directly from the command line. This package is particularly useful for compiling modern JavaScript down to a version that is compatible with older browsers or environments. It supports various functionalities such as file transformation, watching files for changes, and outputting the compiled code.
File Transformation
This feature allows you to transform a single JavaScript file. The command takes an input file (src/index.js) and compiles it into an output file (compiled.js).
babel src/index.js --out-file compiled.js
Directory Transformation
Transforms all JavaScript files in a directory. This command compiles all files in the 'src' directory and outputs the compiled files into the 'lib' directory.
babel src --out-dir lib
Watch Mode
Automatically recompiles files when they change. This command watches all files in the 'src' directory for changes and recompiles them to the 'lib' directory whenever any file is modified.
babel src --watch --out-dir lib
TypeScript is a superset of JavaScript that compiles down to plain JavaScript. It offers type checking and is aimed at the development of large applications. While TypeScript provides its own compiler, it serves a slightly different purpose than @babel/cli but overlaps in the sense that both compile code to JavaScript.
Webpack is a static module bundler for JavaScript applications. It processes applications and bundles them into one or more bundles. It can be configured to use Babel through loaders (e.g., babel-loader) for compiling JavaScript. Webpack offers a broader range of functionalities compared to @babel/cli, including bundling, asset management, and optimization features.
Rollup is another module bundler for JavaScript which focuses on the efficiency of the final bundles. Similar to Webpack, it can integrate with Babel to compile JavaScript files. Rollup is often preferred for library development due to its efficient bundling strategy. It provides similar compilation features when used with Babel but is more focused on the bundling aspect.
Babel command line.
See our website @babel/cli for more information or the issues associated with this package.
Using npm:
npm install --save-dev @babel/cli
or using yarn:
yarn add @babel/cli --dev
FAQs
Babel command line.
The npm package @babel/cli receives a total of 2,199,798 weekly downloads. As such, @babel/cli popularity was classified as popular.
We found that @babel/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.