Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: avh4/binwrap
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 9f6efb70e24fc422d3a591f075f06b44c65160df
Choose a base ref
...
head repository: avh4/binwrap
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: de5791842d7617ae21f634e26c9b8bfe58064c31
Choose a head ref
  • 15 commits
  • 7 files changed
  • 3 contributors

Commits on May 14, 2019

  1. Copy the full SHA
    d2c9371 View commit details

Commits on May 25, 2019

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    950c4b9 View commit details

Commits on Jul 21, 2019

  1. Update dependencies

    avh4 committed Jul 21, 2019
    Copy the full SHA
    e7df24d View commit details
  2. Update eslint dependency

    avh4 committed Jul 21, 2019
    Copy the full SHA
    df7ca28 View commit details
  3. Update dependencies

    avh4 committed Jul 21, 2019
    Copy the full SHA
    1208bd4 View commit details
  4. Copy the full SHA
    b027d17 View commit details
  5. Copy the full SHA
    b4aec7e View commit details
  6. Copy the full SHA
    4384a9c View commit details
  7. Copy the full SHA
    6cd4933 View commit details
  8. Merge branch 'fix_crash' of https://github.com/MorganPersson/binwrap

    …into fix-upgrades
    avh4 committed Jul 21, 2019
    Copy the full SHA
    6fda752 View commit details
  9. Merge pull request #32 from avh4/fix-upgrades

    Fix "Error: EEXIST: file already exists" when upgrading
    avh4 authored Jul 21, 2019
    Copy the full SHA
    7640a0e View commit details
  10. Reduce startup time by only parsing package details when the brinarie…

    …s are not yet downloaded
    avh4 committed Jul 21, 2019
    Copy the full SHA
    c011c14 View commit details
  11. Merge pull request #33 from avh4/faster-startup

    Reduce startup time by only parsing package details when the brinarie…
    avh4 authored Jul 21, 2019
    Copy the full SHA
    80c1a21 View commit details

Commits on Aug 7, 2019

  1. Prepare 0.2.2 release

    avh4 committed Aug 7, 2019
    Copy the full SHA
    d69882e View commit details
  2. 0.2.2

    avh4 committed Aug 7, 2019
    Copy the full SHA
    de57918 View commit details
Showing with 1,162 additions and 650 deletions.
  1. +5 −0 CHANGELOG.md
  2. +1 −1 README.md
  3. +5 −1 binstall.js
  4. +4 −2 binstub.js.mustache
  5. +1,123 −638 package-lock.json
  6. +8 −8 package.json
  7. +16 −0 test/binwrapTest.js
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## 0.2.2

- startup time is reduces by 70% (about 150ms)
- installing should no longer fail if a previous version exists (such as when upgrading)

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ Now create your npm installer: Make a `package.json` that looks like this:
"myapp-cli": "bin/myapp-cli"
},
"dependencies": {
"binwrap": "^0.2.1"
"binwrap": "^0.2.2"
}
}
```
6 changes: 5 additions & 1 deletion binstall.js
Original file line number Diff line number Diff line change
@@ -42,7 +42,11 @@ function untgz(url, path, options) {
reject("Error decompressing " + url + " " + error);
});

fs.mkdirSync(path);
try {
fs.mkdirSync(path);
} catch (error) {
if (error.code !== 'EEXIST') throw error;
}

request
.get(url, function(error, response) {
6 changes: 4 additions & 2 deletions binstub.js.mustache
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@
var path = require("path");
var spawn = require("child_process").spawn;
var fs = require("fs");
var packageInfo = require(path.join(__dirname, "..", "package.json"));
var package = require(path.join(__dirname, "..", packageInfo.main));

var os = process.env.BINWRAP_PLATFORM || process.platform;
var arch = process.env.BINWRAP_ARCH || process.arch;
@@ -34,6 +32,10 @@ if (fs.existsSync(binPath)) {
execBin();
} else {
console.error("INFO: Running " + path.basename(__filename) + " for the first time; downloading the actual binary");

var packageInfo = require(path.join(__dirname, "..", "package.json"));
var package = require(path.join(__dirname, "..", packageInfo.main));

package.install(unpackedBinPath, os, arch).then(function(result) {
execBin();
}, function(err) {
Loading