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

feat: add shim for Deno.consoleSize() #165

Merged
merged 1 commit into from
Jan 28, 2024

Conversation

jonbcard
Copy link
Contributor

@jonbcard jonbcard commented Jan 7, 2024

Add shim for Deno.consoleSize()
https://deno.land/api@v1.39.0?s=Deno.consoleSize

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

///<reference path="../lib.deno.d.ts" />

export const consoleSize: typeof Deno.consoleSize = function consoleSize() {
const { columns, rows } = process.stdout;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just did some testing and these will be undefined when stdout is piped. I'll update this PR to do what we do with consoleSize in Deno.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I'll merge and open a new PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh! Good catch. Thanks!!

@dsherret dsherret merged commit e17e72c into denoland:main Jan 28, 2024
4 checks passed
@jonbcard jonbcard deleted the feat-console-size branch January 28, 2024 19:01
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

Successfully merging this pull request may close these issues.

3 participants