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 1.6.0 to 1.7.0

2

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

@@ -5,0 +5,0 @@ "main": "index.mjs",

@@ -167,3 +167,3 @@ # 🐚 zx

The [fs](https://nodejs.org/api/fs.html) package is available without importing
inside scripts. It is asyncronous by default.
inside scripts. It is asynchronous by default.

@@ -202,3 +202,3 @@ ```js

Default is the [shq](https://www.npmjs.com/package/shq) package.
Default is the [shq](https://www.npmjs.com/package/shq) package.

@@ -209,4 +209,4 @@ ### `$.verbose`

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

@@ -219,8 +219,11 @@ ### `__filename` & `__dirname`

### `require`
### `require()`
In [ESM](https://nodejs.org/api/modules.html#modules_module_createrequire_filename) `require` is not defined,
but sometimes it's convenient to have this legacy api in global.
In [ESM](https://nodejs.org/api/modules.html#modules_module_createrequire_filename)
modules, the `require()` function is not defined.
The `zx` provides `require()` function, so it can be used with imports in `.mjs`
files (when using `zx` executable).
```js
require('./version.js')
let {version} = require('./package.json')
```

@@ -245,5 +248,17 @@

### Passing array of values
If array of values passed as argument to `$`, items of the array will be escaped
individually and concatenated via space.
Example:
```js
let files = [...]
await $`tar cz ${files}`
```
### Executing remote scripts
If the argument to the `zx` executable starts with `https://`, the file will be downloaded and executed.
If the argument to the `zx` executable starts with `https://`, the file will be
downloaded and executed.

@@ -250,0 +265,0 @@ ```bash

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