Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Node 0.12 support and Babel #45

Merged
merged 5 commits into from
Feb 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
.DS_Store
build
npm-debug.log
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
.travis.yml
appveyor.yml
test
lib
npm-debug.log
9 changes: 1 addition & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,13 @@ os:
osx_image: xcode7.3
language: node_js
node_js:
- '0.10'
- '0.12'
- '4'
- '5'
- '6'
- '7'
cache:
- directories:
- "$HOME/.npm"
branches:
only:
- master
before_install:
- nvm install stable
script:
- npm run lint
- nvm use $TRAVIS_NODE_VERSION
- npm run unit-tests
3 changes: 1 addition & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ branches:

environment:
matrix:
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "4"
- nodejs_version: "5"
- nodejs_version: "6"
- nodejs_version: "7"

skip_tags: true

Expand Down
3 changes: 1 addition & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const debug = require('debug')('electron-download')
const fs = require('fs-extra')
const homePath = require('home-path')
const rc = require('rc')
const nugget = require('nugget')
const os = require('os')
Expand Down Expand Up @@ -44,7 +43,7 @@ class ElectronDownloader {
}

get cache () {
return this.opts.cache || path.join(homePath(), './.electron')
return this.opts.cache || path.join(os.homedir(), './.electron')
}

get cachedChecksum () {
Expand Down
27 changes: 10 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
"name": "electron-download",
"version": "3.2.0",
"description": "download electron prebuilt binary zips from github releases",
"main": "build/index.js",
"main": "lib/index.js",
"bin": {
"electron-download": "build/cli.js"
"electron-download": "lib/cli.js"
},
"scripts": {
"prepublish": "babel --out-dir build lib",
"lint": "eslint lib test",
"unit-tests": "tape -r babel-register test/*.js",
"unit-tests": "tape test/*.js",
"test": "npm run unit-tests && npm run lint"
},
"repository": {
Expand All @@ -24,19 +23,15 @@
"homepage": "https://github.com/electron-userland/electron-download#readme",
"dependencies": {
"debug": "^2.2.0",
"fs-extra": "^0.30.0",
"home-path": "^1.0.1",
"fs-extra": "^2.0.0",
"minimist": "^1.2.0",
"nugget": "^2.0.0",
"path-exists": "^2.1.0",
"path-exists": "^3.0.0",
"rc": "^1.1.2",
"semver": "^5.3.0",
"sumchecker": "^1.2.0"
"sumchecker": "^2.0.1"
},
"devDependencies": {
"babel-cli": "^6.14.0",
"babel-preset-es2015": "^6.14.0",
"babel-register": "^6.14.0",
"eslint": "^3.2.0",
"eslint-config-standard": "^5.2.0",
"eslint-plugin-promise": "^2.0.0",
Expand All @@ -56,10 +51,8 @@
]
}
},
"babel": {
"presets": [
"es2015"
]
},
"keywords": []
"keywords": [],
"engines": {
"node": ">= 4.0"
}
}
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ Used by [electron-prebuilt](https://npmjs.org/electron-prebuilt) and [electron-p

### Usage

**Note: Requires Node >= 4.0 to run.**

```shell
$ npm install --global electron-download
$ electron-download --version=0.31.1
```

```javascript
var download = require('electron-download')
const download = require('electron-download')

download({
version: '0.25.1',
Expand Down
4 changes: 2 additions & 2 deletions test/test_bad_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

const download = require('../lib/index')
const fs = require('fs')
const homePath = require('home-path')
const mkdirp = require('mkdirp').sync
const os = require('os')
const path = require('path')
const test = require('tape')
const verifyDownloadedZip = require('./helpers').verifyDownloadedZip

test('bad config test', (t) => {
const configPath = path.join(homePath(), '.config', 'npm', 'config')
const configPath = path.join(os.homedir(), '.config', 'npm', 'config')
mkdirp(path.dirname(configPath))
fs.writeFileSync(configPath, '{')

Expand Down