+29
-1
@@ -5,12 +5,40 @@ # Change Log | ||
| [Full Changelog](https://github.com/shelljs/shx/compare/v0.2.1...HEAD) | ||
| [Full Changelog](https://github.com/shelljs/shx/compare/v0.2.2...HEAD) | ||
| **Closed issues:** | ||
| - Ship shx with shelljs@v0.8 [\#125](https://github.com/shelljs/shx/issues/125) | ||
| - Support executables [\#124](https://github.com/shelljs/shx/issues/124) | ||
| - Discuss: popd/pushd workarounds [\#121](https://github.com/shelljs/shx/issues/121) | ||
| - Feature request: date [\#120](https://github.com/shelljs/shx/issues/120) | ||
| - Fails trying to utilise the new script-shell npm config [\#117](https://github.com/shelljs/shx/issues/117) | ||
| - Refactor: consider using process.exitCode [\#116](https://github.com/shelljs/shx/issues/116) | ||
| - Add node v8 to CI [\#114](https://github.com/shelljs/shx/issues/114) | ||
| - can we use this without the `shx` prefix? [\#113](https://github.com/shelljs/shx/issues/113) | ||
| - Command substitution feature [\#112](https://github.com/shelljs/shx/issues/112) | ||
| **Merged pull requests:** | ||
| - feat: bump shelljs to expose new features [\#126](https://github.com/shelljs/shx/pull/126) ([nfischer](https://github.com/nfischer)) | ||
| - fix: use process.exitCode to wait for streams [\#123](https://github.com/shelljs/shx/pull/123) ([nfischer](https://github.com/nfischer)) | ||
| - Add workaround for pushd and popd to README [\#122](https://github.com/shelljs/shx/pull/122) ([eteeselink](https://github.com/eteeselink)) | ||
| - Add node 8 to CI [\#115](https://github.com/shelljs/shx/pull/115) ([freitagbr](https://github.com/freitagbr)) | ||
| ## [v0.2.2](https://github.com/shelljs/shx/tree/v0.2.2) (2017-01-08) | ||
| [Full Changelog](https://github.com/shelljs/shx/compare/v0.2.1...v0.2.2) | ||
| **Closed issues:** | ||
| - sed does not accept a blank replacement string [\#109](https://github.com/shelljs/shx/issues/109) | ||
| - chore: remove lgtm.co [\#102](https://github.com/shelljs/shx/issues/102) | ||
| - chore: consider allowing iojs failures on travis [\#99](https://github.com/shelljs/shx/issues/99) | ||
| - chore: switch appveyor to my account [\#97](https://github.com/shelljs/shx/issues/97) | ||
| **Merged pull requests:** | ||
| - fix: better regex support for sed [\#110](https://github.com/shelljs/shx/pull/110) ([nfischer](https://github.com/nfischer)) | ||
| - chore: switch appveyor to shelljs account [\#107](https://github.com/shelljs/shx/pull/107) ([nfischer](https://github.com/nfischer)) | ||
| - Remove lgtm.co related files [\#106](https://github.com/shelljs/shx/pull/106) ([freitagbr](https://github.com/freitagbr)) | ||
| - Update README.md [\#104](https://github.com/shelljs/shx/pull/104) ([corysimmons](https://github.com/corysimmons)) | ||
| - chore: allow Travis failures on iojs [\#100](https://github.com/shelljs/shx/pull/100) ([nfischer](https://github.com/nfischer)) | ||
@@ -17,0 +45,0 @@ ## [v0.2.1](https://github.com/shelljs/shx/tree/v0.2.1) (2016-11-19) |
+12
-23
@@ -20,16 +20,7 @@ #!/usr/bin/env node | ||
| // Pass stdin to shx as the 'this' parameter | ||
| var code = _shx.shx.call(input, process.argv); | ||
| process.exitCode = _shx.shx.call(input, process.argv); | ||
| // Make sure output is flushed before exiting the process. Please see: | ||
| // - https://github.com/shelljs/shx/issues/85 | ||
| // - https://github.com/mochajs/mocha/issues/333 | ||
| var streamCount = 0; | ||
| var streams = [process.stdout, process.stderr]; | ||
| streams.forEach(function (stream) { | ||
| streamCount++; // count each stream | ||
| stream.write('', function () { | ||
| streamCount--; // mark each stream as finished | ||
| if (streamCount === 0) process.exit(code); | ||
| }); | ||
| }); | ||
| // We use process.exitCode to ensure we don't terminate the process before | ||
| // streams finish. See: | ||
| // https://github.com/shelljs/shx/issues/85 | ||
| }; | ||
@@ -39,12 +30,10 @@ | ||
| if ((0, _config.shouldReadStdin)(parsedArgs._)) { | ||
| (function () { | ||
| // Read all stdin first, and then pass that onto ShellJS | ||
| var chunks = []; | ||
| process.stdin.on('data', function (data) { | ||
| return chunks.push(data); | ||
| }); | ||
| process.stdin.on('end', function () { | ||
| return run(chunks.join('')); | ||
| }); | ||
| })(); | ||
| // Read all stdin first, and then pass that onto ShellJS | ||
| var chunks = []; | ||
| process.stdin.on('data', function (data) { | ||
| return chunks.push(data); | ||
| }); | ||
| process.stdin.on('end', function () { | ||
| return run(chunks.join('')); | ||
| }); | ||
| } else { | ||
@@ -51,0 +40,0 @@ // There's no stdin, so we can immediately invoke the ShellJS function |
+2
-1
@@ -42,3 +42,4 @@ 'use strict'; | ||
| stopEarly: true, | ||
| boolean: allOptionsList }); | ||
| boolean: allOptionsList // treat all short options as booleans | ||
| }); | ||
| var requiredNumArgs = cmdInfo ? cmdInfo.minArgs : -1; | ||
@@ -45,0 +46,0 @@ |
+16
-18
@@ -97,20 +97,18 @@ #!/usr/bin/env node | ||
| if (fnName === 'sed') { | ||
| (function () { | ||
| newArgs = []; | ||
| var lookingForSubstString = true; | ||
| args.forEach(function (arg) { | ||
| var match = arg.match(/^s\/((?:\\\/|[^\/])+)\/((?:\\\/|[^\/])*)\/(g?)$/); | ||
| if (match && lookingForSubstString) { | ||
| var regexString = match[1].replace(/\\\//g, '/'); | ||
| var replacement = match[2].replace(/\\\//g, '/').replace(/\\./g, '.'); | ||
| var regexFlags = match[3]; | ||
| newArgs.push(new RegExp(regexString, regexFlags)); | ||
| newArgs.push(replacement); | ||
| lookingForSubstString = false; | ||
| } else { | ||
| newArgs.push(arg); | ||
| } | ||
| }); | ||
| ret = _shelljs2.default[fnName].apply(input, newArgs); | ||
| })(); | ||
| newArgs = []; | ||
| var lookingForSubstString = true; | ||
| args.forEach(function (arg) { | ||
| var match = arg.match(/^s\/((?:\\\/|[^\/])+)\/((?:\\\/|[^\/])*)\/(g?)$/); | ||
| if (match && lookingForSubstString) { | ||
| var regexString = match[1].replace(/\\\//g, '/'); | ||
| var replacement = match[2].replace(/\\\//g, '/').replace(/\\./g, '.'); | ||
| var regexFlags = match[3]; | ||
| newArgs.push(new RegExp(regexString, regexFlags)); | ||
| newArgs.push(replacement); | ||
| lookingForSubstString = false; | ||
| } else { | ||
| newArgs.push(arg); | ||
| } | ||
| }); | ||
| ret = _shelljs2.default[fnName].apply(input, newArgs); | ||
| } else { | ||
@@ -117,0 +115,0 @@ ret = _shelljs2.default[fnName].apply(input, args); |
+7
-4
| { | ||
| "name": "shx", | ||
| "version": "0.2.2", | ||
| "version": "0.3.0", | ||
| "description": "Portable Shell Commands for Node", | ||
@@ -66,4 +66,4 @@ "bin": { | ||
| "shelljs-changelog": "^0.2.0", | ||
| "shelljs-plugin-open": "^0.1.1", | ||
| "shelljs-release": "^0.2.0", | ||
| "shelljs-plugin-open": "^0.2.0", | ||
| "shelljs-release": "^0.3.0", | ||
| "should": "^11.1.1", | ||
@@ -75,4 +75,7 @@ "watch": "^0.18.0" | ||
| "minimist": "^1.2.0", | ||
| "shelljs": "^0.7.3" | ||
| "shelljs": "^0.8.1" | ||
| }, | ||
| "engines": { | ||
| "node": ">=4" | ||
| } | ||
| } |
+2
-2
@@ -88,4 +88,4 @@ # Shx | ||
| | `shx cd` | Just use plain old `cd` (it's the same on windows too) | | ||
| | `shx pushd` | No workaround | | ||
| | `shx popd` | No workaround | | ||
| | `shx pushd` | Just use plain old `pushd`. Use forward slashes and double-quote the path. (e.g. `pushd "../docs"`. This would fail on Windows without the quotes) | | ||
| | `shx popd` | Just use plain old `popd` | | ||
| | `shx dirs` | No workaround | | ||
@@ -92,0 +92,0 @@ | `shx set` | See below | |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
29316
7.2%3
-25%203
-5.58%+ Added
- Removed
Updated