[Bug]: 2.5.0, missing dependency on @types/triple-beam
carboneater opened this issue · 2 comments
carboneater commented
The problem
On Typescript, since 2.5.0, transpilation fails, due to missing types
script-checker/node_modules/logform/index.d.ts:6:37 - error TS7016: Could not find a declaration file for module 'triple-beam'. '/home/gfournier/focus/ts/script-checker/node_modules/triple-beam/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/triple-beam` if it exists or add a new declaration (.d.ts) file containing `declare module 'triple-beam';`
6 import {LEVEL, MESSAGE, SPLAT} from 'triple-beam'
~~~~~~~~~~~~~
script-checker/node_modules/logform/index.d.ts:11:3 - error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
11 [LEVEL]?: string;
~~~~~~~
script-checker/node_modules/logform/index.d.ts:12:3 - error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
12 [MESSAGE]?: any;
~~~~~~~~~
script-checker/node_modules/logform/index.d.ts:13:3 - error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
13 [SPLAT]?: any;
~~~~~~~
What version of Logform presents the issue?
2.5.0
What version of Node are you using?
18.14.0
If this worked in a previous version of Logform, which was it?
2.4.2
Minimum Working Example
npm i winston logform typescript @types/node
import {createLogger } from 'winston'
createLogger()
npx tsc
... Boom!
Additional information
add npm i @types/triple-beam
to the example and it builds
🔎 Search Terms
2.5.0
wbt commented
Thanks for the report. Would someone like to make a PR adding tests to prevent future regression?
wbt commented
Closing as fixed by @carboneater's PR #243 released in v2.5.1; can be reopened if that isn't a fix.
Tests to prevent future regressions would still be welcome.