Skip to content

Commit 03a44e6

Browse files
erunionreynolek
andauthored
rfc: drop support for < Node 10 (Kong#204)
* chore(deps-dev): upgrading standard and mocha to the latest versions * style: fixing standard issues in unit tests * style: fixing standard issues on the rest of the codebase * chore: removing .jshintrc from npmignore * chore(deps): removing pinkie-promise because it's no longer used * ci: removing node 8 from travis Co-authored-by: Eric Reynolds <reynolek@gmail.com>
1 parent d82a992 commit 03a44e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2334
-2048
lines changed

.jshintrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
.jshintrc
21
.editorconfig
32
test

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ language: node_js
33
node_js:
44
- node
55
- lts/*
6-
- 8
76

87
before_install:
98
- sudo apt-get update -qq

bin/httpsnippet

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
'use strict'
44

5-
var chalk = require('chalk')
6-
var cmd = require('commander')
7-
var fs = require('fs')
8-
var readFile = require('fs-readfile-promise')
9-
var writeFile = require('fs-writefile-promise')
10-
var HTTPSnippet = require('..')
11-
var path = require('path')
12-
var pkg = require('../package.json')
5+
const chalk = require('chalk')
6+
const cmd = require('commander')
7+
const fs = require('fs')
8+
const readFile = require('fs-readfile-promise')
9+
const writeFile = require('fs-writefile-promise')
10+
const HTTPSnippet = require('..')
11+
const path = require('path')
12+
const pkg = require('../package.json')
1313

1414
cmd
1515
.version(pkg.version)
@@ -23,16 +23,17 @@ if (!cmd.args.length || !cmd.target) {
2323
cmd.help()
2424
}
2525

26+
let dir
2627
if (cmd.output) {
27-
var dir = path.resolve(cmd.output)
28+
dir = path.resolve(cmd.output)
2829

2930
if (!fs.existsSync(dir)) {
3031
fs.mkdirSync(dir)
3132
}
3233
}
3334

3435
cmd.args.forEach(function (fileName) {
35-
var file = path.basename(fileName)
36+
const file = path.basename(fileName)
3637

3738
readFile(fileName)
3839
.then(JSON.parse)
@@ -57,7 +58,7 @@ cmd.args.forEach(function (fileName) {
5758

5859
.then(function (output) {
5960
if (!output) {
60-
var targetNames = HTTPSnippet.availableTargets().map(function (t) { return t.key }).join(', ')
61+
const targetNames = HTTPSnippet.availableTargets().map(function (t) { return t.key }).join(', ')
6162
return console.error('%s %s is not a valid target. Valid targets: %s', chalk.red('✖'), chalk.red(cmd.target), chalk.cyan(targetNames))
6263
}
6364

@@ -67,9 +68,9 @@ cmd.args.forEach(function (fileName) {
6768
}
6869

6970
// write to file
70-
var name = path.basename(file, path.extname(file))
71+
const name = path.basename(file, path.extname(file))
7172

72-
var filename = path.format({
73+
const filename = path.format({
7374
dir: dir,
7475
base: name + HTTPSnippet.extname(cmd.target)
7576
})

0 commit comments

Comments
 (0)