🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

shell-quote

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shell-quote - npm Package Compare versions

Comparing version

to
1.7.0

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # acorn-node change log

## 1.7.0
* Add support for parsing `>>` and `>&` redirection operators. ([@forivall](https://github.com/forivall) in [#16](https://github.com/substack/node-shell-quote/pull/16))
* Add support for parsing `<(` process substitution operator. ([@cuonglm](https://github.com/cuonglm) in [#15](https://github.com/substack/node-shell-quote/pull/15))
## 1.6.3

@@ -9,0 +13,0 @@ * Fix Windows path quoting problems. ([@dy](https://github.com/dy) in [#34](https://github.com/substack/node-shell-quote/pull/34))

4

index.js

@@ -22,4 +22,6 @@ exports.quote = function (xs) {

// '<(' is process substitution operator and
// can be parsed the same as control operator
var CONTROL = '(?:' + [
'\\|\\|', '\\&\\&', ';;', '\\|\\&', '[&;()|<>]'
'\\|\\|', '\\&\\&', ';;', '\\|\\&', '\\<\\(', '>>', '>\\&', '[&;()|<>]'
].join('|') + ')';

@@ -26,0 +28,0 @@ var META = '|&;()<> \\t';

{
"name": "shell-quote",
"version": "1.6.3",
"description": "quote and parse shell commands",
"main": "index.js",
"version": "1.7.0",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"bugs": "https://github.com/substack/node-shell-quote/issues",
"devDependencies": {
"tape": "4"
},
"scripts": {
"test": "tape test/*.js"
},
"repository": {
"type": "git",
"url": "http://github.com/substack/node-shell-quote.git"
},
"homepage": "https://github.com/substack/node-shell-quote",
"keywords": [
"shell",
"command",
"parse",
"quote",
"parse"
"shell"
],
"testling": {
"files": "test/*.js",
"browsers": [
"ie/6..latest",
"firefox/3.5",
"firefox/15..latest",
"firefox/nightly",
"chrome/25..latest",
"chrome/canary",
"opera/10..latest",
"opera/next",
"safari/5.1..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2..latest"
]
"license": "MIT",
"main": "index.js",
"repository": {
"type": "git",
"url": "http://github.com/substack/node-shell-quote.git"
},
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"license": "MIT",
"dependencies": {}
"scripts": {
"test": "tape test/*.js"
}
}

@@ -52,6 +52,17 @@ var test = require('tape');

t.same(
parse('beep;;boop|&byte'),
[ 'beep', { op: ';;' }, 'boop', { op: '|&' }, 'byte' ]
parse('beep;;boop|&byte>>blip'),
[ 'beep', { op: ';;' }, 'boop', { op: '|&' }, 'byte', { op: '>>' }, 'blip' ]
);
t.same(parse('beep 2>&1'), [ 'beep', '2', { op: '>&' }, '1' ]);
t.same(
parse('beep<(boop)'),
[ 'beep', { op: '<(' }, 'boop', { op: ')' } ]
);
t.same(
parse('beep<<(boop)'),
[ 'beep', { op: '<' }, { op: '<(' }, 'boop', { op: ')' } ]
);
t.end();

@@ -58,0 +69,0 @@ });

Sorry, the diff of this file is not supported yet