Skip to content

Commit 2f773fd

Browse files
committed
Require Node.js 6
1 parent 6c67e84 commit 2f773fd

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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'

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function relPath(base, filePath) {
1313
filePath = filePath.replace(/\\/g, '/');
1414
base = base.replace(/\\/g, '/');
1515

16-
if (filePath.indexOf(base) !== 0) {
16+
if (!filePath.startsWith(base)) {
1717
return filePath;
1818
}
1919

@@ -85,7 +85,7 @@ const plugin = () => {
8585
// Attempt to parse the sourcemap's JSON to get the reverse filename
8686
try {
8787
reverseFilename = JSON.parse(file.contents.toString()).file;
88-
} catch (err) {}
88+
} catch (_) {}
8989

9090
if (!reverseFilename) {
9191
reverseFilename = path.relative(path.dirname(file.path), path.basename(file.path, '.map'));
@@ -148,7 +148,7 @@ plugin.manifest = (pth, opts) => {
148148

149149
try {
150150
oldManifest = opts.transformer.parse(manifestFile.contents.toString());
151-
} catch (err) {}
151+
} catch (_) {}
152152

153153
manifest = Object.assign(oldManifest, manifest);
154154
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"url": "sindresorhus.com"
1111
},
1212
"engines": {
13-
"node": ">=4"
13+
"node": ">=6"
1414
},
1515
"scripts": {
1616
"test": "xo && ava"
@@ -35,7 +35,7 @@
3535
],
3636
"dependencies": {
3737
"modify-filename": "^1.1.0",
38-
"plugin-error": "^0.1.2",
38+
"plugin-error": "^1.0.1",
3939
"rev-hash": "^2.0.0",
4040
"rev-path": "^2.0.0",
4141
"sort-keys": "^2.0.0",

0 commit comments

Comments
 (0)