Skip to content

Commit c5f6837

Browse files
committed
Require Node.js 6
1 parent 7eb2f6b commit c5f6837

File tree

4 files changed

+45
-56
lines changed

4 files changed

+45
-56
lines changed

.gitattributes

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
* text=auto
2-
*.js text eol=lf
1+
* text=auto eol=lf

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: node_js
22
node_js:
3+
- '10'
34
- '8'
45
- '6'
5-
- '4'

package.json

+40-40
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
{
2-
"name": "read-pkg",
3-
"version": "3.0.0",
4-
"description": "Read a package.json file",
5-
"license": "MIT",
6-
"repository": "sindresorhus/read-pkg",
7-
"author": {
8-
"name": "Sindre Sorhus",
9-
"email": "[email protected]",
10-
"url": "sindresorhus.com"
11-
},
12-
"engines": {
13-
"node": ">=4"
14-
},
15-
"scripts": {
16-
"test": "xo && ava"
17-
},
18-
"files": [
19-
"index.js"
20-
],
21-
"keywords": [
22-
"json",
23-
"read",
24-
"parse",
25-
"file",
26-
"fs",
27-
"graceful",
28-
"load",
29-
"pkg",
30-
"package",
31-
"normalize"
32-
],
33-
"dependencies": {
34-
"load-json-file": "^4.0.0",
35-
"normalize-package-data": "^2.3.2",
36-
"path-type": "^3.0.0"
37-
},
38-
"devDependencies": {
39-
"ava": "*",
40-
"xo": "*"
41-
}
2+
"name": "read-pkg",
3+
"version": "3.0.0",
4+
"description": "Read a package.json file",
5+
"license": "MIT",
6+
"repository": "sindresorhus/read-pkg",
7+
"author": {
8+
"name": "Sindre Sorhus",
9+
"email": "[email protected]",
10+
"url": "sindresorhus.com"
11+
},
12+
"engines": {
13+
"node": ">=6"
14+
},
15+
"scripts": {
16+
"test": "xo && ava"
17+
},
18+
"files": [
19+
"index.js"
20+
],
21+
"keywords": [
22+
"json",
23+
"read",
24+
"parse",
25+
"file",
26+
"fs",
27+
"graceful",
28+
"load",
29+
"pkg",
30+
"package",
31+
"normalize"
32+
],
33+
"dependencies": {
34+
"load-json-file": "^5.0.0",
35+
"normalize-package-data": "^2.3.2",
36+
"path-type": "^3.0.0"
37+
},
38+
"devDependencies": {
39+
"ava": "*",
40+
"xo": "*"
41+
}
4242
}

readme.md

+3-13
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,10 @@ $ npm install read-pkg
2323
```js
2424
const readPkg = require('read-pkg');
2525

26-
readPkg().then(pkg => {
27-
console.log(pkg);
26+
(async () => {
27+
console.log( await readPkg());
2828
//=> {name: 'read-pkg', ...}
29-
});
30-
31-
readPkg(__dirname).then(pkg => {
32-
console.log(pkg);
33-
//=> {name: 'read-pkg', ...}
34-
});
35-
36-
readPkg(path.join('unicorn', 'package.json')).then(pkg => {
37-
console.log(pkg);
38-
//=> {name: 'read-pkg', ...}
39-
});
29+
})();
4030
```
4131

4232

0 commit comments

Comments
 (0)