@wixc3/typescript
Advanced tools
Comparing version 14.0.0 to 14.1.0
{ | ||
"name": "@wixc3/typescript", | ||
"version": "14.0.0", | ||
"version": "14.1.0", | ||
"description": "API ", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
@@ -11,3 +11,3 @@ import { chain, concat, find, isString, map, noWhiteSpace, Predicate } from '@wixc3/common'; | ||
(found: Iterable<ts.Node>, n: ts.Node): Iterable<ts.Node> => concat(found, findAllNodes(n, predicate)), | ||
[] as Iterable<ts.Node> | ||
[] as Iterable<ts.Node>, | ||
); | ||
@@ -20,3 +20,3 @@ | ||
throw new Error( | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile' | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile', | ||
); | ||
@@ -39,3 +39,3 @@ } | ||
(found: ts.Node | undefined, n: ts.Node): ts.Node | undefined => found || findNode(n, predicate), | ||
undefined | ||
undefined, | ||
); | ||
@@ -51,3 +51,3 @@ | ||
throw new Error( | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile' | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile', | ||
); | ||
@@ -54,0 +54,0 @@ } |
@@ -50,3 +50,3 @@ import type { Predicate } from '@wixc3/common'; | ||
ignore: Predicate<ts.Node | undefined> = () => false, | ||
reportDiff: (a?: string, b?: string) => void = () => void 0 | ||
reportDiff: (a?: string, b?: string) => void = () => void 0, | ||
) { | ||
@@ -58,3 +58,3 @@ if (ignore(a) || ignore(b)) { | ||
throw new Error( | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile' | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile', | ||
); | ||
@@ -64,3 +64,3 @@ } | ||
throw new Error( | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile' | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile', | ||
); | ||
@@ -67,0 +67,0 @@ } |
@@ -22,5 +22,5 @@ import { expect } from 'chai'; | ||
ts.isVariableDeclaration(n.parent) && | ||
n.parent.initializer?.getText() === 'false' | ||
) | ||
) | ||
n.parent.initializer?.getText() === 'false', | ||
), | ||
), | ||
).to.equal('c'); | ||
@@ -31,3 +31,3 @@ }); | ||
expect(() => findNode(code, () => true)).to.throw( | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile' | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile', | ||
); | ||
@@ -50,3 +50,3 @@ }); | ||
expect(() => findAllNodes(code, () => true)).to.throw( | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile' | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile', | ||
); | ||
@@ -127,5 +127,5 @@ }); | ||
expect(() => findNodeAfterComment(code, 'test')).to.throw( | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile' | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile', | ||
); | ||
}); | ||
}); |
@@ -52,3 +52,3 @@ import { expect } from 'chai'; | ||
expect(() => match(code, `const a=1;`)).to.throw( | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile' | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile', | ||
); | ||
@@ -87,5 +87,5 @@ }); | ||
expect(() => isSame(code, code)).to.throw( | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile' | ||
'AST Node has no parent. use compileCode or make sure the "setParentNodes" (3rd argument) is set to true in ts.createSourceFile', | ||
); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90399