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.10.1 to 1.11.0

2

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

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

@@ -57,4 +57,4 @@ # 🐚 zx

When using `zx` via the executable or a shebang, all of the functions
(`$`, `cd`, `fetch`, etc) are available straight away without any imports.
All functions (`$`, `cd`, `fetch`, etc) are available straight away
without any imports.

@@ -291,2 +291,33 @@ ### ``$`command` ``

### TypeScript scripts
The `zx` can compile `.ts` scripts to `.mjs` by running `tsc` (should be
installed on local machine).
```bash
zx examples/typescript.ts
```
In TypeScript file include the `zx` package to import types:
```ts
import 'zx'
```
Or reference the `zx` package via:
```js
/// <reference types="zx"/>
```
Example:
```ts
#!/usr/bin/env zx
import 'zx'
void async function () {
await $`ls -la`
}()
```
### Executing remote scripts

@@ -293,0 +324,0 @@

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