Skip to content

Commit

Permalink
build(deps-dev): replace standard with neostandard
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Dec 8, 2024
1 parent 72b7e74 commit 771e7bd
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 294 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![CI](https://github.com/fastify/avvio/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/fastify/avvio/actions/workflows/ci.yml)
[![NPM version](https://img.shields.io/npm/v/avvio.svg?style=flat)](https://www.npmjs.com/package/avvio)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)
[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)

Asynchronous bootstrapping is hard, different things can go wrong, *error handling* and *load order* just to name a few. The aim of this module is to make it simple.

Expand Down
20 changes: 10 additions & 10 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { EventEmitter } from "events";
import { EventEmitter } from 'events'

declare function avvio(done?: Function): avvio.Avvio<null>;
declare function avvio<I>(
declare function avvio (done?: Function): avvio.Avvio<null>
declare function avvio<I> (
instance: I,
options?: avvio.Options,
done?: Function
): avvio.Avvio<I>;
): avvio.Avvio<I>

/**
* Typescript cannot manage changes related to options "expose"
* because undefined before runtime
*/
declare namespace avvio {
type context<I> = I extends null ? Avvio<I> : mixedInstance<I>;
type mixedInstance<I> = I & Server<I>;
type context<I> = I extends null ? Avvio<I> : mixedInstance<I>
type mixedInstance<I> = I & Server<I>

interface Options {
expose?: {
Expand All @@ -40,9 +40,9 @@ declare namespace avvio {
}

interface Avvio<I> extends EventEmitter, Server<I> {
on(event: "start", listener: () => void): this;
on(event: "preReady", listener: () => void): this;
on(event: "close", listener: () => void): this;
on(event: 'start', listener: () => void): this;
on(event: 'preReady', listener: () => void): this;
on(event: 'close', listener: () => void): this;

start(): this;

Expand Down Expand Up @@ -89,4 +89,4 @@ declare namespace avvio {
}
}

export = avvio;
export = avvio
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"main": "boot.js",
"type": "commonjs",
"scripts": {
"lint": "standard",
"lint:fix": "standard --fix",
"lint": "eslint",
"lint:fix": "eslint --fix",
"test": "npm run test:unit && npm run test:typescript",
"test:unit": "tap",
"test:typescript": "tsc --project ./test/types/tsconfig.json"
Expand Down Expand Up @@ -40,7 +40,7 @@
"devDependencies": {
"@fastify/pre-commit": "^2.1.0",
"@types/node": "^22.0.0",
"standard": "^17.1.0",
"neostandard": "^0.11.9",
"tap": "^18.7.1",
"typescript": "~5.7.2"
},
Expand Down
Loading

0 comments on commit 771e7bd

Please sign in to comment.