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

deployctl does not work with Deno 2.0 RC version #328

Open
magurotuna opened this issue Sep 5, 2024 · 5 comments
Open

deployctl does not work with Deno 2.0 RC version #328

magurotuna opened this issue Sep 5, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@magurotuna
Copy link
Member

We get type errors when we run deployctl with Deno 2.0 RC version:

error: TS2339 [ERROR]: Property 'isatty' does not exist on type 'typeof Deno'.
      Deno.isatty(stream.rid) &&
           ~~~~~~
    at file:///Users/runner/work/deployctl/deployctl/vendor/deno.land/x/[email protected]/is_interactive.ts:4:12

TS2339 [ERROR]: Property 'isatty' does not exist on type 'typeof Deno'.
  return Deno.isatty(stream.rid);
              ~~~~~~
    at file:///Users/runner/work/deployctl/deployctl/vendor/deno.land/x/[email protected]/is_interactive.ts:9:15

TS2339 [ERROR]: Property 'isatty' does not exist on type 'typeof Deno'.
  return Deno.isatty(stream.rid);
              ~~~~~~
    at file:///Users/runner/work/deployctl/deployctl/vendor/deno.land/x/[email protected]/is_interactive.ts:13:15

Found 3 errors.

https://github.com/denoland/deployctl/actions/runs/10715041741/job/29709772144?pr=313#step:8:205

@magurotuna magurotuna added the bug Something isn't working label Sep 5, 2024
@bartlomieju
Copy link
Member

You can just @ts-ignore these APIs, they are still there but they are "soft-deprecated".

@magurotuna
Copy link
Member Author

Thanks for the info, that should be a good fix for the moment, but we will need to move away from these deprecated APIs eventually, so I'm going to try to explore if the migration of deployctl to Deno 2.0 is easy

@bartlomieju
Copy link
Member

Sounds good - I bet these stream are Deno.stdout or Deno.stderr which now have isTerminal() method that does the same thing.

@magurotuna
Copy link
Member Author

It's actually a bit more complicated than it looks, because the use of the deprecated API is inside the dependency of dependency, which effectively is beyond our control - I think it's the best timing now to upgrade our dependencies as a whole. At first glance we can utilize stable version of std to achieve the same functionality. I'm checking it right now.

@lucacasonato
Copy link
Member

denoland/deno#25456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants