Comparing version 1.7.0 to 1.7.3
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27945
4
270
360
- Removeduuid@^8.3.2
- Removeduuid@8.3.2(transitive)