Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and remove deps, github actions #5

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Node.js CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: TZ=Europe/Oslo npm test
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
coverage
package-lock.json
.nyc_output
10 changes: 10 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"pkgFiles": ["package.json", "package-lock.json"],
"git": {
"requireCleanWorkingDir": true,
"changelog": "auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs"
},
"hooks": {
"after:bump": "auto-changelog -p"
}
}
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
'use strict';
const Hoek = require('@hapi/hoek');

function register(server, options) {
Hoek.assert(typeof options.headers === 'object', 'Option headers must be an object');
if (typeof options.headers !== 'object') {
throw new Error('Option headers must be an object');
}

server.ext('onPreResponse', (request) => {
Object.keys(options.headers).forEach((key) => {
Expand Down
Loading
Loading