Skip to content

Commit

Permalink
fix: remove jsonEnabled prop
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Aug 16, 2024
1 parent dde8e71 commit 3246bd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {MultiStageOutput} from './multi-stage-output.js'
export {MultiStageOutput, MultiStageOutputOptions} from './multi-stage-output.js'
12 changes: 1 addition & 11 deletions src/multi-stage-output.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const isInCi =
env.CI !== 'false' &&
('CI' in env || 'CONTINUOUS_INTEGRATION' in env || Object.keys(env).some((key) => key.startsWith('CI_')))

type MultiStageOutputOptions<T extends Record<string, unknown>> = {
export type MultiStageOutputOptions<T extends Record<string, unknown>> = {
/**
* Stages to render.
*/
Expand Down Expand Up @@ -64,12 +64,6 @@ type MultiStageOutputOptions<T extends Record<string, unknown>> = {
* Data to display in the stages component. This data will be passed to the get function in the info object.
*/
readonly data?: Partial<T>
/**
* Whether JSON output is enabled. Defaults to false.
*
* Pass in this.jsonEnabled() from the command class to determine if JSON output is enabled.
*/
readonly jsonEnabled: boolean
/**
* Design options to customize the output.
*/
Expand Down Expand Up @@ -240,7 +234,6 @@ export class MultiStageOutput<T extends Record<string, unknown>> implements Disp
public constructor({
data,
design,
jsonEnabled,
postStagesBlock,
preStagesBlock,
showElapsedTime,
Expand All @@ -262,13 +255,10 @@ export class MultiStageOutput<T extends Record<string, unknown>> implements Disp
this.stageTracker = new StageTracker(stages)
this.stageSpecificBlock = stageSpecificBlock

if (jsonEnabled) return

if (isInCi) {
this.ciInstance = new CIMultiStageOutput({
data,
design,
jsonEnabled,
postStagesBlock,
preStagesBlock,
showElapsedTime,
Expand Down

0 comments on commit 3246bd4

Please sign in to comment.