Skip to content

Commit

Permalink
drop support for node < v10
Browse files Browse the repository at this point in the history
Upgrade deps
  • Loading branch information
75lb committed Feb 9, 2020
1 parent c089eb1 commit c697416
Show file tree
Hide file tree
Showing 8 changed files with 1,005 additions and 1,032 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- 8
- 10
- 12
- 13
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-19
Copyright (c) 2013-20
Lloyd Brookes <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ $ npm install -g local-web-server

* * *

&copy; 2013-19 Lloyd Brookes \<[email protected]\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).
&copy; 2013-20 Lloyd Brookes \<[email protected]\>. Documented by [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown).
4 changes: 2 additions & 2 deletions bin/cli.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node
const nodeVersionMatches = require('node-version-matches')

if (nodeVersionMatches('>=8')) {
if (nodeVersionMatches('>=10')) {
const WsCli = require('../lib/cli-app')
const cli = new WsCli()
cli.start()
} else {
console.log('Sorry, this app requires node v8.0.0 or above. Please upgrade https://nodejs.org/en/')
console.log('Sorry, this app requires node v10.0.0 or above. Please upgrade https://nodejs.org/en/')
}
1,971 changes: 972 additions & 999 deletions package-lock.json

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"full-stack"
],
"engines": {
"node": ">=8"
"node": ">=10"
},
"scripts": {
"test": "test-runner test/*.js",
Expand All @@ -39,29 +39,29 @@
"index.js"
],
"dependencies": {
"lws": "^2.0.7",
"lws-basic-auth": "^1.0.3",
"lws-blacklist": "^2.0.2",
"lws-body-parser": "^1.0.2",
"lws-compress": "^1.0.2",
"lws-conditional-get": "^1.0.1",
"lws-cors": "^2.0.1",
"lws-index": "^1.0.5",
"lws-json": "^1.0.1",
"lws-log": "^1.0.3",
"lws-mime": "^1.0.1",
"lws-range": "^2.0.1",
"lws-request-monitor": "^1.0.4",
"lws-rewrite": "^2.0.10",
"lws-spa": "^2.0.2",
"lws-static": "^1.1.3",
"node-version-matches": "^1.0.1"
"lws": "^3.0.0",
"lws-basic-auth": "^2.0.0",
"lws-blacklist": "^3.0.0",
"lws-body-parser": "^2.0.0",
"lws-compress": "^2.0.0",
"lws-conditional-get": "^2.0.0",
"lws-cors": "^3.0.0",
"lws-index": "^2.0.0",
"lws-json": "^2.0.0",
"lws-log": "^2.0.0",
"lws-mime": "^2.0.0",
"lws-range": "^3.0.0",
"lws-request-monitor": "^2.0.0",
"lws-rewrite": "^3.0.0",
"lws-spa": "^3.0.0",
"lws-static": "^2.0.0",
"node-version-matches": "^2.0.1"
},
"devDependencies": {
"coveralls": "^3.0.7",
"jsdoc-to-markdown": "^5.0.2",
"coveralls": "^3.0.9",
"jsdoc-to-markdown": "^5.0.3",
"node-fetch": "^2.6.0",
"nyc": "^14.1.1",
"test-runner": "^0.7.2"
"nyc": "^15.0.0",
"test-runner": "^0.8.13"
}
}
4 changes: 2 additions & 2 deletions test/api.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Tom = require('test-runner').Tom
const fetch = require('node-fetch')
const LocalWebServer = require('../')
const a = require('assert')
const a = require('assert').strict

const tom = module.exports = new Tom()

Expand All @@ -14,5 +14,5 @@ tom.test('basic', async function () {
const response = await fetch(`http://localhost:${port}/one.txt`)
ws.server.close()
const body = await response.text()
a.strictEqual(body, 'one\n')
a.equal(body, 'one\n')
})
8 changes: 4 additions & 4 deletions test/cli.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const Tom = require('test-runner').Tom
const a = require('assert')
const a = require('assert').strict
const WsCli = require('../lib/cli-app')
const fetch = require('node-fetch')

Expand All @@ -11,15 +11,15 @@ tom.test('simple', async function () {
const server = cli.start([ '--port', `${port}` ])
const response = await fetch(`http://127.0.0.1:${port}/package.json`)
server.close()
a.strictEqual(response.status, 200)
a.equal(response.status, 200)
})

tom.test('bad option', async function () {
const exitCode = process.exitCode
const cli = new WsCli({ logError: function () {} })
const server = cli.start([ '--should-fail' ])
if (!exitCode) process.exitCode = 0
a.strictEqual(server, undefined)
a.equal(server, undefined)
})

tom.test('--help', async function () {
Expand All @@ -32,7 +32,7 @@ tom.test('--version', async function () {
const cli = new WsCli({ log: function (msg) { logMsg = msg } })
cli.start([ '--version' ])
const pkg = require('../package.json')
a.strictEqual(logMsg.trim(), pkg.version)
a.equal(logMsg.trim(), pkg.version)
})

tom.test('default-stack', async function () {
Expand Down

0 comments on commit c697416

Please sign in to comment.