Last 12 weeks · 7 commits
4 of 6 standards met
Recently, projects that were compliable using broke because of a breaking change that escaped into a patch. I imagine this was a simple mistake, so I'm just letting you know. The commit bc3a283 changed the interface in a breaking matter by widening the function, and already implemented functions were not ready to handle the broader inputs.
Removed from -> the test suite uses Node.js built-in , not ava (drops 115 packages from the dev dependency tree) Fixed option default in readme -> was (looks like a string literal) now (property reference) matching / style Test plan [x] passes [x] passes [x] confirms ava removal drops 115 packages Doesnt close any specific issue
While using the types, I hit two cases where the type definitions disagree with what actually does. allows , but the setter rejects it is typed as on both and the interface, so type-checks. At runtime the setter throws for anything that is not a valid color or : So this compiles but throws: is meaningful (it disables the color), but is not a valid value. This narrows the type to in both places. / on the interface drop the function form On the interface, and are typed as , but the implementation resolves a function by calling it: The JSDoc on both members already says "text or function that returns text", the / types are already exported, and and already use / . Only the interface members were left as plain , so assigning a function to is a type error even though it works at runtime. This widens them to match. Tests Added assertions for the rejected and for the function forms of /.
Repository: sindresorhus/ora. Description: Elegant terminal spinner Stars: 9721, Forks: 290. Primary language: JavaScript. Languages: JavaScript (97%), TypeScript (3%). License: MIT. Latest release: v9.4.1 (2w ago). Open PRs: 0, open issues: 0. Last activity: 1w ago. Community health: 85%. Top contributors: sindresorhus, stroncium, jeetiss, SamVerschueren, BendingBender, tommy-mitchell, agusayerza, aminya, parro-it, andygrunwald and others.