Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@as-covers/transform

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@as-covers/transform - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

12

lib/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc