Comparing version 4.3.0 to 5.0.0
@@ -21,3 +21,4 @@ // Copyright 2021 Google LLC | ||
import * as _path from 'path' | ||
import * as _chalk from 'chalk' | ||
import {ChalkInstance} from 'chalk' | ||
import * as _yaml from 'yaml' | ||
import _fetch from 'node-fetch' | ||
@@ -65,4 +66,5 @@ import {ParsedArgs} from 'minimist' | ||
export const cd: cd | ||
export const chalk: typeof _chalk | ||
export const chalk: ChalkInstance | ||
export const fetch: typeof _fetch | ||
export const YAML: typeof _yaml | ||
export const fs: typeof _fs | ||
@@ -69,0 +71,0 @@ export const glob: typeof _globby.globby & typeof _globby |
{ | ||
"name": "zx", | ||
"version": "4.3.0", | ||
"description": "A tool for writing better scripts", | ||
"main": "./dist/index.cjs", | ||
"version": "5.0.0", | ||
"description": "A tool for writing better scripts.", | ||
"main": "./index.mjs", | ||
"exports": { | ||
".": { | ||
"import": "./index.mjs", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"./globals": { | ||
"import": "./globals.mjs", | ||
"require": "./dist/globals.cjs" | ||
} | ||
".": "./index.mjs", | ||
"./globals": "./globals.mjs" | ||
}, | ||
@@ -21,26 +15,21 @@ "types": "index.d.ts", | ||
"engines": { | ||
"node": ">= 14.13.1" | ||
"node": ">= 16.0.0" | ||
}, | ||
"scripts": { | ||
"test": "node zx.mjs test.mjs", | ||
"build": "node zx.mjs .github/scripts/build.mjs" | ||
"test": "node zx.mjs test.mjs" | ||
}, | ||
"dependencies": { | ||
"@types/fs-extra": "^9.0.12", | ||
"@types/fs-extra": "^9.0.13", | ||
"@types/minimist": "^1.2.2", | ||
"@types/node": "^16.6", | ||
"@types/node-fetch": "^2.5.12", | ||
"chalk": "^4.1.2", | ||
"@types/node": "^17.0", | ||
"@types/node-fetch": "^3.0.2", | ||
"chalk": "^5.0.0", | ||
"fs-extra": "^10.0.0", | ||
"globby": "^12.0.1", | ||
"globby": "^13.1.1", | ||
"minimist": "^1.2.5", | ||
"node-fetch": "^2.6.1", | ||
"node-fetch": "^3.2.0", | ||
"ps-tree": "^1.2.0", | ||
"which": "^2.0.2" | ||
"which": "^2.0.2", | ||
"yaml": "^1.10.2" | ||
}, | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^20.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.4", | ||
"rollup": "^2.56.3" | ||
}, | ||
"publishConfig": { | ||
@@ -51,4 +40,3 @@ "registry": "https://wombat-dressing-room.appspot.com" | ||
"*.mjs", | ||
"*.d.ts", | ||
"dist" | ||
"*.d.ts" | ||
], | ||
@@ -55,0 +43,0 @@ "repository": "google/zx", |
@@ -34,6 +34,4 @@ # 🐚 zx | ||
### Requirement | ||
**Requirement**: Node version >= 16.0.0 | ||
Node.js >= 14.13.1 | ||
## Documentation | ||
@@ -237,2 +235,10 @@ | ||
#### `yaml` package | ||
The [yaml](https://www.npmjs.com/package/yaml) package. | ||
```js | ||
console.log(YAML.parse('foo: bar').foo) | ||
``` | ||
#### `fs` package | ||
@@ -394,8 +400,28 @@ | ||
Compile the TypeScript to JS and run it. Or use something like ts-node. | ||
Use [ts-node](https://github.com/TypeStrong/ts-node#native-ecmascript-modules) as | ||
a esm node [loader](https://nodejs.org/api/esm.html#esm_experimental_loaders). | ||
```bash | ||
ts-node script.ts | ||
node --loader ts-node/esm script.ts | ||
``` | ||
You must set [`"type": "module"`](https://nodejs.org/api/packages.html#packages_type) | ||
in `package.json` and [`"module": "ESNext"`](https://www.typescriptlang.org/tsconfig/#module) | ||
in `tsconfig.json`. | ||
```json | ||
{ | ||
"type": "module" | ||
} | ||
``` | ||
```json | ||
{ | ||
"compilerOptions": { | ||
"module": "ESNext" | ||
} | ||
} | ||
``` | ||
#### Executing remote scripts | ||
@@ -402,0 +428,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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 7 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
452
10
4
44365
12
9
807
+ Addedyaml@^1.10.2
+ Added@types/node@17.0.45(transitive)
+ Added@types/node-fetch@3.0.3(transitive)
+ Addedchalk@5.3.0(transitive)
+ Addeddata-uri-to-buffer@4.0.1(transitive)
+ Addedfetch-blob@3.2.0(transitive)
+ Addedformdata-polyfill@4.0.10(transitive)
+ Addedglobby@13.2.2(transitive)
+ Addednode-domexception@1.0.0(transitive)
+ Addednode-fetch@3.3.2(transitive)
+ Addedweb-streams-polyfill@3.3.3(transitive)
+ Addedyaml@1.10.2(transitive)
- Removed@types/node@16.18.119(transitive)
- Removed@types/node-fetch@2.6.12(transitive)
- Removedansi-styles@4.3.0(transitive)
- Removedarray-union@3.0.1(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedchalk@4.1.2(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedform-data@4.0.1(transitive)
- Removedglobby@12.2.0(transitive)
- Removedhas-flag@4.0.0(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedsupports-color@7.2.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
Updated@types/fs-extra@^9.0.13
Updated@types/node@^17.0
Updated@types/node-fetch@^3.0.2
Updatedchalk@^5.0.0
Updatedglobby@^13.1.1
Updatednode-fetch@^3.2.0