| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,7 @@ | |||
| 1 | 1 | #!/usr/bin/env pwsh | |
| 2 | 2 | ||
| 3 | + Set-StrictMode -Version 'Latest' | ||
| 4 | + | ||
| 3 | 5 | $NODE_EXE="$PSScriptRoot/node.exe" | |
| 4 | 6 | if (-not (Test-Path $NODE_EXE)) { | |
| 5 | 7 | $NODE_EXE="$PSScriptRoot/node" | |
@@ -27,7 +29,7 @@ if ($MyInvocation.ExpectingInput) { # takes pipeline input | |||
| 27 | 29 | } elseif (-not $MyInvocation.Line) { # used "-File" argument | |
| 28 | 30 | & $NODE_EXE $NPM_CLI_JS $args | |
| 29 | 31 | } else { # used "-Command" argument | |
| 30 | - if ($MyInvocation.Statement) { | ||
| 32 | + if (($MyInvocation | Get-Member -Name 'Statement') -and $MyInvocation.Statement) { | ||
| 31 | 33 | $NPM_ORIGINAL_COMMAND = $MyInvocation.Statement | |
| 32 | 34 | } else { | |
| 33 | 35 | $NPM_ORIGINAL_COMMAND = ( | |
@@ -38,9 +40,9 @@ if ($MyInvocation.ExpectingInput) { # takes pipeline input | |||
| 38 | 40 | $NODE_EXE = $NODE_EXE.Replace("``", "````") | |
| 39 | 41 | $NPM_CLI_JS = $NPM_CLI_JS.Replace("``", "````") | |
| 40 | 42 | ||
| 41 | - $NPM_NO_REDIRECTS_COMMAND = [Management.Automation.Language.Parser]::ParseInput($NPM_ORIGINAL_COMMAND, [ref] $null, [ref] $null). | ||
| 42 | - EndBlock.Statements.PipelineElements.CommandElements.Extent.Text -join ' ' | ||
| 43 | - $NPM_ARGS = $NPM_NO_REDIRECTS_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim() | ||
| 43 | + $NPM_COMMAND_ARRAY = [Management.Automation.Language.Parser]::ParseInput($NPM_ORIGINAL_COMMAND, [ref] $null, [ref] $null). | ||
| 44 | + EndBlock.Statements.PipelineElements.CommandElements.Extent.Text | ||
| 45 | + $NPM_ARGS = ($NPM_COMMAND_ARRAY | Select-Object -Skip 1) -join ' ' | ||
| 44 | 46 | ||
| 45 | 47 | Invoke-Expression "& `"$NODE_EXE`" `"$NPM_CLI_JS`" $NPM_ARGS" | |
| 46 | 48 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,7 @@ | |||
| 1 | 1 | #!/usr/bin/env pwsh | |
| 2 | 2 | ||
| 3 | + Set-StrictMode -Version 'Latest' | ||
| 4 | + | ||
| 3 | 5 | $NODE_EXE="$PSScriptRoot/node.exe" | |
| 4 | 6 | if (-not (Test-Path $NODE_EXE)) { | |
| 5 | 7 | $NODE_EXE="$PSScriptRoot/node" | |
@@ -27,7 +29,7 @@ if ($MyInvocation.ExpectingInput) { # takes pipeline input | |||
| 27 | 29 | } elseif (-not $MyInvocation.Line) { # used "-File" argument | |
| 28 | 30 | & $NODE_EXE $NPX_CLI_JS $args | |
| 29 | 31 | } else { # used "-Command" argument | |
| 30 | - if ($MyInvocation.Statement) { | ||
| 32 | + if (($MyInvocation | Get-Member -Name 'Statement') -and $MyInvocation.Statement) { | ||
| 31 | 33 | $NPX_ORIGINAL_COMMAND = $MyInvocation.Statement | |
| 32 | 34 | } else { | |
| 33 | 35 | $NPX_ORIGINAL_COMMAND = ( | |
@@ -38,9 +40,9 @@ if ($MyInvocation.ExpectingInput) { # takes pipeline input | |||
| 38 | 40 | $NODE_EXE = $NODE_EXE.Replace("``", "````") | |
| 39 | 41 | $NPX_CLI_JS = $NPX_CLI_JS.Replace("``", "````") | |
| 40 | 42 | ||
| 41 | - $NPX_NO_REDIRECTS_COMMAND = [Management.Automation.Language.Parser]::ParseInput($NPX_ORIGINAL_COMMAND, [ref] $null, [ref] $null). | ||
| 42 | - EndBlock.Statements.PipelineElements.CommandElements.Extent.Text -join ' ' | ||
| 43 | - $NPX_ARGS = $NPX_NO_REDIRECTS_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim() | ||
| 43 | + $NPX_COMMAND_ARRAY = [Management.Automation.Language.Parser]::ParseInput($NPX_ORIGINAL_COMMAND, [ref] $null, [ref] $null). | ||
| 44 | + EndBlock.Statements.PipelineElements.CommandElements.Extent.Text | ||
| 45 | + $NPX_ARGS = ($NPX_COMMAND_ARRAY | Select-Object -Skip 1) -join ' ' | ||
| 44 | 46 | ||
| 45 | 47 | Invoke-Expression "& `"$NODE_EXE`" `"$NPX_CLI_JS`" $NPX_ARGS" | |
| 46 | 48 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For | |||
| 27 | 27 | example, running `npm ls promzard` in npm's source tree will show: | |
| 28 | 28 | ||
| 29 | 29 | ```bash | |
| 30 | - npm@10.9.3 /path/to/npm | ||
| 30 | + npm@10.9.4 /path/to/npm | ||
| 31 | 31 | └─┬ init-package-json@0.0.4 | |
| 32 | 32 | └── promzard@0.1.5 | |
| 33 | 33 | ``` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces. | |||
| 14 | 14 | ||
| 15 | 15 | ### Version | |
| 16 | 16 | ||
| 17 | - 10.9.3 | ||
| 17 | + 10.9.4 | ||
| 18 | 18 | ||
| 19 | 19 | ### Description | |
| 20 | 20 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,9 +141,9 @@ | |||
| 141 | 141 | ||
| 142 | 142 | <section id="content"> | |
| 143 | 143 | <header class="title"> | |
| 144 | - <h1 id="----npm-access----1093"> | ||
| 144 | + <h1 id="----npm-access----1094"> | ||
| 145 | 145 | <span>npm-access</span> | |
| 146 | - <span class="version">@10.9.3</span> | ||
| 146 | + <span class="version">@10.9.4</span> | ||
| 147 | 147 | </h1> | |
| 148 | 148 | <span class="description">Set access level on published packages</span> | |
| 149 | 149 | </header> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,9 +141,9 @@ | |||
| 141 | 141 | ||
| 142 | 142 | <section id="content"> | |
| 143 | 143 | <header class="title"> | |
| 144 | - <h1 id="----npm-adduser----1093"> | ||
| 144 | + <h1 id="----npm-adduser----1094"> | ||
| 145 | 145 | <span>npm-adduser</span> | |
| 146 | - <span class="version">@10.9.3</span> | ||
| 146 | + <span class="version">@10.9.4</span> | ||
| 147 | 147 | </h1> | |
| 148 | 148 | <span class="description">Add a registry user account</span> | |
| 149 | 149 | </header> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,9 +141,9 @@ | |||
| 141 | 141 | ||
| 142 | 142 | <section id="content"> | |
| 143 | 143 | <header class="title"> | |
| 144 | - <h1 id="----npm-audit----1093"> | ||
| 144 | + <h1 id="----npm-audit----1094"> | ||
| 145 | 145 | <span>npm-audit</span> | |
| 146 | - <span class="version">@10.9.3</span> | ||
| 146 | + <span class="version">@10.9.4</span> | ||
| 147 | 147 | </h1> | |
| 148 | 148 | <span class="description">Run a security audit</span> | |
| 149 | 149 | </header> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,9 +141,9 @@ | |||
| 141 | 141 | ||
| 142 | 142 | <section id="content"> | |
| 143 | 143 | <header class="title"> | |
| 144 | - <h1 id="----npm-bugs----1093"> | ||
| 144 | + <h1 id="----npm-bugs----1094"> | ||
| 145 | 145 | <span>npm-bugs</span> | |
| 146 | - <span class="version">@10.9.3</span> | ||
| 146 | + <span class="version">@10.9.4</span> | ||
| 147 | 147 | </h1> | |
| 148 | 148 | <span class="description">Report bugs for a package in a web browser</span> | |
| 149 | 149 | </header> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,9 +141,9 @@ | |||
| 141 | 141 | ||
| 142 | 142 | <section id="content"> | |
| 143 | 143 | <header class="title"> | |
| 144 | - <h1 id="----npm-cache----1093"> | ||
| 144 | + <h1 id="----npm-cache----1094"> | ||
| 145 | 145 | <span>npm-cache</span> | |
| 146 | - <span class="version">@10.9.3</span> | ||
| 146 | + <span class="version">@10.9.4</span> | ||
| 147 | 147 | </h1> | |
| 148 | 148 | <span class="description">Manipulates packages cache</span> | |
| 149 | 149 | </header> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -141,9 +141,9 @@ | |||
| 141 | 141 | ||
| 142 | 142 | <section id="content"> | |
| 143 | 143 | <header class="title"> | |
| 144 | - <h1 id="----npm-ci----1093"> | ||
| 144 | + <h1 id="----npm-ci----1094"> | ||
| 145 | 145 | <span>npm-ci</span> | |
| 146 | - <span class="version">@10.9.3</span> | ||
| 146 | + <span class="version">@10.9.4</span> | ||
| 147 | 147 | </h1> | |
| 148 | 148 | <span class="description">Clean install a project</span> | |
| 149 | 149 | </header> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments