Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove src/test/* from type definitions file #3715

Merged
merged 7 commits into from
Jul 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `27.0.0`.
- Removed `src/test` and `@types/enzyme` references from `eui.d.ts` ([#3715](https://github.com/elastic/eui/pull/3715))
- Added `index.d.ts` file to `lib/test` and `es/test` ([#3715](https://github.com/elastic/eui/pull/3715))

## [`27.0.0`](https://github.com/elastic/eui/tree/v27.0.0)
- Added `paddingSize` prop to `EuiCard` ([#3638](https://github.com/elastic/eui/pull/3638))
Expand All @@ -23,7 +24,7 @@ No public interface changes since `27.0.0`.
- Added `listId` to `EuiSelectableSearch`
- `options` passed into `EuiSelectable` cannot have an `id`
- Requires an `onChange` to be passed into `EuiSelectableSearch`

## [`26.3.1`](https://github.com/elastic/eui/tree/v26.3.1)

**Note: this release is a backport containing changes originally made in `27.0.0`**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
],
"dependencies": {
"@types/chroma-js": "^2.0.0",
"@types/enzyme": "^3.1.13",
"@types/lodash": "^4.14.116",
"@types/numeral": "^0.0.25",
"@types/react-beautiful-dnd": "^12.1.2",
Expand Down Expand Up @@ -93,6 +92,7 @@
"@svgr/core": "5.0.1",
"@svgr/plugin-svgo": "^4.0.3",
"@types/classnames": "^2.2.6",
"@types/enzyme": "^3.1.13",
"@types/highlight.js": "^9.12.3",
"@types/jest": "^24.0.6",
"@types/node": "^10.17.5",
Expand Down
21 changes: 21 additions & 0 deletions scripts/compile-eui.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,27 @@ function compileBundle() {
},
});

console.log('Building test utils .d.ts files...');
dtsGenerator({
name: '@elastic/eui/lib/test',
out: 'lib/test/index.d.ts',
baseDir: path.resolve(__dirname, '..', 'src/test/'),
files: ['index.ts'],
resolveModuleId({ currentModuleId }) {
return `@elastic/eui/lib/test${currentModuleId !== 'index' ? `/${currentModuleId}` : ''}`;
},
});
dtsGenerator({
name: '@elastic/eui/es/test',
out: 'es/test/index.d.ts',
baseDir: path.resolve(__dirname, '..', 'src/test/'),
files: ['index.ts'],
resolveModuleId({ currentModuleId }) {
return `@elastic/eui/es/test${currentModuleId !== 'index' ? `/${currentModuleId}` : ''}`;
},
});
console.log(chalk.green('✔ Finished test utils files'));

console.log('Building chart theme module...');
execSync(
'webpack src/themes/charts/themes.ts -o dist/eui_charts_theme.js --output-library-target="commonjs" --config=src/webpack.config.js',
Expand Down
1 change: 1 addition & 0 deletions scripts/dtsgenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const generator = dtsGenerator({
'**/*.testenv.ts',
'**/*.testenv.tsx',
'src/themes/charts/*', // A separate d.ts file is generated for the charts theme file
'src/test/*' // A separate d.ts file is generated for test utils
],
resolveModuleId(params) {
if (
Expand Down