Socket
Socket
Sign inDemoInstall

@esbuild/darwin-arm64

Package Overview
Dependencies
0
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @esbuild/darwin-arm64

The macOS ARM 64-bit binary for esbuild, a JavaScript bundler.


Version published
Maintainers
2
Created

Package description

What is @esbuild/darwin-arm64?

The @esbuild/darwin-arm64 npm package is a binary package for the esbuild bundler and minifier. It is specifically compiled for macOS on ARM64 architecture (Apple Silicon). Esbuild is a fast JavaScript bundler and minifier that compiles TypeScript, JavaScript, and JSX files into a single output file. It is designed to be extremely fast and efficient, taking advantage of parallelism and native code execution.

What are @esbuild/darwin-arm64's main functionalities?

Bundling JavaScript

This feature allows you to bundle multiple JavaScript files into a single output file, which can be used in a browser or other JavaScript environment.

require('esbuild').build({
  entryPoints: ['app.js'],
  bundle: true,
  outfile: 'out.js'
}).catch(() => process.exit(1))

Minifying JavaScript

This feature enables the minification of JavaScript code to reduce file size and improve load times in production environments.

require('esbuild').build({
  entryPoints: ['app.js'],
  minify: true,
  outfile: 'out.js'
}).catch(() => process.exit(1))

Transpiling TypeScript

This feature allows you to transpile TypeScript code into JavaScript, enabling you to use TypeScript's advanced features while maintaining compatibility with JavaScript environments.

require('esbuild').build({
  entryPoints: ['app.ts'],
  bundle: true,
  outfile: 'out.js'
}).catch(() => process.exit(1))

JSX Support

This feature provides support for JSX syntax, commonly used in React applications, allowing you to bundle and transpile JSX files directly.

require('esbuild').build({
  entryPoints: ['app.jsx'],
  bundle: true,
  outfile: 'out.js'
}).catch(() => process.exit(1))

Other packages similar to @esbuild/darwin-arm64

Changelog

Source

0.19.12

  • The "preserve" JSX mode now preserves JSX text verbatim (#3605)

    The JSX specification deliberately doesn't specify how JSX text is supposed to be interpreted and there is no canonical way to interpret JSX text. Two most popular interpretations are Babel and TypeScript. Yes they are different (esbuild deliberately follows TypeScript by the way).

    Previously esbuild normalized text to the TypeScript interpretation when the "preserve" JSX mode is active. However, "preserve" should arguably reproduce the original JSX text verbatim so that whatever JSX transform runs after esbuild is free to interpret it however it wants. So with this release, esbuild will now pass JSX text through unmodified:

    // Original code
    let el =
      <a href={'/'} title='&apos;&quot;'> some text
        {foo}
          more text </a>
    
    // Old output (with --loader=jsx --jsx=preserve)
    let el = <a href="/" title={`'"`}>
      {" some text"}
      {foo}
      {"more text "}
    </a>;
    
    // New output (with --loader=jsx --jsx=preserve)
    let el = <a href={"/"} title='&apos;&quot;'> some text
        {foo}
          more text </a>;
    
  • Allow JSX elements as JSX attribute values

    JSX has an obscure feature where you can use JSX elements in attribute position without surrounding them with {...}. It looks like this:

    let el = <div data-ab=<><a/><b/></>/>;
    

    I think I originally didn't implement it even though it's part of the JSX specification because it previously didn't work in TypeScript (and potentially also in Babel?). However, support for it was silently added in TypeScript 4.8 without me noticing and Babel has also since fixed their bugs regarding this feature. So I'm adding it to esbuild too now that I know it's widely supported.

    Keep in mind that there is some ongoing discussion about removing this feature from JSX. I agree that the syntax seems out of place (it does away with the elegance of "JSX is basically just XML with {...} escapes" for something arguably harder to read, which doesn't seem like a good trade-off), but it's in the specification and TypeScript and Babel both implement it so I'm going to have esbuild implement it too. However, I reserve the right to remove it from esbuild if it's ever removed from the specification in the future. So use it with caution.

  • Fix a bug with TypeScript type parsing (#3574)

    This release fixes a bug with esbuild's TypeScript parser where a conditional type containing a union type that ends with an infer type that ends with a constraint could fail to parse. This was caused by the "don't parse a conditional type" flag not getting passed through the union type parser. Here's an example of valid TypeScript code that previously failed to parse correctly:

    type InferUnion<T> = T extends { a: infer U extends number } | infer U extends number ? U : never
    

Readme

Source

esbuild

This is the macOS ARM 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.

FAQs

Last updated on 23 Jan 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc