Back to Explore

davidbonnet/astring

GitHub
1 watchersOpen source

Last release: 8/25/2024

Astring is a tiny, fast JavaScript code generator that turns an ESTree-compliant AST into JavaScript source code. It’s useful for projects that need to generate code (optionally with source maps and comments) from ASTs produced by parsers like Acorn or Meriyah.

Project status

  • The repository appears actively maintained, with the most recent upstream push dated 2024-12-01 and a recent update tag v1.9.0 dated 2024-08-25.
  • The apparent update cadence is intermittent rather than frequent, with the prior documented updates dating back to 2023-05-30 (v1.8.6) and 2023-05-19 (v1.8.5), suggesting multi month gaps between updates.

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v1.9.0

    8/25/2024

    No release notes were provided by the publisher for v1.9.0. The code changes for this version primarily add support for the import attributes syntax (`with { ... }`) in Astring’s code generation, along with updated parsing/generation tests and fixtures.

  • v1.8.6

    5/30/2023

    v1.8.6 makes a generator precedence fix related to nullish coalescing (??) when combined with boolean/logical operators (||, &&). The release notes section provided for this version contains no published changes, so the behavioral impact comes entirely from the code diff.

  • v1.8.5

    5/19/2023

    This release (v1.8.5) makes a targeted fix to how the generator handles operator precedence, specifically around the nullish coalescing operator (??). It also updates package metadata to expose TypeScript types via the conditional exports map. No release notes were provided in the release_notes section, but the repository changelog indicates a precedence bug fix and a packaging/types change.

  • v1.8.4

    5/17/2023

    v1.8.4 appears to be a small bug fix release focused on correct code generation for class fields, especially static computed properties and class fields without initializers. The repository also includes related TypeScript definition adjustments and some repo/build tooling updates.

  • v1.8.0

    11/21/2021

    v1.8.0 extends the astring code generator to support additional ES class syntax, including private identifiers and static blocks, and updates the project’s documented maximum generated ECMA version to 13 (2022). The codebase also undergoes significant dev tooling and dependency updates. No GitHub release notes were provided for this release.

    BreakingFeatures
  • v1.7.6

    11/21/2021

    No release notes were provided for v1.7.6. The code diff indicates a correctness fix around nullish coalescing operator precedence, plus a change in how tagged template expressions are formatted (not just how they are tested).

  • v1.7.4

    4/7/2021

    Release v1.7.4 contains no provided GitHub release notes. The code diff primarily changes package publishing and module resolution behavior (package.json fields, build/prepare scripts, and what files are included in npm), rather than core runtime logic.

  • v1.7.2

    4/5/2021

    Release v1.7.2 updates Astring's code generation logic, primarily around emitting parentheses correctly for several JavaScript syntactic forms. The repository changelog indicates a fix for missing parentheses in class extends, ternary (conditional), and arrow function related cases, and the test fixtures were expanded accordingly.

  • v1.7.1

    4/5/2021

    No release notes were provided for v1.7.1. The code diff shows a targeted fix for source map generation around the `debugger` statement, along with test/fixture updates and a set of development dependency version bumps.

  • v1.7.0

    2/6/2021

    No release notes were provided by the publisher for version 1.7.0. From the repository changes, the main additions are TypeScript type definitions, a new package.json "types" entry, and updates to development tooling dependencies, along with removal of a sourcemaps utility source file.

    Features