Skip to content

Commit 96ee39d

Browse files
committed
Update and remove deps, github actions
1 parent c225a04 commit 96ee39d

File tree

7 files changed

+7351
-20
lines changed

7 files changed

+7351
-20
lines changed

.github/workflows/ci.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Node.js CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [20]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: ${{ matrix.node-version }}
18+
registry-url: 'https://registry.npmjs.org'
19+
cache: 'npm'
20+
- run: npm ci
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
23+
- run: TZ=Europe/Oslo npm test

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules
22
coverage
3-
package-lock.json
43
.nyc_output

.release-it.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"pkgFiles": ["package.json", "package-lock.json"],
3+
"git": {
4+
"requireCleanWorkingDir": true,
5+
"changelog": "auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs"
6+
},
7+
"hooks": {
8+
"after:bump": "auto-changelog -p"
9+
}
10+
}

.travis.yml

-3
This file was deleted.

index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
'use strict';
2-
const Hoek = require('@hapi/hoek');
32

43
function register(server, options) {
5-
Hoek.assert(typeof options.headers === 'object', 'Option headers must be an object');
4+
if (typeof options.headers !== 'object') {
5+
throw new Error('Option headers must be an object');
6+
}
67

78
server.ext('onPreResponse', (request) => {
89
Object.keys(options.headers).forEach((key) => {

0 commit comments

Comments
 (0)