![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@swc/core-darwin-arm64
Advanced tools
The @swc/core-darwin-arm64 npm package is a precompiled binary of SWC (Speedy Web Compiler) specifically for macOS on ARM64 architecture. SWC is a super-fast compiler written in Rust that compiles JavaScript/TypeScript down to efficient, optimized JavaScript code. It is designed to be used as a faster alternative to Babel and can perform tasks such as transpilation, minification, and bundling.
Transpilation
Transpiles TypeScript or modern JavaScript to a specified ECMAScript target version. The code sample demonstrates how to transpile TypeScript code to ES5.
const { transformSync } = require('@swc/core-darwin-arm64');
const sourceCode = `const x: number = 1;`;
const output = transformSync(sourceCode, {
filename: 'example.ts',
jsc: {
parser: {
syntax: 'typescript',
},
target: 'es5',
},
});
console.log(output.code);
Minification
Minifies JavaScript code to reduce file size by removing unnecessary characters and renaming variables. The code sample shows how to minify a simple function.
const { minifySync } = require('@swc/core-darwin-arm64');
const sourceCode = `function add(a, b) { return a + b; }`;
const minified = minifySync(sourceCode, {
compress: true,
mangle: true
});
console.log(minified.code);
Source Maps
Generates source maps to help with debugging by mapping the transformed code back to the original source code. The code sample demonstrates generating a source map for a file.
const { transformFileSync } = require('@swc/core-darwin-arm64');
const result = transformFileSync('input.js', {
sourceMaps: true,
filename: 'input.js',
jsc: {
target: 'es5'
}
});
console.log(result.map);
Babel is a widely-used JavaScript compiler that allows you to use next-generation JavaScript, today. It is similar to SWC in that it can transpile ES6 and beyond into backwards compatible JavaScript. Babel is highly configurable but generally slower than SWC due to being written in JavaScript.
The TypeScript compiler is similar to SWC when it comes to transpiling TypeScript code to JavaScript. However, TypeScript does not include a bundler or minifier and is focused solely on type-checking and transpilation.
Esbuild is an extremely fast JavaScript bundler and minifier. Like SWC, it is written in a compiled language (Go) and focuses on speed. It provides similar functionalities in terms of transpilation and minification but also includes a bundling feature.
Terser is a JavaScript parser, mangler, and compressor toolkit for ES6+. It is similar to the minification aspect of SWC but does not handle transpilation or bundling.
@swc/core-darwin-arm64
This is the aarch64-apple-darwin binary for @swc/core
[1.10.12] - 2025-01-29
FAQs
Super-fast alternative for babel
The npm package @swc/core-darwin-arm64 receives a total of 1,218,684 weekly downloads. As such, @swc/core-darwin-arm64 popularity was classified as popular.
We found that @swc/core-darwin-arm64 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.