🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

mvdan-sh

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mvdan-sh - npm Package Compare versions

Comparing version

to
0.0.7

2

package.json
{
"name": "mvdan-sh",
"version": "0.0.6",
"version": "0.0.7",
"description": "A shell parser and formatter (POSIX/Bash/mksh)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,8 +21,13 @@ # mvdan-sh

// what kind of command did we parse?
var stmt = f.StmtList.Stmts[0]
console.log(syntax.NodeType(stmt.Cmd)) // CallExpr
// print out the syntax tree
syntax.DebugPrint(f)
console.log()
// change 'foo' to 'bar'
stmt.Cmd.Args[1].Parts[0].Value = "bar"
// replace all single quoted string values
syntax.Walk(f, function(node) {
if (syntax.NodeType(node) == "SglQuoted") {
node.Value = "bar"
}
return true
})

@@ -29,0 +34,0 @@ // print the code back out

Sorry, the diff of this file is too big to display