diff --git a/CHANGELOG.md b/CHANGELOG.md index 26f62666793..850eaa3fa5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ **Bug fixes** - Removed extra right side margin in `EuiSuperDatePicker` ([#2236](https://github.com/elastic/eui/pull/2236)) -- Fix incorrect `onClick` type for `EuiButtonEmpty` ([#2282](https://github.com/elastic/eui/pull/2282)) +- Fixed incorrect `onClick` type for `EuiButtonEmpty` ([#2282](https://github.com/elastic/eui/pull/2282)) +- Fixed compilation script to remove all TypeScript definition exports from built JS assets ([#2279](https://github.com/elastic/eui/pull/2279)) ## [`13.7.0`](https://github.com/elastic/eui/tree/v13.7.0) diff --git a/scripts/babel/proptypes-from-ts-props/index.js b/scripts/babel/proptypes-from-ts-props/index.js index 99c0c9dfd32..bf6481ca25b 100644 --- a/scripts/babel/proptypes-from-ts-props/index.js +++ b/scripts/babel/proptypes-from-ts-props/index.js @@ -811,15 +811,16 @@ const typeDefinitionExtractors = { return []; } - if (importedDefinitionsCache.has(resolvedPath)) { - return importedDefinitionsCache.get(resolvedPath); + const cacheKey = `${sourceFilename}_${resolvedPath}` + if (importedDefinitionsCache.has(cacheKey)) { + return importedDefinitionsCache.get(cacheKey); } // to support circular dependencies, create & pre-cache the array of imported dependencies // this array is directly mutated after parsing the subsequent files, supporting // the circular nature as values settle into the correct locations const importedDefinitions = []; - importedDefinitionsCache.set(resolvedPath, importedDefinitions); + importedDefinitionsCache.set(cacheKey, importedDefinitions); // load & parse the imported file const ast = parse(fs.readFileSync(resolvedPath).toString());