+2
-2
| #!/usr/bin/env node | ||
| 'use strict'; | ||
| var _shx = require('./shx'); | ||
| var _minimist = require('minimist'); | ||
@@ -10,2 +8,4 @@ | ||
| var _shx = require('./shx'); | ||
| var _config = require('./config'); | ||
@@ -12,0 +12,0 @@ |
+7
-14
@@ -1,2 +0,1 @@ | ||
| #!/usr/bin/env node | ||
| 'use strict'; | ||
@@ -17,10 +16,2 @@ | ||
| var _help = require('./help'); | ||
| var _help2 = _interopRequireDefault(_help); | ||
| var _config = require('./config'); | ||
| var _printCmdRet = require('./printCmdRet'); | ||
| var _path = require('path'); | ||
@@ -34,6 +25,10 @@ | ||
| var _es6ObjectAssign = require('es6-object-assign'); | ||
| var _help = require('./help'); | ||
| var _es6ObjectAssign2 = _interopRequireDefault(_es6ObjectAssign); | ||
| var _help2 = _interopRequireDefault(_help); | ||
| var _config = require('./config'); | ||
| var _printCmdRet = require('./printCmdRet'); | ||
| function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -43,4 +38,2 @@ | ||
| _es6ObjectAssign2.default.polyfill(); // modifies the global object | ||
| _shelljs2.default.help = _help2.default; | ||
@@ -147,3 +140,3 @@ | ||
| /* instanbul ignore next */ | ||
| var code = ret.hasOwnProperty('code') && ret.code; | ||
| var code = Object.prototype.hasOwnProperty.call(ret, 'code') && ret.code; | ||
@@ -150,0 +143,0 @@ if ((fnName === 'pwd' || fnName === 'which') && !ret.match(/\n$/) && ret.length > 1) { |
+13
-12
| { | ||
| "name": "shx", | ||
| "version": "0.3.2", | ||
| "version": "0.3.3", | ||
| "description": "Portable Shell Commands for Node", | ||
@@ -12,2 +12,3 @@ "bin": { | ||
| "scripts": { | ||
| "check-node-support": "node scripts/check-node-support", | ||
| "prebuild": "rimraf lib", | ||
@@ -60,7 +61,8 @@ "build": "babel src -d lib", | ||
| "concurrently": "^2.1.0", | ||
| "eslint": "^2.10.1", | ||
| "eslint-config-airbnb-base": "^3.0.1", | ||
| "eslint-plugin-import": "^1.8.0", | ||
| "mocha": "^5.2.0", | ||
| "nyc": "^11.0.0", | ||
| "eslint": "^5.16.0", | ||
| "eslint-config-airbnb-base": "^13.1.0", | ||
| "eslint-plugin-import": "^2.17.3", | ||
| "js-yaml": "^3.12.0", | ||
| "mocha": "^6.1.4", | ||
| "nyc": "^14.1.1", | ||
| "rimraf": "^2.5.2", | ||
@@ -70,13 +72,12 @@ "shelljs-changelog": "^0.2.0", | ||
| "shelljs-release": "^0.3.0", | ||
| "should": "^11.1.1", | ||
| "watch": "^0.18.0" | ||
| "should": "^13.2.3", | ||
| "watch": "^1.0.2" | ||
| }, | ||
| "dependencies": { | ||
| "es6-object-assign": "^1.0.3", | ||
| "minimist": "^1.2.0", | ||
| "shelljs": "^0.8.1" | ||
| "minimist": "^1.2.3", | ||
| "shelljs": "^0.8.4" | ||
| }, | ||
| "engines": { | ||
| "node": ">=4" | ||
| "node": ">=6" | ||
| } | ||
| } |
+39
-2
@@ -13,2 +13,4 @@ # Shx | ||
| `shx` is proudly tested on every node release since <!-- start minVersion -->`v6`<!-- stop minVersion -->! | ||
| ## Difference Between ShellJS and shx | ||
@@ -82,6 +84,41 @@ | ||
| ## Unsupported Commands | ||
| **Tip:** because Windows treats single quotes (ex. `'some string'`) differently | ||
| than double quotes, [we | ||
| recommend](https://github.com/shelljs/shx/issues/165#issuecomment-563127983) | ||
| wrapping your arguments in double quotes for cross platform compatibility (ex. | ||
| `"some string"`). | ||
| Due to the differences in execution environments between ShellJS and `shx` (JS vs CLI) some commands are not supported: | ||
| ## Command reference | ||
| Shx exposes [most ShellJS | ||
| commands](https://github.com/shelljs/shelljs#command-reference). If a command is | ||
| not listed here, assume it's supported! | ||
| ### sed | ||
| Shx provides unix-like syntax on top of `shell.sed()`. So ShellJS code like: | ||
| ```js | ||
| shell.sed('-i', /original string/g, 'replacement', 'filename.txt'); | ||
| ``` | ||
| would turn into the following Shx command: | ||
| ```sh | ||
| shx sed -i "s/original string/replacement/g" filename.txt | ||
| ``` | ||
| **Note:** like unix `sed`, `shx sed` treats `/` as a special character, and | ||
| [this must be | ||
| escaped](https://github.com/shelljs/shx/issues/169#issuecomment-563013849) (as | ||
| `\/` in the shell, or `\\/` in `package.json`) if you intend to use this | ||
| character in either the regex or replacement string. Do **not** escape `/` | ||
| characters in the file path. | ||
| ### Unsupported Commands | ||
| As mentioned above, most ShellJS commands are supported in ShellJS. Due to the | ||
| differences in execution environments between ShellJS and `shx` (JS vs CLI) the | ||
| following commands are not supported: | ||
| | Unsupported command | Recommend workaround | | ||
@@ -88,0 +125,0 @@ | ------------------- | -------------------- | |
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
35235
3.3%2
-33.33%150
32.74%17
6.25%257
-1.53%- Removed
- Removed
Updated
Updated