Releases: dsherret/ts-morph
Releases · dsherret/ts-morph
28.0.0
What's Changed
- feat(BREAKING): TypeScript 6.0 by @dsherret in #1669
- feat: standalone
printStructurefunction by @dsherret in #1670 - fix:
InvalidOperationErrorinaddTypeArgumentby @jfirebaugh in #1663
Note there are some breaking changes due to TypeScript 6.0. Read more here: https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/
As part of this release, structures can now be printed to a string using the printStructure function.
import { printStructure, StructureKind } from "ts-morph";
const code = printStructure({
kind: StructureKind.Class,
name: "MyClass",
isExported: true,
properties: [{ name: "myProp", type: "string" }],
methods: [{
name: "myMethod",
parameters: [{ name: "param", type: "number" }],
returnType: "void",
}],
});
console.log(code);Outputs:
export class MyClass {
myProp: string;
myMethod(param: number): void {
}
}New Contributors
- @jfirebaugh made their first contribution in #1663
Full Changelog: 27.0.2...28.0.0
27.0.2
What's Changed
- Fixes the npm publish in order to get the fixes in from 27.0.1
- fix: browser support no longer working since #1628 in 26.0.0 due to missing browser fields by @BossSloth in #1654
Full Changelog: 27.0.1...27.0.2
27.0.1
What's Changed
- fix: browser support no longer working since #1628 in 26.0.0 due to missing browser fields by @BossSloth in #1654
New Contributors
- @BossSloth made their first contribution in #1654
Full Changelog: 27.0.0...27.0.1
27.0.0
What's Changed
- perf: switch to tinyglobby by @benmccann in #1635
- fix: re-export StandardizedFilePath from @ts-morph/common by @kronodeus in #1637
- chore: fix ci by @dsherret in #1645
- feat:
TypeChecker- addgetAwaitedTypeby @JHawk0224 in #1643 - feat: TypeScript 5.9 by @dsherret in #1646
- feat: wrap OptionalTypeNode by @dsherret in #1647
- feat: wrap
JSDocImportTagby @dsherret in #1648 - fix: remove invalid sourceMappingURL from build output by @dsherret in #1649
- feat: ability to add and remove the defer keyword in imports by @dsherret in #1651
New Contributors
- @JHawk0224 made their first contribution in #1643
Full Changelog: 26.0.0...27.0.0
26.0.0
25.0.1
25.0.0
What's Changed
- feat: TypeScript 5.7.2 #1594
- fix: switch back to fast-glob for stability #1595
- fix: properly insert async keyword in arrow function #1597
- fix: throw descriptive error when inserting variable statement with no declarations #1598
- fix: removing last named import/export should not remove or change declaration #1599
Full Changelog: 24.0.0...25.0.0
24.0.0
What's Changed
- perf: remove mkdirp dependency by @benmccann in #1549
- perf: switch to tinyglobby to drop 15 dependencies by @benmccann in #1558
- fix: getDerivedClasses() isn't correct in some cases by @jmyrick02 in #1557
- fix: getBodyText() doesn't work as would be expected by @jmyrick02 in #1560
- feat: TypeScript 5.6 by @dsherret in #1576
New Contributors
- @benmccann made their first contribution in #1549
- @jmyrick02 made their first contribution in #1557
Full Changelog: 23.0.0...24.0.0
23.0.0
What's Changed
- feat: ts 5.5 by @dsherret in #1545
- feat: Type.prototype.isBigInt and isBigIntLiteral by @dsherret in #1546
- fix: handle removeDefaultImport with type only import by @dsherret in #1547
Now available on JSR for use in Deno: https://jsr.io/@ts-morph/ts-morph
Full Changelog: 22.0.0...23.0.0
22.0.0
What's Changed
- feat(BREAKING): upgrade to TypeScript 5.4 by @dsherret in #1516
- fix(BREAKING):
Node.prototype.forgetDescendants()no longer returns self by @dsherret in #1515 - feat:
Type.prototype.isAssignableToby @dsherret in #1517 - feat:
TypeChecker.prototype.resolveNameby @dsherret in #1518 - fix: MethodDeclarationStructure should write an asterisk isGenerator = true by @ajvincent in #1502
- docs: fix typo in adding-source-files.md by @ilirbeqirii in #1490
- feat: ClassDeclarationStructure - support static blocks by @dsherret in #1520
CodeBlockWriter 13.0.1
People may have been working around these bugs in the past:
.quote()- should include newline on newline (dsherret/code-block-writer#47).quote()- escape characters were not always being escaped (dsherret/code-block-writer#46)
New Contributors
- @ilirbeqirii made their first contribution in #1490
Full Changelog: 21.0.1...22.0.0