Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Multi)Select behaves as input in the Deno #250

Open
vikiival opened this issue Oct 19, 2023 · 1 comment
Open

(Multi)Select behaves as input in the Deno #250

vikiival opened this issue Oct 19, 2023 · 1 comment

Comments

@vikiival
Copy link

vikiival commented Oct 19, 2023

Environment

deno 1.37.2 (release, aarch64-apple-darwin)
v8 11.8.172.13
typescript 5.2.2

import { consola } from 'https://esm.sh/consola@3.2.3'

Reproduction

https://replit.com/@vikiival/consola-promt

MVP:

import { consola } from 'https://esm.sh/consola@3.2.3'

const projectType = await consola.prompt("Pick a project type.", {
  type: "select",
  options: [
    "TypeScript",
    "TypeScript",
    { label: "CoffeeScript", value: "CoffeeScript", hint: "oh no" },
  ],
});

consola.info("You picked", projectType);
deno run -A main.ts

Describe the bug

I was trying to run a simple example of consola.prompt in Deno with the option of select and it returns the default prompt type.

Additional context

No response

Logs

Pick a project type. dasda
info You picked dasda
@peterroe
Copy link
Contributor

It seem: consola.prompt is not fully compatible with deno. Because prompt is used net.Socket.prototype.constructor internally, And deno hasn't achieve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants