Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Aug 31, 2023
1 parent 46baeec commit bea99b2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
fail-fast: false
matrix:
node-version:
- 20
- 18
- 16
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion fixtures/signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ asyncExitHook(async signal => {
wait: 200,
});

setInterval(() => {}, 1 << 30);
setInterval(() => {}, 1e9);
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ gracefulExit();
*/
export function gracefulExit(signal?: number): void;

export interface Options {
export type Options = {
/**
The amount of time in milliseconds that the `onExit` function is expected to take. When multiple async handlers are registered, the longest `wait` time will be used.
*/
wait: number;
}
readonly wait: number;
};
15 changes: 9 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"engines": {
"node": ">=18.0.0"
"node": ">=18"
},
"scripts": {
"test": "xo && ava && tsd"
Expand Down Expand Up @@ -41,9 +44,9 @@
"asynchronous"
],
"devDependencies": {
"ava": "^3.15.0",
"execa": "^5.1.1",
"tsd": "^0.17.0",
"xo": "^0.44.0"
"ava": "^5.3.1",
"execa": "^8.0.1",
"tsd": "^0.28.1",
"xo": "^0.56.0"
}
}
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import process from 'node:process';
import test from 'ava';
import execa from 'execa';
import {execa} from 'execa';
import exitHook, {asyncExitHook} from './index.js';

test('main', async t => {
Expand Down

0 comments on commit bea99b2

Please sign in to comment.