diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2024-04-25 13:03:23 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-25 13:03:23 +0900 |
| commit | b1cf65187047a83e27a0847bd565dcf28b5be465 (patch) | |
| tree | 7b030df0ab82b6a90463902c337341a3325e6305 /src/_node | |
| parent | Merge pull request #1080 from hydrargyrum/rdfind (diff) | |
| parent | Update node completion to version v22.0.0 (diff) | |
| download | zsh-completions-b1cf65187047a83e27a0847bd565dcf28b5be465.tar zsh-completions-b1cf65187047a83e27a0847bd565dcf28b5be465.tar.gz zsh-completions-b1cf65187047a83e27a0847bd565dcf28b5be465.tar.bz2 zsh-completions-b1cf65187047a83e27a0847bd565dcf28b5be465.tar.lz zsh-completions-b1cf65187047a83e27a0847bd565dcf28b5be465.tar.xz zsh-completions-b1cf65187047a83e27a0847bd565dcf28b5be465.tar.zst zsh-completions-b1cf65187047a83e27a0847bd565dcf28b5be465.zip | |
Merge pull request #1081 from zsh-users/update-node
Update node completion to version v22.0.0
Diffstat (limited to 'src/_node')
| -rw-r--r-- | src/_node | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -28,7 +28,7 @@ # Description # ----------- # -# Completion script for Node.js v21.3.0 (https://nodejs.org) +# Completion script for Node.js v22.0.0 (https://nodejs.org) # # ------------------------------------------------------------------------------ # Authors @@ -61,6 +61,14 @@ _node_args() { _node_files } +_node_scripts() { + local -a scripts=() + if (( $+commands[jq] )) && [[ -e package.json ]]; then + scripts=(${(@f)"$(jq -r '.scripts | keys[]' package.json | sed 's/:/\\:/g')"}) + fi + _describe 'scripts' scripts +} + local curcontext="$curcontext" state line ret=1 typeset -A opt_args @@ -145,21 +153,25 @@ _arguments -C \ '--redirect-warnings=[write warnings to file instead of stderr]: :_files' \ '--report-compact[output compact single-line JSON]' \ '--report-directory=[custom report path]: :_files -/' \ + '--report-exclude-network[exclude network interface diagnostics(default: false)]' \ '--report-filename=[custom report file name]: :_files' \ '--report-on-fatalerror[generate diagnostic report on fatal (internal) errors]' \ '--report-on-signal=[generate diagnostic report upon receiving signals]' \ '--report-signal=[causes diagnostic report to be produced on provided signal]:signals:_signals -s' \ '--report-uncaught-exception[generate diagnostic report on uncaught exceptions]' \ + '--run=[run a script specified in package.json]:script:_node_scripts' \ '--secure-heap=[total size of the OpenSSL secure heap]: :number' \ '--secure-heap-min=[minimum allocation size from the OpenSSL secure heap]' \ '--snapshot-blob=[path to the snapshot blob that is used to restore the application state]:snapshot:_files' \ '--test[launch test runner on startup]' \ '--test-concurrency=[specify test runner concurrency]:concurrency' \ + '--test-force-exit[force test runner to exit upon completion]' \ '--test-name-pattern=[run tests whose name matches this regular expression]:pattern' \ '--test-only[run tests with "only" option set]' \ '*--test-reporter=[report test output using the given reporter]:reporter:(tap spec dot)' \ '*--test-reporter-destination=[report given reporter to the given destination]:destination:_files' \ '--test-shard=[run test at specific shard]:shard' \ + '--test-timeout=[specify test runner timeout]' \ '--throw-deprecation[throw an exception on deprecations]' \ '--title=[the process title to use on startup]:process title' \ '--tls-cipher-list=[use an alternative default TLS cipher list]:cipher list string' \ |
