@typechain/hardhat
Advanced tools
Comparing version 3.0.0 to 3.1.0
# @typechain/hardhat | ||
## 3.1.0 | ||
### Minor Changes | ||
- 5f81ca9: Using `--ts-nocheck` (`config.tsNocheck`) flag, you can now add `// @ts-nocheck` comment in case where code | ||
generated by TypeChain doesn't pass typechecking. | ||
Read more in [TypeScript docs][tsdocs]. | ||
[tsdocs]: | ||
(https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html#-ts-nocheck-in-typescript-files) | ||
## 3.0.0 | ||
@@ -4,0 +16,0 @@ |
@@ -9,2 +9,3 @@ "use strict"; | ||
alwaysGenerateOverloads: false, | ||
tsNocheck: false, | ||
}; | ||
@@ -11,0 +12,0 @@ return { |
@@ -61,2 +61,3 @@ "use strict"; | ||
if (artifactPaths.length === 0 && !taskArgsStore.fullRebuild && !typechainCfg.externalArtifacts) { | ||
// eslint-disable-next-line no-console | ||
console.log('No need to generate any newer typings.'); | ||
@@ -68,2 +69,3 @@ return compileSolOutput; | ||
const needsFullRebuild = taskArgsStore.fullRebuild || typechainCfg.target !== 'ethers-v5'; | ||
// eslint-disable-next-line no-console | ||
console.log(`Generating typings for: ${artifactPaths.length} artifacts in dir: ${typechainCfg.outDir} for target: ${typechainCfg.target}`); | ||
@@ -75,5 +77,4 @@ const cwd = config.paths.root; | ||
} | ||
const result = await (0, typechain_1.runTypeChain)({ | ||
const typechainOptions = { | ||
cwd, | ||
filesToProcess: needsFullRebuild ? allFiles : (0, typechain_1.glob)(cwd, artifactPaths), | ||
allFiles, | ||
@@ -83,6 +84,12 @@ outDir: typechainCfg.outDir, | ||
flags: { | ||
alwaysGenerateOverloads: config.typechain.alwaysGenerateOverloads, | ||
alwaysGenerateOverloads: typechainCfg.alwaysGenerateOverloads, | ||
tsNocheck: typechainCfg.tsNocheck, | ||
environment: 'hardhat', | ||
}, | ||
}; | ||
const result = await (0, typechain_1.runTypeChain)({ | ||
...typechainOptions, | ||
filesToProcess: needsFullRebuild ? allFiles : (0, typechain_1.glob)(cwd, artifactPaths), // only process changed files if not doing full rebuild | ||
}); | ||
// eslint-disable-next-line no-console | ||
console.log(`Successfully generated ${result.filesGenerated} typings!`); | ||
@@ -92,12 +99,6 @@ // if this is not full rebuilding, always re-generate types for external artifacts | ||
const result = await (0, typechain_1.runTypeChain)({ | ||
cwd, | ||
filesToProcess: (0, typechain_1.glob)(cwd, typechainCfg.externalArtifacts, false), | ||
allFiles, | ||
outDir: typechainCfg.outDir, | ||
target: typechainCfg.target, | ||
flags: { | ||
alwaysGenerateOverloads: config.typechain.alwaysGenerateOverloads, | ||
environment: 'hardhat', | ||
}, | ||
...typechainOptions, | ||
filesToProcess: (0, typechain_1.glob)(cwd, typechainCfg.externalArtifacts, false), // only process files with external artifacts | ||
}); | ||
// eslint-disable-next-line no-console | ||
console.log(`Successfully generated ${result.filesGenerated} typings for external artifacts!`); | ||
@@ -104,0 +105,0 @@ } |
@@ -5,2 +5,3 @@ export interface TypechainUserConfig { | ||
alwaysGenerateOverloads?: boolean; | ||
tsNocheck?: boolean; | ||
externalArtifacts?: string[]; | ||
@@ -12,3 +13,4 @@ } | ||
alwaysGenerateOverloads: boolean; | ||
tsNocheck: boolean; | ||
externalArtifacts?: string[]; | ||
} |
@@ -14,3 +14,3 @@ { | ||
], | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"license": "MIT", | ||
@@ -17,0 +17,0 @@ "repository": "https://github.com/ethereum-ts/Typechain", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
23966
180