- rm
util.format
dep, cjsrequire('util').format
imports a lot when used in FE project - switch to vitest, fix github actions badge
- can not use
global
in browser, usetypeof
to detectAbortController
&AbortSignal
- remove readme folder from publish
- use
export =
for dts file, no requiredesModuleInterop
& can work in TypeScript ESM environment
- use
AbortController
&AbortSignal
replaceonCancel
- fix
index.d.ts
, use ts@4.0 variadic tuple - export TimeoutError as class, because usage of
err instanceof ptimeout.TimeoutError
- re-target ES5
- update A lot, code take from promise.x/promise.timeout
- use
Promise.resolve
to add support none async function inptimeout(fn, ...)
- add
types/index.d.ts
typescript definition, and usetsd
to check d.ts - use
nyc
insteadofistanbul
- update deps & clean up code
- use prettier
- back to istanbul, rm
nyc
- rm
babel-eslint
, use eslint ecmaVersion = 8
- use
async/await
instead ofco-mocha
- use
nyc
instead ofistanbul
- use
semi: [error, never]
code style
- fix
deps
mistake
- when not timeout, clear the
reject(TimeoutError)
timer
- add
onCancel
to support clean up - use esformatter, remove jsbeautify
- make
ptimeout.TimeoutError
inherits fromError
- first publish