Update dependencies and CI (#796)

* Update dependencies

* Run CI for "next" releases

* Grrr

* Update target versions

* Fix test on Node 17

* Fix deprecation notice
This commit is contained in:
James Sumners 2022-03-27 13:12:16 -04:00
parent 8dce600849
commit caab2c2b6f
6 changed files with 30 additions and 16 deletions

View File

@ -4,9 +4,14 @@ name: 'Integration Tests'
# https://github.community/t5/GitHub-Actions/Github-Actions-services-not-reachable/m-p/30739/highlight/true#M538 # https://github.community/t5/GitHub-Actions/Github-Actions-services-not-reachable/m-p/30739/highlight/true#M538
on: on:
push:
branches:
- master
- next
pull_request: pull_request:
branches: branches:
- master - master
- next
jobs: jobs:
baseline: baseline:

View File

@ -4,9 +4,11 @@ on:
push: push:
branches: branches:
- master - master
- next
pull_request: pull_request:
branches: branches:
- master - master
- next
jobs: jobs:
lint: lint:
@ -15,6 +17,8 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install Packages - name: Install Packages
run: npm install run: npm install
- name: Lint Code - name: Lint Code
@ -28,10 +32,9 @@ jobs:
- ubuntu-latest - ubuntu-latest
- windows-latest - windows-latest
node: node:
- 10.13.0 - 14
- 10.x - 16
- 12.x - 17
- 14.x
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3

7
.npmrc Normal file
View File

@ -0,0 +1,7 @@
# npm general settings
package-lock=false
legacy-peer-deps=true
# pnpm specific settings
hoist=false
public-hoist-pattern[]=*eslint*

View File

@ -27,17 +27,17 @@
"verror": "^1.8.1" "verror": "^1.8.1"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^7.20.0", "@fastify/pre-commit": "^2.0.2",
"eslint": "8.12.0",
"eslint-config-standard": "^16.0.2", "eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1", "eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0", "eslint-plugin-promise": "6.0.0",
"front-matter": "^4.0.2", "front-matter": "^4.0.2",
"get-port": "^5.1.1", "get-port": "^5.1.1",
"highlight.js": "^11.0.1", "highlight.js": "^11.0.1",
"husky": "^4.2.5",
"marked": "^4.0.0", "marked": "^4.0.0",
"tap": "15.2.3" "tap": "16.0.1"
}, },
"scripts": { "scripts": {
"test": "tap --no-cov -R terse", "test": "tap --no-cov -R terse",
@ -51,9 +51,8 @@
"lint:ci": "eslint .", "lint:ci": "eslint .",
"docs": "node scripts/build-docs.js" "docs": "node scripts/build-docs.js"
}, },
"husky": { "pre-commit": [
"hooks": { "lint:ci",
"pre-commit": "npm run lint:ci && npm run test" "test"
} ]
}
} }

View File

@ -122,7 +122,7 @@ tap.test('GH-55 Client emits connect multiple times', function (t) {
t.ok(socket) t.ok(socket)
count++ count++
c.bind('cn=root', 'secret', function (err) { c.bind('cn=root', 'secret', function (err) {
t.ifError(err) t.error(err)
c.unbind(function () { c.unbind(function () {
t.equal(count, 1) t.equal(count, 1)
t.end() t.end()

View File

@ -55,7 +55,7 @@ tap.test('properties', function (t) {
t.equal(server.url, null, 'url empty before bind') t.equal(server.url, null, 'url empty before bind')
// listen on a random port so we have a url // listen on a random port so we have a url
server.listen(0, 'localhost', function () { server.listen(0, '127.0.0.1', function () {
t.ok(server.url) t.ok(server.url)
server.close(() => t.end()) server.close(() => t.end())
@ -94,7 +94,7 @@ tap.test('listen on static port', function (t) {
tap.test('listen on ephemeral port', function (t) { tap.test('listen on ephemeral port', function (t) {
const server = ldap.createServer() const server = ldap.createServer()
server.listen(0, 'localhost', function () { server.listen(0, '127.0.0.1', function () {
const addr = server.address() const addr = server.address()
t.ok(addr.port > 0) t.ok(addr.port > 0)
t.ok(addr.port < 65535) t.ok(addr.port < 65535)