Socket
Socket
Sign inDemoInstall

zx

Package Overview
Dependencies
Maintainers
2
Versions
146
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 3.0.0 to 3.1.0

2

index.d.ts

@@ -66,2 +66,3 @@ // Copyright 2021 Google LLC

export const globby: typeof _globby.globby & typeof _globby
export const glob: typeof _globby.globby & typeof _globby
export const nothrow: nothrow

@@ -81,2 +82,3 @@ export const os: typeof _os

var globby: typeof _globby.globby & typeof _globby
var glob: typeof _globby.globby & typeof _globby
var nothrow: nothrow

@@ -83,0 +85,0 @@ var os: typeof _os

14

package.json
{
"name": "zx",
"version": "3.0.0",
"version": "3.1.0",
"description": "A tool for writing better scripts",

@@ -17,9 +17,9 @@ "main": "index.mjs",

"dependencies": {
"@types/fs-extra": "^9.0.11",
"@types/minimist": "^1.2.1",
"@types/node": "^16.0",
"@types/node-fetch": "^2.5.10",
"chalk": "^4.1.1",
"@types/fs-extra": "^9.0.12",
"@types/minimist": "^1.2.2",
"@types/node": "^16.6",
"@types/node-fetch": "^2.5.12",
"chalk": "^4.1.2",
"fs-extra": "^10.0.0",
"globby": "^12.0.0",
"globby": "^12.0.1",
"minimist": "^1.2.5",

@@ -26,0 +26,0 @@ "node-fetch": "^2.6.1",

@@ -69,14 +69,21 @@ # 🐚 zx

Everything passed through `${...}` will be automatically escaped and quoted.
```js
let count = parseInt(await $`ls -1 | wc -l`)
console.log(`Files count: ${count}`)
let name = 'foo & bar'
await $`mkdir ${name}`
```
For example, to upload files in parallel:
**There is no need to add extra quotes.** Read more about it in
[quotes](docs/quotes.md).
You can pass an array of arguments if needed:
```js
let hosts = [...]
await Promise.all(hosts.map(host =>
$`rsync -azP ./src ${host}:/var/www`
))
let flags = [
'--oneline',
'--decorate',
'--color',
]
await $`git log ${flags}`
```

@@ -114,3 +121,3 @@

Read more about [pipelines](examples/pipelines.md).
Read more about [pipelines](docs/pipelines.md).

@@ -242,2 +249,8 @@ #### `ProcessOutput`

Also, globby available via the `glob` shortcut:
```js
await $`svgo ${await glob('*.svg')}`
```
#### `os` package

@@ -349,6 +362,6 @@

The `zx` can execute scripts written in markdown
([examples/markdown.md](examples/markdown.md)):
([docs/markdown.md](docs/markdown.md)):
```bash
zx examples/markdown.md
zx docs/markdown.md
```

@@ -395,2 +408,16 @@

```bash
zx https://medv.io/game-of-life.mjs
```
#### Executing scripts from stdin
The `zx` supports executing scripts from stdin.
```js
zx <<'EOF'
await $`pwd`
EOF
```
## License

@@ -397,0 +424,0 @@

Sorry, the diff of this file is not supported yet

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