From c5e4e94f4b5f9a434f3ef1404b2574883b382fbc Mon Sep 17 00:00:00 2001 From: David Goss Date: Thu, 17 Feb 2022 15:56:42 +0000 Subject: [PATCH 1/3] replace deep imports with stuff from entry point --- src/index.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index deb37e8..40a9c97 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,9 @@ -import { Status, SummaryFormatter } from '@cucumber/cucumber' -import { IFormatterOptions } from '@cucumber/cucumber/lib/formatter' -import { formatLocation } from '@cucumber/cucumber/lib/formatter/helpers' +import { + Status, + SummaryFormatter, + IFormatterOptions, + formatterHelpers, +} from '@cucumber/cucumber' import { getGherkinExampleRuleMap, getGherkinScenarioMap, @@ -15,6 +18,8 @@ import dedent from 'ts-dedent' import { makeTheme, ThemeItem, ThemeStyles } from './theme' +const { formatLocation } = formatterHelpers + const marks = { [Status.AMBIGUOUS]: cross, [Status.FAILED]: cross, From 0629d4256a091d68b0e79dd0a85a0c3dc039b004 Mon Sep 17 00:00:00 2001 From: David Goss Date: Thu, 17 Feb 2022 16:21:29 +0000 Subject: [PATCH 2/3] unpack formatter helpers from `formatterHelpers` --- src/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 40a9c97..516ea97 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,12 +4,6 @@ import { IFormatterOptions, formatterHelpers, } from '@cucumber/cucumber' -import { - getGherkinExampleRuleMap, - getGherkinScenarioMap, - getGherkinStepMap, -} from '@cucumber/cucumber/lib/formatter/helpers/gherkin_document_parser' -import { getPickleStepMap } from '@cucumber/cucumber/lib/formatter/helpers/pickle_parser' import * as messages from '@cucumber/messages' import * as CliTable3 from 'cli-table3' import { cross, tick } from 'figures' @@ -18,7 +12,13 @@ import dedent from 'ts-dedent' import { makeTheme, ThemeItem, ThemeStyles } from './theme' -const { formatLocation } = formatterHelpers +const { formatLocation, GherkinDocumentParser, PickleParser } = formatterHelpers +const { + getGherkinExampleRuleMap, + getGherkinScenarioMap, + getGherkinStepMap, +} = GherkinDocumentParser +const { getPickleStepMap } = PickleParser const marks = { [Status.AMBIGUOUS]: cross, From 31bc16ecb75a662f8c7311a232f8de8f95a64f02 Mon Sep 17 00:00:00 2001 From: David Goss Date: Thu, 17 Feb 2022 16:23:14 +0000 Subject: [PATCH 3/3] add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17dab47..68dc613 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,8 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo ### Fixed +* Replace `@cucumber/cucumber` deep imports with equivalents from main entry point + ## [1.0.0-alpha.1](https://github.com/jbpros/cucumber-pretty-formatter/compare/v1.0.0-alpha.0...v1.0.0-alpha.1) ### Fixed