Skip to content

Releases: dsherret/ts-morph

15.0.0

24 May 22:42
Compare
Choose a tag to compare

Bug Fixes

  • transform() - ensure comments on nodes with only added synthetic leading comments show up in output (abc840d), closes #1273
  • ensure leading and trailing trivia for overloads ends up in output (0d043b5), closes #1244
  • common: deleting directories didn't work on Node (163de40), closes #1249
  • handle undefined in comment node type guards (#1275) (452cff3)
  • transform should take into account the node changing kinds (75c4a75), closes #1248

Features

  • add Node#isKind(kind) type guard (#1271) (79ab80f)
  • add factory property to traversal control (d4c5a35)
  • add helper properties on TemplateLiteralTypeNode. (1a8de49), closes #1266
  • upgrade to TypeScript 4.7 (#1281) (ae797d8)

BREAKING CHANGES

  • transform now returns a Node instead of this because the returned node could be the replaced node.
  • Upgraded to TS 4.7. Please review changes to typescript.d.ts in #1281.

14.0.0

03 Mar 19:40
Compare
Choose a tag to compare
  • Upgraded to TS 4.6
  • To align with the ts compiler:
    • AssertEntry#getValue now returns an expression instead of a string literal.
    • AssertEntryStructure#value now represents an expression instead of a string literal.

13.0.1

22 Nov 18:25
Compare
Choose a tag to compare

Bug Fixes

  • Regression in getReferencingNodesInOtherSourceFiles with source files not marked as in the project (7504aed)
  • Surface read file errors instead of ignoring them (760fe8c)
  • Align getScriptSnapshot compiler host libFileMap behaviour with readFile (9e84d72)

13.0.0

20 Nov 22:54
Compare
Choose a tag to compare

Bug Fixes

  • Do not throw an error if decorator expr is wrapped in a paren expr (c77db30), closes #1214

Code Refactoring

  • Node.isXNode(node) static type guard methods are now Node.isX(node) (e5bcba9), closes #1166
  • Remove already deprecated WriterFunctions and TypeGuards exports. (be87373)

Features

  • Add AssertClause and AssertEntry (#1224) (bcf694f)
  • Add Node.hasStructure type guard. (0f7d9be)
  • Change readDirSync to return directory entries instead of file paths (f22a50d)
  • Make Structure.isX function more flexible (a54dd69), closes #1219
  • Type only methods for ImportSpecifier and ExportSpecifier (e93c96e)
  • TypeScript 4.5 support (#1220) (526e0dd)
  • Wrap more JS doc nodes (5107999)

BREAKING CHANGES

  • Node.isXNode(node)-like static type guard methods are now Node.isX(node) to reduce verbosity.
  • Targeting ES2018 instead of ES2015
  • Upgraded to TS 4.5
  • Removed already deprecated WriterFunctions and TypeGuards exports. Use Writers and Node instead.
  • readDirSync now returns directory entries.

12.1.0

30 Oct 23:14
Compare
Choose a tag to compare

Bug Fixes

  • Support renaming a property to a private identifier or vice versa (bf377b6)
  • TypeArguments on decorator structure should output type arguments (ad4fdbd)

Features