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

13
9

3.25.0

Diff

Changelog

Source

3.25.0 (2022-08-01)

  • Add two new options to more closely match the module: nodenext option from TypeScript 4.7:
    • When using the imports transform, the new flag preserveDynamicImport will leave dynamic import() calls alone rather than compiling them to promise-wrapped require. This makes it possible to load ESM modules from CommonJS. ([#727])
    • When not using the imports transform, the new flag injectCreateRequireForImportRequire will compile import foo = require("foo"); to use createRequire so that can work in a Node ES module. ([#728])
  • When disableESTransforms is enabled, remove abstract fields in the same way that declare fields are removed. This matches TypeScript's behavior. ([#732])
alangpierce
published 3.24.0 •

Changelog

Source

3.24.0 (2022-07-14)

  • Add support for all new syntax in TypeScript 4.7: ([#719])
    • Instantiation expressions: const NumberSet = Set<number>;
    • extends on infer: T extends [infer S extends string, ...unknown[]] ? S : never;
    • Variance annotations: type Getter<out T> = () => T;
  • Add parsing support for the accessor keyword in ES decorators. ([#716])
  • Fix invalid ESM output that sometimes happened when eliding TS star imports. ([#723])
  • Fix lots of parser edge case bugs. Examples of code that confused the parser before but now works:
    • a as b ?? c ([#721])
    • const a: Array<number>=[]; ([#717])
    • f<<T>() => void>() ([#716])
    • Some additional cases involving line break handling. ([#714])
  • Fix some edge cases with JSX entity transformation. ([#717])
alangpierce
published 3.23.0 •

Changelog

Source

3.23.0 (2022-07-01)

  • Add support for TS 4.5 import/export type modifiers. ([#713])
  • Fix parsing bug that failed on scientific notation with dot access. ([#711])
alangpierce
published 3.22.0 •

Changelog

Source

3.22.0 (2022-06-27)

  • Add support for Flow enums. ([#708], [#709])
  • Fix some parser bugs when detecting arrow functions. ([#673])
alangpierce
published 3.21.1 •

Changelog

Source

3.21.1 (2022-06-21)

  • Allow re-export after star export of same name. ([#698]) (Cameron Pitt)
alangpierce
published 3.21.0 •

Changelog

Source

3.21.0 (2022-04-06)

  • Restructure package directory layout to better support ESM. ([#684]) (Neo Nie)
alangpierce
published 3.20.3 •

Changelog

Source

3.20.3 (2021-10-18)

  • Allow the names true, false, and null as TS enum keys. ([#656], [#657]) (pushkine, Alan Pierce)
  • Properly handle TS definite assignment assertions for private fields and when disabling the class transform. ([#658])
alangpierce
published 3.20.2 •

Changelog

Source

3.20.2 (2021-10-07)

  • Fix ASI issue that broke function declarations immediately following a default export. ([#648]) (Ben Lambert)
alangpierce
published 3.20.1 •

Changelog

Source

3.20.1 (2021-08-09)

  • Fix transformation of anonymous "export default" classes. ([#614]) (Matthieu Gicquel)
  • Handle shadowed globals when they are JSX names. ([#642]) (Matthieu Gicquel)
alangpierce
published 3.20.0 •

Changelog

Source

3.20.0 (2021-07-07)

  • Various small bug fixes and upcoming JS feature support in the parser. ([#632], [#635], [#637])
  • Add support for TypeScript 4.2 abstract constructor signatures. ([#635])
  • Add support for TypeScript 4.3 override, static index signatures, and get/set type members. ([#636]) (Lucas Garron, Alan Pierce)
  • Add support for Flow indexed access types and optional indexed access types. ([#636], [#637])
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