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
- Astring’s repo activity looks quiet, with the last upstream push on 2024-12-01, and the newest shown update v1.9.0 dated 2024-08-25, which is roughly 20+ months ago relative to today (2026-09-10). This suggests maintenance mode or at least a long period without active updates.
- The update cadence appears uneven historically, with multiple updates in 2023-2024 (v1.8.x, then v1.9.0), followed by a long gap with no newer updates shown.
AI summary generated
Recent updates
v1.9.0
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
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
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
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
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.
BreakingFeaturesv1.7.6
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
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
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
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
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