Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency zx to v8.3.0 #1776

Merged
merged 1 commit into from
Dec 24, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 24, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
zx (source) 8.2.4 -> 8.3.0 age adoption passing confidence

Release Notes

google/zx (zx)

v8.3.0: – Pipes of Steel

Compare Source

A few weeks ago zx took a part in OSS Library Night 🎉
Many thanks to the organizers and contributors who have boosted the project with their pull requests!

Today we are releasing the zx with a huge bunch of new features and improvements.

Features

API
  • Implemented [Symbol.asyncIterator] API for ProcessPromise #​984 #​998 #​1000
    Now you can iterate over the process output using for await loop from any point of the process execution.
const process = $`sleep 0.1; echo Chunk1; sleep 0.1; echo Chunk2; sleep 0.2; echo Chunk3; sleep 0.1; echo Chunk4;`
const chunks = []

await new Promise((resolve) => setTimeout(resolve, 250))
for await (const chunk of process) {
  chunks.push(chunk)
}

chunks.length //  4
chunks[0]     // 'Chunk1'
chunks[3]     // 'Chunk4'
  • zx version is available via JS API #​986
import { version } from 'zx'
const [major] = (version || '').split('.').map(Number)
if (major < 6)
  throw new Error('zx >= 6 is required')
Pipes
  • Enabled stream picking for pipe() #​1023
const p = $`echo foo >&2; echo bar`
const o1 = (await p.pipe.stderr`cat`).toString()
const o2 = (await p.pipe.stdout`cat`).toString()

assert.equal(o1, 'foo\n')  // <- piped from stderr
assert.equal(o2, 'bar\n')  // <- stdout
  • Added signal handling on piping #​992
const ac = new AbortController()
const { signal } = ac
const p = $({ signal, nothrow: true })`echo test`.pipe`sleep 999`
setTimeout(() => ac.abort(), 50)

try {
  await p
} catch ({ message }) {
  message // The operation was aborted
}
  • Added direct piping to file shortcut #​1001
// before
await $`echo "Hello, stdout!"`.pipe(fs.createWriteStream('/tmp/output.txt'))

// after
await $`echo "Hello, stdout!"`.pipe('/tmp/output.txt')
CLI
  • Provided $.defaults setting via ZX_-prefixed environment variables #​988 #​998
ZX_VERBOSE=true ZX_SHELL='/bin/bash' zx script.mjs
zx --env=/path/to/some.env script
  • Landed installation registry customization #​994
zx --insrall --registry=https://registry.yarnpkg.com script.mjs

Fixes

Docs

Chores

Merry Christmas! 🎄🎅🎁


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.40%. Comparing base (e079563) to head (d0c1d89).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1776   +/-   ##
=========================================
  Coverage     94.40%   94.40%           
  Complexity       16       16           
=========================================
  Files            18       18           
  Lines          4555     4555           
  Branches        844      844           
=========================================
  Hits           4300     4300           
  Misses          245      245           
  Partials         10       10           
Flag Coverage Δ
apex-ast-serializer 39.69% <ø> (ø)
prettier-plugin-apex 98.60% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@renovate renovate bot merged commit 2ccfabc into master Dec 24, 2024
30 checks passed
@renovate renovate bot deleted the renovate/zx-8.x branch December 24, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants