Skip to content

Commit

Permalink
fix: enquirer cjs import in esm-only environment
Browse files Browse the repository at this point in the history
  • Loading branch information
adbayb committed Sep 10, 2024
1 parent c08debf commit 7b157f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rude-ladybugs-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"termost": patch
---

Fix enquirer simulated cjs import in esm-only environment.
4 changes: 3 additions & 1 deletion termost/src/api/input/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { prompt } from "enquirer";
import enquirer from "enquirer";

import type {
CreateInstruction,
Expand All @@ -9,6 +9,8 @@ import type {
ObjectLikeConstraint,
} from "../../types";

const { prompt } = enquirer;

export const createInput: CreateInstruction<
InputParameters<ObjectLikeConstraint, keyof ObjectLikeConstraint>
> = (parameters) => {
Expand Down

0 comments on commit 7b157f6

Please sign in to comment.