Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

term-size

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

term-size - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

11

index.js

@@ -6,7 +6,10 @@ import process from 'node:process';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const exec = (command, arguments_, shell) =>
execFileSync(command, arguments_, {encoding: 'utf8', shell, stdio: ['ignore', 'pipe', 'ignore']}).trim();
function execNative(command, shell) {
const __dirname = path.dirname(fileURLToPath(import.meta.url));
return exec(path.join(__dirname, command), [], shell).split(/\r?\n/);
}
const create = (columns, rows) => ({

@@ -36,3 +39,3 @@ columns: Number.parseInt(columns, 10),

// Binary: https://github.com/sindresorhus/win-term-size
const size = exec(path.join(__dirname, 'vendor/windows/term-size.exe')).split(/\r?\n/);
const size = execNative('vendor/windows/term-size.exe', false);

@@ -47,3 +50,3 @@ if (size.length === 2) {

// Binary: https://github.com/sindresorhus/macos-term-size
const size = exec(path.join(__dirname, 'vendor/macos/term-size'), [], true).split(/\r?\n/);
const size = execNative('vendor/macos/term-size', true);

@@ -50,0 +53,0 @@ if (size.length === 2) {

{
"name": "term-size",
"version": "3.0.1",
"version": "3.0.2",
"description": "Reliably get the terminal window size (columns & rows)",

@@ -5,0 +5,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc