-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
330426c
commit bfaf2ff
Showing
11 changed files
with
454 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Contribution Guide | ||
|
||
zx is a fully [open-source project](https://github.com/google/zx), which is developing by the community for the community. | ||
We welcome contributions of any kind, including but not limited to: | ||
* Bug reports | ||
* Feature requests | ||
* Code contributions | ||
* Documentation improvements | ||
* Discussions | ||
|
||
## Community Guidelines | ||
|
||
This project follows [Google's Open Source Community Guidelines](https://opensource.google/conduct/). | ||
In short: all contributors are treated with respect and fairness. | ||
|
||
## Contributor License Agreement | ||
|
||
Contributions to this project must be accompanied by a Contributor License | ||
Agreement. You (or your employer) retain the copyright to your contribution; | ||
this simply gives us permission to use and redistribute your contributions as | ||
part of the project. Head over to <https://cla.developers.google.com/> to see | ||
your current agreements on file or to sign a new one. | ||
|
||
You generally only need to submit a CLA once, so if you've already submitted one | ||
(even if it was for a different project), you probably don't need to do it | ||
again. | ||
|
||
## How to Contribute | ||
Before proposing changes, look for similar ones in the project's [issues](https://github.com/google/zx/issues) and [pull requests](https://github.com/google/zx/pulls). If you can't decide, create a new [discussion](https://github.com/google/zx/discussions) topic, and we will help you figure it out. When ready to move on: | ||
* Prepare your development environment. | ||
* Ensure you have Node.js 20+ installed. | ||
* Bash is essential for running zx scripts. Linux and macOS users usually have it installed by default. Consider using [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install) or [Git Bash](https://git-scm.com/downloads) if you are on Windows. | ||
* Fork [the repository](https://github.com/google/zx). | ||
* Create a new branch. | ||
* Make your changes. | ||
* If you are adding a new feature, please include additional tests. The coverage threshold is 98%. | ||
* Create a [conventional-commits](https://www.conventionalcommits.org/en/v1.0.0/) compliant messages. | ||
* Ensure that everything is working: | ||
* `npm run fmt` to format your code. | ||
* `npm run cov` to run the tests. | ||
* Push the changes to your fork. | ||
* Create a pull request. | ||
* Describe your changes in detail. | ||
* Reference any related issues if applicable. | ||
|
||
## Code Reviews | ||
|
||
All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests. | ||
|
||
## License | ||
|
||
The project is licensed under the [Apache-2.0](https://github.com/google/zx?tab=Apache-2.0-1-ov-file#readme) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Migration from v7 to v8 | ||
|
||
[v8.0.0 release](https://github.com/google/zx/releases/tag/8.0.0) brought many features, improvements and fixes, but also has introduced a few breaking changes. | ||
|
||
1. `$.verbose` is set to `false` by default, but errors are still printed to `stderr`. Set `$.quiet = true` to suppress any output. | ||
```js | ||
$.verbose = true // everything works like in v7 | ||
|
||
$.quiet = true // to completely turn off logging | ||
``` | ||
|
||
2. `ssh` API was dropped. Install [webpod](https://github.com/webpod/webpod) package instead. | ||
```js | ||
// import {ssh} from 'zx' ↓ | ||
import {ssh} from 'webpod' | ||
|
||
const remote = ssh('user@host') | ||
await remote`echo foo` | ||
``` | ||
|
||
3. zx is not looking for `PowerShell` anymore, on Windows by default. If you still need it, use the `usePowerShell` helper to enable: | ||
|
||
```js | ||
import { usePowerShell, useBash } from 'zx' | ||
|
||
usePowerShell() // to enable powershell | ||
useBash() // switch to bash, the default | ||
``` | ||
|
||
To look for modern [PowerShell v7+](https://github.com/google/zx/pull/790), invoke `usePwsh()` helper instead: | ||
|
||
```js | ||
import { usePwsh } from 'zx' | ||
|
||
usePwsh() | ||
``` | ||
|
||
4. Process cwd synchronization between `$` invocations is now disabled by default. This functionality is provided via an async hook and can now be controlled directly. | ||
|
||
```js | ||
import { syncProcessCwd } from 'zx' | ||
|
||
syncProcessCwd() // restores legacy v7 behavior | ||
``` |
Oops, something went wrong.