Skip to content

Commit bbb886e

Browse files
authored
fix: remove deep imports to cucumber (#11)
* replace deep imports with stuff from entry point * unpack formatter helpers from `formatterHelpers` * add changelog entry
1 parent be77dfb commit bbb886e

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
2222

2323
### Fixed
2424

25+
* Replace `@cucumber/cucumber` deep imports with equivalents from main entry point
26+
2527
## [1.0.0-alpha.1](https://github.com/jbpros/cucumber-pretty-formatter/compare/v1.0.0-alpha.0...v1.0.0-alpha.1)
2628

2729
### Fixed

src/index.ts

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import { Status, SummaryFormatter } from '@cucumber/cucumber'
2-
import { IFormatterOptions } from '@cucumber/cucumber/lib/formatter'
3-
import { formatLocation } from '@cucumber/cucumber/lib/formatter/helpers'
41
import {
5-
getGherkinExampleRuleMap,
6-
getGherkinScenarioMap,
7-
getGherkinStepMap,
8-
} from '@cucumber/cucumber/lib/formatter/helpers/gherkin_document_parser'
9-
import { getPickleStepMap } from '@cucumber/cucumber/lib/formatter/helpers/pickle_parser'
2+
Status,
3+
SummaryFormatter,
4+
IFormatterOptions,
5+
formatterHelpers,
6+
} from '@cucumber/cucumber'
107
import * as messages from '@cucumber/messages'
118
import * as CliTable3 from 'cli-table3'
129
import { cross, tick } from 'figures'
@@ -15,6 +12,14 @@ import dedent from 'ts-dedent'
1512

1613
import { makeTheme, ThemeItem, ThemeStyles } from './theme'
1714

15+
const { formatLocation, GherkinDocumentParser, PickleParser } = formatterHelpers
16+
const {
17+
getGherkinExampleRuleMap,
18+
getGherkinScenarioMap,
19+
getGherkinStepMap,
20+
} = GherkinDocumentParser
21+
const { getPickleStepMap } = PickleParser
22+
1823
const marks = {
1924
[Status.AMBIGUOUS]: cross,
2025
[Status.FAILED]: cross,

0 commit comments

Comments
 (0)