diff --git a/deno/ts_morph.js b/deno/ts_morph.js
index 08ae3249b..b4e741803 100644
--- a/deno/ts_morph.js
+++ b/deno/ts_morph.js
@@ -6542,6 +6542,7 @@ const Structure = {
case StructureKind.ConstructSignature:
case StructureKind.Enum:
case StructureKind.EnumMember:
+ case StructureKind.ExportAssignment:
case StructureKind.FunctionOverload:
case StructureKind.Function:
case StructureKind.GetAccessor:
@@ -7057,6 +7058,8 @@ function forEachStructureChild(structure, callback) {
return forEnumDeclaration(structure, callback);
case StructureKind.EnumMember:
return forEnumMember(structure, callback);
+ case StructureKind.ExportAssignment:
+ return forExportAssignment(structure, callback);
case StructureKind.ExportDeclaration:
return forExportDeclaration(structure, callback);
case StructureKind.FunctionOverload:
@@ -7170,6 +7173,9 @@ function forEnumDeclaration(structure, callback) {
function forEnumMember(structure, callback) {
return forJSDocableNode(structure, callback);
}
+function forExportAssignment(structure, callback) {
+ return forJSDocableNode(structure, callback);
+}
function forExportDeclaration(structure, callback) {
return forAllIfStructure(structure.namedExports, callback, StructureKind.ExportSpecifier)
|| forAll(structure.assertElements, callback, StructureKind.AssertEntry);
diff --git a/package-lock.json b/package-lock.json
index 27f925818..eaba29233 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1623,10 +1623,10 @@
},
"packages/bootstrap": {
"name": "@ts-morph/bootstrap",
- "version": "0.19.0",
+ "version": "0.20.0",
"license": "MIT",
"dependencies": {
- "@ts-morph/common": "~0.19.0"
+ "@ts-morph/common": "~0.20.0"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.0.0",
@@ -1645,7 +1645,7 @@
},
"packages/common": {
"name": "@ts-morph/common",
- "version": "0.19.0",
+ "version": "0.20.0",
"license": "MIT",
"dependencies": {
"fast-glob": "^3.2.12",
@@ -1696,10 +1696,10 @@
}
},
"packages/ts-morph": {
- "version": "18.0.0",
+ "version": "19.0.0",
"license": "MIT",
"dependencies": {
- "@ts-morph/common": "~0.19.0",
+ "@ts-morph/common": "~0.20.0",
"code-block-writer": "^12.0.0"
},
"devDependencies": {
@@ -1788,7 +1788,7 @@
"version": "file:packages/bootstrap",
"requires": {
"@rollup/plugin-typescript": "^11.0.0",
- "@ts-morph/common": "~0.19.0",
+ "@ts-morph/common": "~0.20.0",
"@types/chai": "^4.3.4",
"@types/mocha": "^10.0.1",
"@types/node": "^18.15.9",
@@ -2608,7 +2608,7 @@
"version": "file:packages/ts-morph",
"requires": {
"@rollup/plugin-typescript": "^11.0.0",
- "@ts-morph/common": "~0.19.0",
+ "@ts-morph/common": "~0.20.0",
"@types/chai": "^4.3.4",
"@types/diff": "^5.0.3",
"@types/mocha": "^10.0.1",
diff --git a/packages/bootstrap/package.json b/packages/bootstrap/package.json
index 26e984359..5333f25b1 100644
--- a/packages/bootstrap/package.json
+++ b/packages/bootstrap/package.json
@@ -1,6 +1,6 @@
{
"name": "@ts-morph/bootstrap",
- "version": "0.19.0",
+ "version": "0.20.0",
"description": "API for getting quickly set up with the TypeScript Compiler API.",
"keywords": [
"typescript",
@@ -24,7 +24,7 @@
"rollup": "rollup -c"
},
"dependencies": {
- "@ts-morph/common": "~0.19.0"
+ "@ts-morph/common": "~0.20.0"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.0.0",
diff --git a/packages/common/package.json b/packages/common/package.json
index 1cc3e0c2b..8982cf365 100644
--- a/packages/common/package.json
+++ b/packages/common/package.json
@@ -1,6 +1,6 @@
{
"name": "@ts-morph/common",
- "version": "0.19.0",
+ "version": "0.20.0",
"description": "Common functionality for ts-morph packages.",
"main": "dist/ts-morph-common.js",
"author": "David Sherret",
diff --git a/packages/ts-morph/CHANGELOG.md b/packages/ts-morph/CHANGELOG.md
index e47e4187f..de00b844d 100644
--- a/packages/ts-morph/CHANGELOG.md
+++ b/packages/ts-morph/CHANGELOG.md
@@ -2,6 +2,21 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+# [19.0.0](https://github.com/dsherret/ts-morph/compare/18.0.0...19.0.0) (2023-06-14)
+
+
+### Features
+
+* add IsVoid method to Type ([#1398](https://github.com/dsherret/ts-morph/issues/1398)) ([f837790](https://github.com/dsherret/ts-morph/commit/f837790))
+* add JSDocable to ExportAssignment ([#1397](https://github.com/dsherret/ts-morph/issues/1397)) ([611c8b6](https://github.com/dsherret/ts-morph/commit/611c8b6))
+* upgrade to TS 5.1 ([#1415](https://github.com/dsherret/ts-morph/issues/1415)) ([46e50b0](https://github.com/dsherret/ts-morph/commit/46e50b0))
+* fix: allow .tranform to work with Nodes from another parsed sourcefile (#1417) ([225ff58](https://github.com/dsherret/ts-morph/commit/225ff58))
+
+### BREAKING CHANGES
+
+- Upgraded to TS 5.1, which has Jsx namespaces.
+
# [18.0.0](https://github.com/dsherret/ts-morph/compare/17.0.1...18.0.0) (2023-03-22)
diff --git a/packages/ts-morph/package.json b/packages/ts-morph/package.json
index 5ba8f6a72..c55fdcb08 100644
--- a/packages/ts-morph/package.json
+++ b/packages/ts-morph/package.json
@@ -1,6 +1,6 @@
{
"name": "ts-morph",
- "version": "18.0.0",
+ "version": "19.0.0",
"description": "TypeScript compiler wrapper for static analysis and code manipulation.",
"main": "dist/ts-morph.js",
"typings": "lib/ts-morph.d.ts",
@@ -44,7 +44,7 @@
},
"homepage": "https://github.com/dsherret/ts-morph#readme",
"dependencies": {
- "@ts-morph/common": "~0.19.0",
+ "@ts-morph/common": "~0.20.0",
"code-block-writer": "^12.0.0"
},
"devDependencies": {
diff --git a/packages/ts-morph/src/structures/Structure.generated.ts b/packages/ts-morph/src/structures/Structure.generated.ts
index 8c7f14615..dbf54bf5c 100644
--- a/packages/ts-morph/src/structures/Structure.generated.ts
+++ b/packages/ts-morph/src/structures/Structure.generated.ts
@@ -70,6 +70,7 @@ export const Structure = {
case StructureKind.ConstructSignature:
case StructureKind.Enum:
case StructureKind.EnumMember:
+ case StructureKind.ExportAssignment:
case StructureKind.FunctionOverload:
case StructureKind.Function:
case StructureKind.GetAccessor:
diff --git a/packages/ts-morph/src/structures/utils/forEachStructureChild.ts b/packages/ts-morph/src/structures/utils/forEachStructureChild.ts
index 53934f447..a9781e28c 100644
--- a/packages/ts-morph/src/structures/utils/forEachStructureChild.ts
+++ b/packages/ts-morph/src/structures/utils/forEachStructureChild.ts
@@ -12,7 +12,7 @@ import { FunctionDeclarationStructure, FunctionLikeDeclarationStructure, Functio
import { InterfaceDeclarationStructure, CallSignatureDeclarationStructure, ConstructSignatureDeclarationStructure, MethodSignatureStructure,
IndexSignatureDeclarationStructure, PropertySignatureStructure } from "../interface";
import { JsxElementStructure, JsxSelfClosingElementStructure, JsxAttributedNodeStructure } from "../jsx";
-import { ExportDeclarationStructure, ImportDeclarationStructure, ModuleDeclarationStructure, SourceFileStructure } from "../module";
+import { ExportAssignmentStructure, ExportDeclarationStructure, ImportDeclarationStructure, ModuleDeclarationStructure, SourceFileStructure } from "../module";
import { VariableStatementStructure, StatementedNodeStructure } from "../statement";
import { TypeAliasDeclarationStructure } from "../type";
import { OptionalKind } from "../types";
@@ -58,6 +58,8 @@ export function forEachStructureChild(structure: Structures | Readon
return forEnumDeclaration(structure, callback);
case StructureKind.EnumMember:
return forEnumMember(structure, callback);
+ case StructureKind.ExportAssignment:
+ return forExportAssignment(structure, callback);
case StructureKind.ExportDeclaration:
return forExportDeclaration(structure, callback);
case StructureKind.FunctionOverload:
@@ -204,6 +206,11 @@ function forEnumMember(structure: EnumMemberStructure, callback: (st
return forJSDocableNode(structure, callback);
}
+/** @generated */
+function forExportAssignment(structure: ExportAssignmentStructure, callback: (structure: Structures) => TStructure | void): TStructure | undefined {
+ return forJSDocableNode(structure, callback);
+}
+
/** @generated */
function forExportDeclaration(structure: ExportDeclarationStructure, callback: (structure: Structures) => TStructure | void): TStructure | undefined {
return forAllIfStructure(structure.namedExports, callback, StructureKind.ExportSpecifier)
diff --git a/packages/ts-morph/wrapped-nodes.md b/packages/ts-morph/wrapped-nodes.md
index 1000c81c9..a76ef8ee6 100644
--- a/packages/ts-morph/wrapped-nodes.md
+++ b/packages/ts-morph/wrapped-nodes.md
@@ -6,7 +6,7 @@ The disadvantage to a node not being wrapped is that it won't have helper method
## Exist
-**Total:** 223
+**Total:** 224
* [ArrayBindingPattern](src/compiler/ast/binding/ArrayBindingPattern.ts)
* :heavy_check_mark: elements
@@ -328,6 +328,9 @@ The disadvantage to a node not being wrapped is that it won't have helper method
* :heavy_check_mark: openingFragment
* :heavy_check_mark: children
* :heavy_check_mark: closingFragment
+* [JsxNamespacedName](src/compiler/ast/jsx/JsxNamespacedName.ts)
+ * :heavy_check_mark: name
+ * :heavy_check_mark: namespace
* [JsxOpeningElement](src/compiler/ast/jsx/JsxOpeningElement.ts)
* :heavy_check_mark: tagName
* :x: typeArguments
@@ -338,6 +341,7 @@ The disadvantage to a node not being wrapped is that it won't have helper method
* :x: typeArguments
* :heavy_check_mark: attributes
* [JsxSpreadAttribute](src/compiler/ast/jsx/JsxSpreadAttribute.ts)
+ * :heavy_check_mark: name
* :heavy_check_mark: expression
* [JsxText](src/compiler/ast/jsx/JsxText.ts)
* :heavy_check_mark: containsOnlyTriviaWhiteSpaces