Skip to content

Commit

Permalink
chore: upgrade to ts-morph 13 internally
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Nov 21, 2021
1 parent ef2a23c commit 5c0a702
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/scripts/deps.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * as path from "https://deno.land/std@0.114.0/path/mod.ts";
export * as tsMorph from "https://deno.land/x/ts_morph@12.2.0/mod.ts";
export * as tsMorph from "https://deno.land/x/ts_morph@13.0.0/mod.ts";
2 changes: 1 addition & 1 deletion packages/ts-morph/scripts/common/hasInternalDocTag.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { tsMorph } from "../deps.ts";

export function hasInternalDocTag(node: tsMorph.Node) {
return tsMorph.Node.isJSDocableNode(node)
return tsMorph.Node.isJSDocable(node)
&& node.getJsDocs().some(d => d.getTags().some(t => t.getTagName() === "internal"));
}
2 changes: 1 addition & 1 deletion packages/ts-morph/scripts/inspectors/TsMorphInspector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class TsMorphInspector {
const syntaxKind = nameNodeExpression.getName();

const typeNode = member.getTypeNodeOrThrow();
if (!tsMorph.Node.isTypeReferenceNode(typeNode))
if (!tsMorph.Node.isTypeReference(typeNode))
throw new Error(error);
const typeNodeName = typeNode.getTypeName();
if (!tsMorph.Node.isQualifiedName(typeNodeName))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function ensurePublicApiHasTests(inspector: TsMorphInspector, addProblem:
const nodes: (tsMorph.Node & tsMorph.ReferenceFindableNode)[] = [];

function tryAddNode(node: tsMorph.Node & tsMorph.ReferenceFindableNode) {
if (tsMorph.Node.isScopedNode(node) && node.getScope() !== tsMorph.Scope.Public)
if (tsMorph.Node.isScoped(node) && node.getScope() !== tsMorph.Scope.Public)
return;
if (hasInternalDocTag(node))
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export abstract class CompilerCommentNode implements ts.Node {
return undefined as any as ts.Node; // the compiler definition is wrong
}

// @code-fence-allow(getChildren): this is an implementation, so it's ok.
getChildren(sourceFile?: ts.SourceFile | undefined): ts.Node[] {
return [];
}
Expand Down

0 comments on commit 5c0a702

Please sign in to comment.