Skip to content

Commit

Permalink
Format types, bump version, add automatic deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitaeverywhere committed Apr 10, 2022
1 parent 9019c7f commit a06f6a8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 6 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Node.js package

on:
push:
branches:
- main

env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

jobs:
build-test-publish:
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16.x'
- run: npm install
- run: npm test
- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ env.NPM_TOKEN }}
12 changes: 7 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
interface OnShutdown {
(handler: ()=> Promise<void>): void
(name: string, handler: ()=> Promise<void>): void
(name: string, dependencies: string[], handler: ()=> Promise<void>): void
(handler: () => Promise<void>): void;
(name: string, handler: () => Promise<void>): void;
(name: string, dependencies: string[], handler: () => Promise<void>): void;
}

export const onShutdown: OnShutdown
export const onShutdown: OnShutdown;

export function onShutdownError(callback: (error: Error) => Promise<void>): void;
export function onShutdownError(
callback: (error: Error) => Promise<void>
): void;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-graceful-shutdown",
"version": "1.1.0",
"version": "1.1.1",
"description": "Gracefully shutdown your modular NodeJS application",
"main": "index.js",
"engines": {
Expand Down

0 comments on commit a06f6a8

Please sign in to comment.