+12
| Copyright (c) 2015, Ola Holmström | ||
| Permission to use, copy, modify, and/or distribute this software for | ||
| any purpose with or without fee is hereby granted, provided that the | ||
| above copyright notice and this permission notice appear in all copies. | ||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
+5
-0
@@ -0,1 +1,6 @@ | ||
| # 1.0.4 (2015-10-20) | ||
| * Don't start electron if there is no diff. | ||
| * Use pre tag to get formatting correct. | ||
| # 1.0.3 (2015-10-19) | ||
@@ -2,0 +7,0 @@ |
+22
-7
@@ -10,8 +10,23 @@ #!/usr/bin/env node | ||
| if (!process.stdin.isTTY) { | ||
| var proc = spawn(electron, args) | ||
| process.stdin.pipe(proc.stdin) | ||
| } else { | ||
| console.error("No stdin provided"); | ||
| process.exit(1); | ||
| } | ||
| var hasRead = false; | ||
| process.stdin.on('readable', function () { | ||
| var partial = process.stdin.read(1); | ||
| if (!partial) { | ||
| console.error("Your branch has no changes to view."); | ||
| process.exit(0); | ||
| } | ||
| if (partial && !hasRead) { | ||
| partial = partial.toString().trim(); | ||
| hasRead = true; | ||
| if (!process.stdin.isTTY && partial !== "") { | ||
| var proc = spawn(electron, args) | ||
| process.stdin.pipe(proc.stdin) | ||
| } else if (partial === "") { | ||
| console.error("Your branch has no changes to view."); | ||
| process.exit(0); | ||
| } else { | ||
| console.error("No stdin provided"); | ||
| process.exit(1); | ||
| } | ||
| } | ||
| }); |
+3
-1
@@ -27,3 +27,5 @@ const ipc = require("ipc"); | ||
| </td> | ||
| <td dangerouslySetInnerHTML={{__html: html}} /> | ||
| <td> | ||
| <pre dangerouslySetInnerHTML={{__html: html}} /> | ||
| </td> | ||
| </tr> | ||
@@ -30,0 +32,0 @@ ); |
+5
-1
@@ -43,3 +43,7 @@ "use strict"; | ||
| ), | ||
| React.createElement("td", { dangerouslySetInnerHTML: { __html: html } }) | ||
| React.createElement( | ||
| "td", | ||
| null, | ||
| React.createElement("pre", { dangerouslySetInnerHTML: { __html: html } }) | ||
| ) | ||
| ); | ||
@@ -46,0 +50,0 @@ } |
+1
-1
| { | ||
| "name": "viewdiff", | ||
| "version": "1.0.3", | ||
| "version": "1.0.4", | ||
| "description": "View your diffs a separate window.", | ||
@@ -5,0 +5,0 @@ "main": "server.js", |
+5
-0
@@ -27,2 +27,7 @@ # viewdiff | ||
| ## Contributors | ||
| * Ola Holmström (@olahol) | ||
| * Eric Hagman (@emhagman) | ||
| [npm-image]: https://img.shields.io/npm/v/viewdiff.svg?style=flat-square | ||
@@ -29,0 +34,0 @@ [npm-url]: https://npmjs.org/package/viewdiff |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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
245067
0.6%11
10%255
8.97%36
16.13%