@as-covers/transform
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -14,4 +14,2 @@ /** | ||
*/ | ||
// Import visitor-as | ||
import { NodeKind, Token, } from "assemblyscript/dist/assemblyscript.js"; | ||
import { Transform } from "assemblyscript/dist/transform.js"; | ||
@@ -36,4 +34,4 @@ import { createPointID } from "./util.js"; | ||
switch (expr.operator) { | ||
case Token.BAR_BAR: | ||
case Token.AMPERSAND_AMPERSAND: { | ||
case 98 /* Token.BAR_BAR */: | ||
case 97 /* Token.AMPERSAND_AMPERSAND */: { | ||
// If (&& or ||) | ||
@@ -140,3 +138,3 @@ // Get right expression (right side of the || or &&) | ||
// If the body is an expression, convert it to a block. (We need it to be a block because of multiple lines.) | ||
if (dec.body.kind === NodeKind.EXPRESSION) { | ||
if (dec.body.kind === 38 /* NodeKind.EXPRESSION */) { | ||
// Parse string as BlockStatement. (We replace the function's body with this.) | ||
@@ -191,3 +189,3 @@ const bodyStatement = SimpleParser.parseStatement(` | ||
// If its not a block, convert it to a Block kind. | ||
if (ifTrue.kind !== NodeKind.BLOCK && !this.ignoredLines.has(trueLine)) { | ||
if (ifTrue.kind !== 30 /* NodeKind.BLOCK */ && !this.ignoredLines.has(trueLine)) { | ||
const replacer = new RangeTransform(ifTrue); | ||
@@ -218,3 +216,3 @@ // Get id from hash | ||
const falseCol = falseLc.col; | ||
if (ifFalse.kind !== NodeKind.BLOCK && | ||
if (ifFalse.kind !== 30 /* NodeKind.BLOCK */ && | ||
!this.ignoredLines.has(falseLine)) { | ||
@@ -221,0 +219,0 @@ const replacer = new RangeTransform(ifFalse); |
{ | ||
"name": "@as-covers/transform", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "The transform that enables code coverage for assemblyscript", | ||
@@ -17,11 +17,11 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"assemblyscript": "^0.20.19" | ||
"assemblyscript": "^0.21.2" | ||
}, | ||
"devDependencies": { | ||
"@types/line-column": "^1.0.0", | ||
"typescript": "^4.7.4" | ||
"typescript": "^4.8.2" | ||
}, | ||
"dependencies": { | ||
"line-column": "^1.0.2", | ||
"visitor-as": "0.10.0" | ||
"visitor-as": "0.10.2" | ||
}, | ||
@@ -31,3 +31,3 @@ "files": [ | ||
], | ||
"gitHead": "0991a3270e6539d985ebc669f607ebb1c140ff24" | ||
"gitHead": "186a173941ebb7482c34e7dd2118a6288426636b" | ||
} |
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
39824
450
+ Addedassemblyscript@0.21.7(transitive)
+ Addedbinaryen@110.0.0-nightly.20221006(transitive)
+ Addedvisitor-as@0.10.2(transitive)
- Removedassemblyscript@0.20.19(transitive)
- Removedbinaryen@109.0.0-nightly.20220813(transitive)
- Removedvisitor-as@0.10.0(transitive)
Updatedvisitor-as@0.10.2