From 9275856eb75e7c394a3c7617c2b495aba35ee2de Mon Sep 17 00:00:00 2001 From: Wassim Chegham <1699357+manekinekko@users.noreply.github.com> Date: Wed, 16 Feb 2022 23:00:50 +0100 Subject: [PATCH] docs: update usage example for npm pkg (#4424) Add example for setting array values Fixes #4320 --- lib/commands/pkg.js | 2 ++ tap-snapshots/test/lib/load-all-commands.js.test.cjs | 2 ++ tap-snapshots/test/lib/utils/npm-usage.js.test.cjs | 2 ++ 3 files changed, 6 insertions(+) diff --git a/lib/commands/pkg.js b/lib/commands/pkg.js index 007932429d661..6ca892293cebe 100644 --- a/lib/commands/pkg.js +++ b/lib/commands/pkg.js @@ -9,6 +9,8 @@ class Pkg extends BaseCommand { 'set = [= ...]', 'get [ [ ...]]', 'delete [ ...]', + 'set [[].= ...]', + 'set [[].= ...]', ] static params = [ diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs index c9da1e23671ea..d84cdfb305e90 100644 --- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs +++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs @@ -690,6 +690,8 @@ Usage: npm pkg set = [= ...] npm pkg get [ [ ...]] npm pkg delete [ ...] +npm pkg set [[].= ...] +npm pkg set [[].= ...] Options: [-f|--force] [--json] diff --git a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs index f91f2b11d3533..42c24fabdfd61 100644 --- a/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs +++ b/tap-snapshots/test/lib/utils/npm-usage.js.test.cjs @@ -773,6 +773,8 @@ All commands: npm pkg set = [= ...] npm pkg get [ [ ...]] npm pkg delete [ ...] + npm pkg set [[].= ...] + npm pkg set [[].= ...] Options: [-f|--force] [--json]