PackageTrack

npm · #4387

@phenomnomnominal/tsquery

6.2.0phenomnomnominal/tsquery

Query TypeScript ASTs with the esquery API!

Release timeline

41 releases since 2018
2020202220242026

Releases

  1. 6.2.06 Apr 2026

    Nothing published for this version

  2. 6.1.44 Dec 2025

    Nothing published for this version

  3. 6.1.322 Aug 2023

    Nothing published for this version

  4. 6.1.212 Jul 2023
    Release notes

    Fixed

    • Restored working implementation of :nth-child() and :nth-last-child().
    Open source →
  5. 6.1.111 Jul 2023
    Release notes

    Fixed

    • Fixed the API signature of map, so it only works on a SourceFile.
    Open source →
  6. 6.1.011 Jul 2023
    Release notes

    Added

    • Made the print function public, it's useful when doing map operations.
    Open source →
  7. 6.0.210 Jul 2023

    Nothing published for this version

  8. 6.0.110 Jul 2023
    Release notes

    Fixed

    • Add @types/esquery to dependencies.
    Open source →
  9. 6.0.010 Jul 2023
    Release notes

    I had to use TSQuery recently and found a few bugs, and wanted to add a few ergonomic things, so here's a major release.

    The big breaking change here is that visitAllChildren is now the default behaviour. Less-specific queries that may have worked in previous versions may no longer work exactly the same. This is a pretty annoying change for a very early mistake, but I figured it was time to pull off the band-aid.

    Added

    • scriptKind parameter to query so the caller can control how TypeScript parses the input code.
    • includes to simply check if there are any selector matches within some code.
    • Direct exports of public functions, e.g. import { ast } from '@phenomnomnominal/tquery';
    • Type exports for types used in the public API. This includes types from typescript and esquery.
    • This CHANGELOG file to hopefully list all API changes going forward.

    Fixed

    • replace now uses the TypeScript Printer to format the output code. This means that it will handle AST Node removal better, but also means that you may need to run any formatters (e.g. Prettier) on the result to have it match your codebase.
    • :function selector will now match a MethodDeclaration.

    Changed

    • TSQuery will now query all children by default. This means that less-specific queries that may have worked in previous versions may no longer work exactly the same.
    • Deprecated the old API, will remove in v7. Prefer importing the specific functions.
    • Deprecated the syntaxKindName function. This shouldn't have been in the public API.
    • Upgrade many dependencies.

    Removed

    • visitAllChildren option. This is now the default behaviour.
    Open source →
  10. 5.0.118 Mar 2023

    Nothing published for this version

  11. 5.0.022 Apr 2022

    Nothing published for this version

  12. 4.2.019 Jan 2022

    Nothing published for this version

  13. 4.1.11 Sept 2020

    Nothing published for this version

  14. 4.1.014 May 2020

    Nothing published for this version

  15. 4.0.016 Oct 2019

    Nothing published for this version

  16. 3.0.07 Nov 2018

    Nothing published for this version

  17. 2.2.07 Nov 2018

    Nothing published for this version

  18. 2.1.129 Sept 2018

    Nothing published for this version

  19. 2.1.018 Sept 2018

    Nothing published for this version

  20. 2.0.14 Sept 2018

    Nothing published for this version

  21. 2.0.016 Aug 2018

    Nothing published for this version

  22. 2.0.0-beta.71 Aug 2018pre-release

    Nothing published for this version

  23. 2.0.0-beta.629 Jul 2018pre-release

    Nothing published for this version

  24. 2.0.0-beta.55 Jul 2018pre-release

    Nothing published for this version

  25. 2.0.0-beta.47 Jun 2018pre-release

    Nothing published for this version

  26. 2.0.0-beta.36 Jun 2018pre-release

    Nothing published for this version

  27. 2.0.0-beta.24 Jun 2018pre-release

    Nothing published for this version

  28. 2.0.0-beta.13 Jun 2018pre-release

    Nothing published for this version

  29. 2.0.0-beta.02 Jun 2018pre-release

    Nothing published for this version

  30. 1.0.527 May 2018

    Nothing published for this version

  31. 1.0.427 May 2018

    Nothing published for this version

  32. 1.0.327 May 2018

    Nothing published for this version

  33. 1.0.226 May 2018

    Nothing published for this version

  34. 1.0.120 May 2018

    Nothing published for this version

  35. 1.0.019 May 2018

    Nothing published for this version

  36. 0.1.019 May 2018

    Nothing published for this version

  37. 0.1.0-beta.318 May 2018pre-release

    Nothing published for this version

  38. 0.1.0-beta.28 May 2018pre-release

    Nothing published for this version

  39. 0.1.0-beta.123 Apr 2018pre-release

    Nothing published for this version

  40. 0.1.0-beta.023 Apr 2018pre-release

    Nothing published for this version

  41. 0.1.0-beta21 Apr 2018pre-release

    Nothing published for this version