Skip to content

Commit

Permalink
add named export for CucumberHtmlStream
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgoss committed Aug 3, 2024
1 parent d2842a9 commit 1e8e9bb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@cucumber/html-formatter",
"version": "21.5.0",
"description": "HTML formatter for Cucumber",
"main": "dist/src/CucumberHtmlStream.js",
"types": "dist/src/CucumberHtmlStream.d.ts",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/cucumber/html-formatter.git"
Expand Down
2 changes: 1 addition & 1 deletion javascript/src/CucumberHtmlStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as messages from '@cucumber/messages'
import fs from 'fs'
import { Readable, Transform, TransformCallback } from 'stream'

export default class CucumberHtmlStream extends Transform {
export class CucumberHtmlStream extends Transform {
private template: string | null = null
private preMessageWritten = false
private postMessageWritten = false
Expand Down
8 changes: 8 additions & 0 deletions javascript/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { CucumberHtmlStream } from './CucumberHtmlStream'

export * from './CucumberHtmlStream'

/**
* @deprecated use the named export `CucumberHtmlStream` instead
*/
export default CucumberHtmlStream
2 changes: 1 addition & 1 deletion javascript/test/CucumberHtmlStreamTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as messages from '@cucumber/messages'
import assert from 'assert'
import { Writable } from 'stream'

import CucumberHtmlStream from '../src/CucumberHtmlStream'
import { CucumberHtmlStream } from '../src'

async function renderAsHtml(
...envelopes: messages.Envelope[]
Expand Down

0 comments on commit 1e8e9bb

Please sign in to comment.