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

zx

Package Overview
Dependencies
Maintainers
2
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zx - npm Package Compare versions

Comparing version 1.7.0 to 1.7.3

9

index.d.ts

@@ -16,3 +16,3 @@ // Copyright 2021 Google LLC

interface $ {
(pieces: TemplateStringsArray, ...args: string[]): Promise<ProcessOutput>
(pieces: TemplateStringsArray, ...args: any[]): Promise<ProcessOutput>
verbose: boolean

@@ -27,10 +27,9 @@ shell: string

export function cd(path: string)
export function cd(path: string): void
type QuestionOptions = { choices: string[] }
export function question(query?: string, options?: QuestionOptions): Promise<string>
export type QuestionOptions = { choices: string[] }
export function sleep(ms: number): Promise<void>
export function question(query?: string, options?: QuestionOptions): Promise<string>
export class ProcessOutput {

@@ -37,0 +36,0 @@ readonly exitCode: number

{
"name": "zx",
"version": "1.7.0",
"version": "1.7.3",
"description": "A tool for writing better scripts",

@@ -20,3 +20,2 @@ "main": "index.mjs",

"shq": "^1.0.2",
"uuid": "^8.3.2",
"which": "^2.0.2"

@@ -23,0 +22,0 @@ },

@@ -126,12 +126,6 @@ # 🐚 zx

```ts
type QuestionOptions = { choices: string[] }
function question(query?: string, options?: QuestionOptions): Promise<string>
```
Usage:
```js
let username = await question('What is your username? ')
let bear = await question('What kind of bear is best? ')
let token = await question('Choose env variable: ', {

@@ -142,2 +136,9 @@ choices: Object.keys(process.env)

In second argument, array of choices for Tab autocompletion can be specified.
```ts
function question(query?: string, options?: QuestionOptions): Promise<string>
type QuestionOptions = { choices: string[] }
```
### `sleep()`

@@ -209,4 +210,4 @@

In verbose mode, the `zx` prints all executed commands alongside with their outputs.
This is the same as using `set -x` in Bash.
In verbose mode, the `zx` prints all executed commands alongside with their
outputs.

@@ -213,0 +214,0 @@ ### `__filename` & `__dirname`

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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