From ac780bdf2ec61c7d3a16dc3f6fddd7bd23929e5a Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 21 Jun 2022 11:04:29 +0100 Subject: [PATCH 1/3] export IConfiguration interface for API users --- src/api/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/index.ts b/src/api/index.ts index ddf849e54..e0097383c 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -5,6 +5,7 @@ * @packageDocumentation */ +export { IConfiguration } from '../configuration' export * from './load_configuration' export * from './load_sources' export * from './load_support' From aaebeb73b429bd1db64a51e74556c72eb4b3df5e Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 21 Jun 2022 11:09:50 +0100 Subject: [PATCH 2/3] update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 371b094c2..c712e7bc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). Please see [CONTRIBUTING.md](https://github.com/cucumber/cucumber/blob/master/CONTRIBUTING.md) on how to contribute to Cucumber. ## [Unreleased] +### Fixed +- Export `IConfiguration` type on API entry point ([#2064](https://github.com/cucumber/cucumber-js/pull/2064)) ## [8.3.0] - 2022-06-11 ### Added From 4527494bdf373c672ac84d5b8dad2e64fae70cad Mon Sep 17 00:00:00 2001 From: David Goss Date: Tue, 21 Jun 2022 11:19:22 +0100 Subject: [PATCH 3/3] add tsd test --- test-d/api.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test-d/api.ts b/test-d/api.ts index e7dda5934..450592cec 100644 --- a/test-d/api.ts +++ b/test-d/api.ts @@ -1,5 +1,8 @@ -import { loadConfiguration, runCucumber } from '../api' +import { IConfiguration, loadConfiguration, runCucumber } from '../api' // should allow api usage from /api subpath -const { runConfiguration } = await loadConfiguration() +const provided: Partial = { + paths: ['features/foo.feature'], +} +const { runConfiguration } = await loadConfiguration({ provided }) const { success } = await runCucumber(runConfiguration)