Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@parcel/transformer-js
Advanced tools
@parcel/transformer-js is a JavaScript transformer for Parcel, a web application bundler. It handles the transformation of JavaScript files, including modern JavaScript syntax, JSX, TypeScript, and more, into a format that can be understood by browsers.
Transforming Modern JavaScript
This feature allows you to transform modern JavaScript syntax (ES6+) into a format that is compatible with older browsers.
module.exports = function (bundler) {
bundler.addAssetType('js', require.resolve('@parcel/transformer-js'));
};
Handling JSX
This feature enables the transformation of JSX syntax, commonly used with React, into standard JavaScript.
module.exports = function (bundler) {
bundler.addAssetType('jsx', require.resolve('@parcel/transformer-js'));
};
TypeScript Support
This feature allows you to transform TypeScript files into JavaScript, making it possible to use TypeScript in your projects.
module.exports = function (bundler) {
bundler.addAssetType('ts', require.resolve('@parcel/transformer-js'));
};
Babel is a popular JavaScript compiler that transforms modern JavaScript into a version compatible with older environments. It offers extensive plugins and presets for handling various JavaScript features, including JSX and TypeScript. Compared to @parcel/transformer-js, Babel is more flexible and can be used independently of any bundler.
TypeScript is a language and a set of tools that transpile TypeScript code into JavaScript. It includes a compiler that can be used to transform TypeScript files. While @parcel/transformer-js can handle TypeScript as part of a larger build process, the TypeScript compiler is specifically focused on TypeScript and offers more fine-grained control over the transformation process.
esbuild is an extremely fast JavaScript bundler and minifier. It supports modern JavaScript syntax, JSX, and TypeScript out of the box. Compared to @parcel/transformer-js, esbuild is known for its speed and efficiency, making it a good choice for large projects where build time is a concern.
FAQs
Unknown package
The npm package @parcel/transformer-js receives a total of 302,485 weekly downloads. As such, @parcel/transformer-js popularity was classified as popular.
We found that @parcel/transformer-js demonstrated a healthy version release cadence and project activity because the last version was released less than 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.