Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@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 243,951 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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.