Broken typescript since release [email protected]
Since release 1.13.2, with this PR we are getting this error while running tsc command:
node_modules/@openzeppelin/upgrades-core/dist/upgrade-interface-version.d.ts:1:23 - error TS2688: Cannot find type definition file for 'debug'.
1 /// <reference types="debug" />
~~~~~
node_modules/@openzeppelin/upgrades-core/dist/upgrade-interface-version.d.ts:3:110 - error TS7016: Could not find a declaration file for module 'debug'. '~/node_modules/debug/src/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`
3 export declare function getUpgradeInterfaceVersion(provider: EthereumProvider, address: string, log?: import("debug").Debugger): Promise<string | undefined>;
~~~~~~~
Found 2 errors in the same file, starting at: node_modules/@openzeppelin/upgrades-core/dist/upgrade-interface-version.d.ts:1
And as this is a not fixed sub-dependency of "@openzeppelin/hardhat-upgrades": "1.27.0", it got updated silently after the release:
Can you share what version of upgrades-core you currently have installed? e.g. what is the output of npm list @openzeppelin/upgrades-core
How are you using the package and when do you see the above error? If possible, could you share an example github repo that encounters the issue? Thanks.
Sure, here is what I have now (forcing the last working version 1.31.1):
├─┬ @openzeppelin/[email protected]
│ └── @openzeppelin/[email protected] deduped
└── @openzeppelin/[email protected]
And this is what it installs if not forced (1.32.5), which fails:
└─┬ @openzeppelin/[email protected]
└── @openzeppelin/[email protected]
How are you using the package and when do you see the above error?
We are using it for tests and manage a bunch of upgradable contracts. The error happens while generating typescript dist with tsc command from "typescript": "5.0.4".
I cant't promise I would have time to set up a repo, but I'll try to.
I wasn't able to reproduce the issue using the above versions. At this point, having a repo that encounters this issue would be needed to look into this further.
Closing as per the above. Feel free to reopen if this still occurs.