{"name":"@swc-node/core","version":"1.15.0","description":"Faster swc nodejs binding","keywords":["swc","babel","esbuild","rust","n-api","napi","node-rs","uglify","napi-rs","terser","webpack","ts-node","typescript","tsc"],"author":"LongYinan <github@lyn.one>","homepage":"https://github.com/swc-project/swc-node","license":"MIT","main":"lib/index.js","typings":"lib/index.d.ts","engines":{"node":">= 10"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"repository":{"type":"git","url":"git+https://github.com/swc-project/swc-node.git"},"bugs":{"url":"https://github.com/swc-project/swc-node/issues"},"peerDependencies":{"@swc/core":">= 1.13.3","@swc/types":">= 0.1"},"devDependencies":{"@swc/core":"^1.13.3","@swc/types":"^0.1.24"},"funding":{"type":"github","url":"https://github.com/sponsors/Brooooooklyn"},"_nodeVersion":"24.18.0","_id":"@swc-node/core@1.15.0","dist":{"integrity":"sha512-WAerrrl087WgenB92XG4Th2t0NQFfMNLYSe0sW2cEMMqM/LQmP4rozsDJl0vuzTrbewjpKQryxFXI+aYig/dBg==","shasum":"4b50da5f244c5b53a6bbf5a3fe6a7c75b895d1c8","tarball":"http://registry-npm.ywwl.com/@swc-node/core/download/@swc-node/core-1.15.0.tgz","fileCount":7,"unpackedSize":48546,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@swc-node%2fcore@1.15.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCtA4uJ7sL9U8cTnBFIVlggT5O1y9f+8Hx6j6DmwO1oNwIgc2I+KuWBryjny4RrAQg38SD+wK3jwhuuPMOkGM7yk+8="}],"size":14431,"noattachment":false,"key":"/@swc-node/core/-/@swc-node/core-1.15.0.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:faac5520-d921-4107-8d01-4143277e1a65"}},"directories":{},"maintainers":[{"name":"broooooklyn","email":"lynweklm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_1.15.0_1784191182578_0.3428871093909489"},"_hasShrinkwrap":false,"readme":"# `@swc-node/core`\n\n<a href=\"https://npmcharts.com/compare/@swc-node/core?minimal=true\"><img src=\"https://img.shields.io/npm/dm/@swc-node/core.svg?sanitize=true\" alt=\"Downloads\" /></a>\n\n> 🚀 Help me to become a full-time open-source developer by [sponsoring me on Github](https://github.com/sponsors/Brooooooklyn)\n\n## Benchmark\n\n> transform AjaxObservable.ts to ES2015 & CommonJS `JavaScript`.\n\n```\n@swc-node/core x 151 ops/sec ±3.74% (77 runs sampled)\n@swc/core x 107 ops/sec ±0.51% (78 runs sampled)\nesbuild x 52.89 ops/sec ±1.58% (67 runs sampled)\ntypescript x 21.08 ops/sec ±9.68% (40 runs sampled)\nTransform rxjs/AjaxObservable.ts benchmark bench suite: Fastest is @swc-node/core\n```\n\n## Usage\n\n```ts\nexport interface Options {\n  target?: 'es3' | 'es5' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020'\n  module?: 'commonjs' | 'umd' | 'amd' | 'es6'\n  sourcemap?: boolean | 'inline'\n  experimentalDecorators?: boolean\n  emitDecoratorMetadata?: boolean\n  dynamicImport?: boolean\n  esModuleInterop?: boolean\n  keepClassNames?: boolean\n  react?: Partial<ReactConfig>\n  paths?: {\n    [from: string]: [string]\n  }\n}\n\nexport interface ReactConfig {\n  /**\n   * Replace the function used when compiling JSX expressions.\n   *\n   * Defaults to `React.createElement`.\n   */\n  pragma: string\n  /**\n   * Replace the component used when compiling JSX fragments.\n   *\n   * Defaults to `React.Fragment`\n   */\n  pragmaFrag: string\n  /**\n   * Toggles whether or not to throw an error if a XML namespaced tag name is used. For example:\n   * `<f:image />`\n   *\n   * Though the JSX spec allows this, it is disabled by default since React's\n   * JSX does not currently have support for it.\n   *\n   */\n  throwIfNamespace: boolean\n  /**\n   * Toggles plugins that aid in development, such as @swc/plugin-transform-react-jsx-self\n   * and @swc/plugin-transform-react-jsx-source.\n   *\n   * Defaults to `false`,\n   *\n   */\n  development: boolean\n  /**\n   * Use `Object.assign()` instead of `_extends`. Defaults to false.\n   */\n  useBuiltins: boolean\n}\n\nexport function transformSync(\n  source: string | Buffer,\n  path: string,\n  options?: Options,\n): {\n  code: string\n  map: string\n}\n\nexport function transform(\n  source: string | Buffer,\n  path: string,\n  options?: Options,\n): Promise<{\n  code: string\n  map: string\n}>\n```\n","publish_time":1784191182735,"_cnpm_publish_time":1784191182735,"dist-tags":{"latest":"1.15.0"}}