NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #628 most downloaded on npm
Esprima-compatible implementation of the Mozilla JS Parser API
Last release 1 months ago
30 Aug 2026
Ships unpredictably
gaps range from 2 weeks to 3.7 years
Rarely documented
notes for 12 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
175 releases · first in 2013
This release registers fields that current parsers (Babel, and Oxc as normalized by recast's proposed Oxc integration ) emit but ast-types did not def
This release registers fields that current parsers (Babel, and Oxc as normalized by recast's proposed Oxc integration) emit but ast-types did not define, so visitors traverse the subtrees and deep checks accept the nodes:
TaggedTemplateExpression.typeParameters and TSTypeQuery.typeParameters, for TypeScript instantiation expressions (f<T> as a value, typeof f<T>).JSXOpeningElement.typeParameters, for explicit JSX type arguments (<Component<T> />).ArrayPattern.typeAnnotation and AssignmentPattern.typeAnnotation (shared Flow/TS definitions).ArrayPattern.optional, ObjectPattern.optional and AssignmentPattern.optional.ClassDeclaration.decorators and ClassExpression.decorators.TSImportType.options, for import attributes in import(...) types.VariableDeclaration.kind now allows "using" and "await using" (explicit resource management).Each addition is covered by tests that parse the actual syntax with @babel/parser and deep-assert the resulting Program, plus builder tests for node shapes @babel/parser cannot produce directly.
Full changelog: v0.16.2...v0.16.3
One column per quarter.
The first release on the latest dist-tag since 0.14.2 in September 2020. Everything from 0.15.0 and 0.16.x was published under next , so npm install a
The first release on the latest dist-tag since 0.14.2 in September 2020. Everything from 0.15.0 and 0.16.x was published under next, so npm install ast-types has been resolving to a five-year-old build; it now resolves here. Consumers on a ^0.16.1 range, which is most of them by download volume, were already on this line and pick this up as an ordinary patch.
Published from GitHub Actions with npm trusted publishing, so it carries a provenance attestation and no npm token was involved. Verify with npm audit signatures.
Released first as 0.16.2-rc.0 under next, which was checked against recast's full suite: 734 passing and a clean tsc 5.9.3 build, identical to the same suite on 0.16.1.
CallExpression, NewExpression and OptionalCallExpression now carry typeParameters (TypeScript type arguments such as f<T>()), and the visitor traverses them. Contributed by @phryneas in #954; fixes #343 and facebook/jscodeshift#389.export type * from "mod" and export type * as ns from "mod" (TypeScript 5.0) are supported. ExportAllDeclaration and ExportNamedDeclaration gain an exportKind field ("value" | "type", default "value"), mirroring ImportDeclaration.importKind.ExportNamedDeclaration.specifiers now accepts ExportNamespaceSpecifier, ExportDefaultSpecifier and ExportBatchSpecifier, matching Babel's representation of export * as ns from "mod".ExportNamespaceSpecifier.exported may be a string Literal, per ES2022 arbitrary module namespace names (export * as "ns" from "mod").ExportNamedDeclaration.declaration now defaults to null, so Babel ASTs that omit the property for specifier-only exports validate.lib/main.d.ts no longer imports Type, NodePath and builders under the same names as the values it declares, which TypeScript 5.4 and later reject under isolatedModules (TS2865). The fix uses only plain aliased imports, so no currently supported TypeScript version loses support. As a side effect, Type and NodePath imported from the package are now usable as generic types (Type<T>, NodePath<N>). Fixes #948; builds on #950 by @snowystinger.isolatedModules, so declaration-file regressions fail in CI.Runtime behavior and builder signatures are unchanged; the changes above only widen what is accepted. Two generated TypeScript types are wider than before, which can affect code that narrowed on the old type:
specifier.local on every element of ExportNamedDeclaration.specifiers needs a namedTypes.ExportSpecifier.check(specifier) guard.exported.name on an ExportNamespaceSpecifier needs to check for Identifier first.@babel/parser (a dev dependency) moves from 7.20.5 to 7.29.8, which also updates the Babel fixture corpus the tests validate against, and the harness now honors sourceType from fixture options.json files.glob 10, rimraf 5, mocha 11, ts-node, @types/mocha, @types/esprima.src/gen/ is up to date with src/def/.git:// clone instruction (a protocol GitHub disabled in 2022), its link into the untracked lib/ directory, and its list of definition modules, which named a file that does not exist and was missing es2016 through es2022, are all corrected. It now has a TypeScript section, which it never had despite the package shipping its own declarations since 0.15.Full changelog: v0.16.1...v0.16.2
CallExpression, NewExpression and OptionalCallExpression now carry
typeParameters (TypeScript type arguments such as f<T>()), and the
visitor traverses them. Contributed by Lenz Weber-Tronic in #954; fixes
#343 and facebook/jscodeshift#389.export type * from "mod" and export type * as ns from "mod"
(TypeScript 5.0). ExportAllDeclaration and ExportNamedDeclaration
gain an exportKind field ("value" | "type", default "value"),
mirroring ImportDeclaration.importKind.ExportNamedDeclaration.specifiers now accepts ExportNamespaceSpecifier,
ExportDefaultSpecifier and ExportBatchSpecifier, matching Babel's
representation of export * as ns from "mod".ExportNamespaceSpecifier.exported may be a string Literal, per ES2022
arbitrary module namespace names (export * as "ns" from "mod").ExportNamedDeclaration.declaration now defaults to null, so Babel
ASTs that omit the property for specifier-only exports validate.lib/main.d.ts no longer imports Type, NodePath and builders
under the same names as the values it declares, which TypeScript 5.4 and
later reject under isolatedModules (TS2865). The fix uses only plain
aliased imports, so no currently supported TypeScript version loses
support. As a side effect, Type and NodePath imported from the
package are now usable as generic types (Type<T>, NodePath<N>).
Fixes #948; builds on #950 by @snowystinger.isolatedModules, so
declaration-file regressions fail in CI.Runtime behavior and builder signatures are unchanged; the changes above only widen what is accepted. Two generated TypeScript types are wider than before, which can affect downstream code that narrowed on the old type:
specifier.local on every element of
ExportNamedDeclaration.specifiers needs a
namedTypes.ExportSpecifier.check(specifier) guard.exported.name on an ExportNamespaceSpecifier needs to
check for Identifier first.@babel/parser (dev dependency) from 7.20.5 to 7.29.8, which also
updates the Babel fixture corpus the tests validate against.sourceType from Babel fixture options.json files, and fix a
null dereference when comparing expected parse errors.glob 10, rimraf 5, mocha 11,
ts-node, @types/mocha, @types/esprima. Enable skipLibCheck so
tsc no longer type-checks node_modules declarations.npm ci, and a check that src/gen/ is up to date with src/def/.v. Releases carry npm provenance attestations, and no npm token
is stored in the repository. A release marked as a pre-release publishes
under the next dist-tag, and an ordinary release under latest.A release candidate for 0.16.2, published under the next dist-tag. Install it with npm install ast-types@0.16.2-rc.0 . The latest tag is unchanged.
A release candidate for 0.16.2, published under the next dist-tag. Install it with npm install ast-types@0.16.2-rc.0. The latest tag is unchanged.
This is the first release published from GitHub Actions with npm trusted publishing, so it carries a provenance attestation and no npm token was involved.
CallExpression, NewExpression and OptionalCallExpression now carry typeParameters (TypeScript type arguments such as f<T>()), and the visitor traverses them. Contributed by @phryneas in #954; fixes #343 and facebook/jscodeshift#389.export type * from "mod" and export type * as ns from "mod" (TypeScript 5.0) are supported. ExportAllDeclaration and ExportNamedDeclaration gain an exportKind field ("value" | "type", default "value"), mirroring ImportDeclaration.importKind.ExportNamedDeclaration.specifiers now accepts ExportNamespaceSpecifier, ExportDefaultSpecifier and ExportBatchSpecifier, matching Babel's representation of export * as ns from "mod".ExportNamespaceSpecifier.exported may be a string Literal, per ES2022 arbitrary module namespace names (export * as "ns" from "mod").ExportNamedDeclaration.declaration now defaults to null, so Babel ASTs that omit the property for specifier-only exports validate.lib/main.d.ts no longer imports Type, NodePath and builders under the same names as the values it declares, which TypeScript 5.4 and later reject under isolatedModules (TS2865). The fix uses only plain aliased imports, so no currently supported TypeScript version loses support. As a side effect, Type and NodePath imported from the package are now usable as generic types (Type<T>, NodePath<N>). Fixes #948; builds on #950 by @snowystinger.isolatedModules, so declaration-file regressions fail in CI.Runtime behavior and builder signatures are unchanged; the changes above only widen what is accepted. Two generated TypeScript types are wider than before, which can affect code that narrowed on the old type:
specifier.local on every element of ExportNamedDeclaration.specifiers needs a namedTypes.ExportSpecifier.check(specifier) guard.exported.name on an ExportNamespaceSpecifier needs to check for Identifier first.@babel/parser (a dev dependency) moves from 7.20.5 to 7.29.8, which also updates the Babel fixture corpus the tests validate against, and the harness now honors sourceType from fixture options.json files.glob 10, rimraf 5, mocha 11, ts-node, @types/mocha, @types/esprima.src/gen/ is up to date with src/def/.git:// clone instruction (a protocol GitHub disabled in 2022), its link into the untracked lib/ directory, and its list of definition modules, which named a file that does not exist and was missing es2016 through es2022, are all corrected. It now has a TypeScript section, which it never had despite the package shipping its own declarations since 0.15.Full changelog: v0.16.1...v0.16.2-rc.0
Bump npm version to 0.16.1.
Bump npm version to 0.16.1.
This project publishes no release notes. Between v0.16.0 and v0.16.1 there were 5 commits, 4 of them substantive:
Since the def/ directory has moved to lib/def/ , you may need to update your imports (a breaking change). However, you may be able to get away with no…
This minor version includes a major reorganization of the
repository/package, which took place mostly in PR #327, with additional
refinements in #886. There's always some risk to refactoring, and I
added several new type definitions, hence the minor version bump.
Why not a major version bump? I believe these changes should be mostly
backwards compatible, especially if you are not importing from any
nested directories like
import es2020Plugin from "ast-types/def/es2020"
Since the def/ directory has moved to lib/def/, you may need to
update your imports (a breaking change). However, you may be able to get
away with no changes if you're using a version of Node.js (or a bundler)
that understands the "exports" field in package.json:
#327 (comment)
Since I could be wrong about backwards compatibility, I will publish
v0.16.0 to npm using the "next" dist-tag initially, so we can make sure
benjamn/recast#1232 works. If breaking changes
come to light, we should be able to fix them before triggering a flood
of failing CI runs via dependabot/renovate/etc PRs.
This project publishes no release notes. Between v0.15.2 and v0.16.0 there were 54 commits, 44 of them substantive:
…and 24 more.
Bump npm version to 0.15.2.
Bump npm version to 0.15.2.
This project publishes no release notes. Between v0.15.1 and v0.15.2 there were 7 commits, 5 of them substantive:
Bump npm version to 0.15.1.
Bump npm version to 0.15.1.
This project publishes no release notes. Between v0.15.0 and v0.15.1 there were 3 commits, 3 of them substantive:
Bump npm version to 0.15.0.
Bump npm version to 0.15.0.
This project publishes no release notes. Between v0.14.2 and v0.15.0 there were 50 commits, 32 of them substantive:
ObjectProperty in addPattern (#540)…and 12 more.
Bump npm version to 0.14.2.
Bump npm version to 0.14.2.
This project publishes no release notes. Between v0.14.1 and v0.14.2 there were 6 commits, 3 of them substantive:
Bump npm version to 0.14.1.
Bump npm version to 0.14.1.
This project publishes no release notes. Between v0.14.0 and v0.14.1 there were 4 commits, 2 of them substantive:
The minor bump is due to the extent of the changes in PRs #375 , #376 , and #377 (thanks to @gkz ).
This project publishes no release notes. Between v0.13.4 and v0.14.0 there were 9 commits, 6 of them substantive:
Bump npm version to 0.13.4 in preparation for publishing.
Bump npm version to 0.13.4 in preparation for publishing.
This project publishes no release notes. Between v0.13.3 and v0.13.4 there were 20 commits, 14 of them substantive:
Bump npm version to 0.13.3 in preparation for publishing.
Bump npm version to 0.13.3 in preparation for publishing.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →