Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sucrase

Package Overview
Dependencies
Maintainers
1
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sucrase - npm Package Versions

23
9

3.35.0

Diff

alangpierce
published 3.34.0 •

Changelog

Source

3.34.0 (2023-07-19)

  • Add CLI options for all remaining Sucrase options, e.g. --disable-es-transforms for disableESTransforms. (<<-ArS, Alan Pierce) ([#670], [#812])
  • Add SUCRASE_OPTIONS environment variable for configuring sucrase/register, sucrase-node, and any programmatic require hook usages. The value must be a valid JSON object of Sucrase options that will be merged with the usual options. ([#813])
alangpierce
published 3.33.0 •

Changelog

Source

3.33.0 (2023-07-14)

  • Add an option keepUnusedImports that disables all automatic import/export elision, equivalent to the TypeScript option verbatimModuleSyntax. ([#811], [#615]) (Kotaro Chikuba, Alan Pierce)
  • Add support for the await using proposal and the updated import attributes proposal. Both are preserved in the output code, not transformed. ([#798])
  • Fix some issues with TypeScript automatic export elision in export {...} from statements. ([#806])
    • Type names from the current file are no longer removed.
    • When all exports are type exports, the entire statement is now removed.
  • Fix bug where fn(x < y, x >= y) was incorrectly parsed as type arguments. ([#798])
  • Fix a few bugs in enableLegacyBabel5ModuleInterop: properly handle as default, and properly ignore type exports. ([#804], [#807]) (三咲智子 Kevin Deng, Alan Pierce)
  • Fix bug where parameters inside function types could be misinterpreted as declarations and result in imports being incorrectly marked as unused. ([#809])
  • Fix bug where import {} and export {} statements were removed with the TypeScript transform disabled. ([#810])
  • Make the transform behavior more forgiving when code accidentally has a return type annotation on a constructor. ([#800])
alangpierce
published 3.32.0 •

Changelog

Source

3.32.0 (2023-04-08)

  • Improve source map quality by adding column information. This fixes several source map use cases, such as Jest inline snapshots, source map composition, and some debugger features. ([#759]) (Emily Marigold Klassen)
    • Unfortunately, this change comes at some performance cost. Previously, the slowdown from enabling source maps was about 10%, and now it is about 30%. In most cases, the more detailed source maps are probably still preferable, so for configuration simplicity, there is currently no option to switch back to source maps without column information. If you would like to still use the faster but less accurate implementation, feel free to file an issue to request a new config option, or create the source map yourself in wrapper code by copying the original simple implementation.
alangpierce
published 3.31.0 •

Changelog

Source

3.31.0 (2023-03-26)

  • Add option to recognize and preserve JSX syntax. ([#788])
  • Fix default export interop behavior when using transpiled dynamic import() to import a plain CJS module. For example, if foo.js has module.exports = 1;, then await import('foo.js') will now evaluate to {default: 1} rather than just 1. Named exports behave the same as before. This change matches the behavior of Node.js and other transpilers, so it is considered a bug fix rather than breaking. If you relied on the old behavior, feel free to file an issue and it may be possible to roll back until the next semver-major release. ([#789], [#790])
alangpierce
published 3.30.0 •

Changelog

Source

3.30.0 (2023-03-20)

  • Add support for new syntax in TypeScript 5.0:
    • export type *. ([#786])
    • const on type parameters. ([#786])
  • Implement parsing for several ES proposals. These are preserved in the output code, not transformed.
    • Import reflection: import module. ([#785])
    • Explicit resource management: using. ([#785])
    • Decorator after export keyword: export @foo class .... ([#786])
  • Fix parsing of << within a type. ([#769])
alangpierce
published 3.29.0 •

Changelog

Source

3.29.0 (2022-11-16)

  • Add support for the TypeScript 4.9 satisfies operator. ([#766])
alangpierce
published 3.28.0 •

Changelog

Source

3.28.0 (2022-10-05)

  • Add ts-node transpiler plugin, available as sucrase/ts-node-plugin. This makes it possible to use Sucrase with all ts-node features such as an ESM loader, a REPL, and configuration via tsconfig.json. ([#729])
alangpierce
published 3.27.0 •

Changelog

Source

3.27.0 (2022-09-15)

  • Add support for assert {type: 'json'} in import statements. ([#746])
alangpierce
published 3.26.0 •

Changelog

Source

3.26.0 (2022-09-12)

  • Add support for the JSX automatic runtime, also known as the React 17 transform. It can be enabled using jsxRuntime: true and configured using the production and jsxImportSource configs. ([#738], [#739], [#742], [#740])
23
9
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc