Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions deps/npm/bin/npm.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env pwsh

Set-StrictMode -Version 'Latest'

$NODE_EXE="$PSScriptRoot/node.exe"
if (-not (Test-Path $NODE_EXE)) {
$NODE_EXE="$PSScriptRoot/node"
Expand Down Expand Up @@ -27,7 +29,7 @@ if ($MyInvocation.ExpectingInput) { # takes pipeline input
} elseif (-not $MyInvocation.Line) { # used "-File" argument
& $NODE_EXE $NPM_CLI_JS $args
} else { # used "-Command" argument
if ($MyInvocation.Statement) {
if (($MyInvocation | Get-Member -Name 'Statement') -and $MyInvocation.Statement) {
$NPM_ORIGINAL_COMMAND = $MyInvocation.Statement
} else {
$NPM_ORIGINAL_COMMAND = (
Expand All @@ -38,9 +40,9 @@ if ($MyInvocation.ExpectingInput) { # takes pipeline input
$NODE_EXE = $NODE_EXE.Replace("``", "````")
$NPM_CLI_JS = $NPM_CLI_JS.Replace("``", "````")

$NPM_NO_REDIRECTS_COMMAND = [Management.Automation.Language.Parser]::ParseInput($NPM_ORIGINAL_COMMAND, [ref] $null, [ref] $null).
EndBlock.Statements.PipelineElements.CommandElements.Extent.Text -join ' '
$NPM_ARGS = $NPM_NO_REDIRECTS_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim()
$NPM_COMMAND_ARRAY = [Management.Automation.Language.Parser]::ParseInput($NPM_ORIGINAL_COMMAND, [ref] $null, [ref] $null).
EndBlock.Statements.PipelineElements.CommandElements.Extent.Text
$NPM_ARGS = ($NPM_COMMAND_ARRAY | Select-Object -Skip 1) -join ' '

Invoke-Expression "& `"$NODE_EXE`" `"$NPM_CLI_JS`" $NPM_ARGS"
}
Expand Down
10 changes: 6 additions & 4 deletions deps/npm/bin/npx.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env pwsh

Set-StrictMode -Version 'Latest'

$NODE_EXE="$PSScriptRoot/node.exe"
if (-not (Test-Path $NODE_EXE)) {
$NODE_EXE="$PSScriptRoot/node"
Expand Down Expand Up @@ -27,7 +29,7 @@ if ($MyInvocation.ExpectingInput) { # takes pipeline input
} elseif (-not $MyInvocation.Line) { # used "-File" argument
& $NODE_EXE $NPX_CLI_JS $args
} else { # used "-Command" argument
if ($MyInvocation.Statement) {
if (($MyInvocation | Get-Member -Name 'Statement') -and $MyInvocation.Statement) {
$NPX_ORIGINAL_COMMAND = $MyInvocation.Statement
} else {
$NPX_ORIGINAL_COMMAND = (
Expand All @@ -38,9 +40,9 @@ if ($MyInvocation.ExpectingInput) { # takes pipeline input
$NODE_EXE = $NODE_EXE.Replace("``", "````")
$NPX_CLI_JS = $NPX_CLI_JS.Replace("``", "````")

$NPX_NO_REDIRECTS_COMMAND = [Management.Automation.Language.Parser]::ParseInput($NPX_ORIGINAL_COMMAND, [ref] $null, [ref] $null).
EndBlock.Statements.PipelineElements.CommandElements.Extent.Text -join ' '
$NPX_ARGS = $NPX_NO_REDIRECTS_COMMAND.Substring($MyInvocation.InvocationName.Length).Trim()
$NPX_COMMAND_ARRAY = [Management.Automation.Language.Parser]::ParseInput($NPX_ORIGINAL_COMMAND, [ref] $null, [ref] $null).
EndBlock.Statements.PipelineElements.CommandElements.Extent.Text
$NPX_ARGS = ($NPX_COMMAND_ARRAY | Select-Object -Skip 1) -join ' '

Invoke-Expression "& `"$NODE_EXE`" `"$NPX_CLI_JS`" $NPX_ARGS"
}
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm-ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For
example, running `npm ls promzard` in npm's source tree will show:

```bash
npm@11.5.1 /path/to/npm
npm@11.6.0 /path/to/npm
└─┬ [email protected]
└── [email protected]
```
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/docs/content/commands/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces.

### Version

11.5.1
11.6.0

### Description

Expand Down
5 changes: 4 additions & 1 deletion deps/npm/docs/content/configuring-npm/npmrc.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@ The four relevant files are:
* npm builtin config file (`/path/to/npm/npmrc`)

All npm config files are an ini-formatted list of `key = value` parameters.
Environment variables can be replaced using `${VARIABLE_NAME}`. For
Environment variables can be replaced using `${VARIABLE_NAME}`. By default
if the variable is not defined, it is left unreplaced. By adding `?` after
variable name they can be forced to evaluate to an empty string instead. For
example:

```bash
cache = ${HOME}/.npm-packages
node-options = "${NODE_OPTIONS?} --use-system-ca"
```

Each of these files is loaded, and config options are resolved in priority
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-access.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-access----1151">
<h1 id="----npm-access----1160">
<span>npm-access</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Set access level on published packages</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-adduser.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-adduser----1151">
<h1 id="----npm-adduser----1160">
<span>npm-adduser</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Add a registry user account</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-audit.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-audit----1151">
<h1 id="----npm-audit----1160">
<span>npm-audit</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Run a security audit</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-bugs.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-bugs----1151">
<h1 id="----npm-bugs----1160">
<span>npm-bugs</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Report bugs for a package in a web browser</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-cache.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-cache----1151">
<h1 id="----npm-cache----1160">
<span>npm-cache</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Manipulates packages cache</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-ci.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-ci----1151">
<h1 id="----npm-ci----1160">
<span>npm-ci</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Clean install a project</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-completion.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-completion----1151">
<h1 id="----npm-completion----1160">
<span>npm-completion</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Tab Completion for npm</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-config----1151">
<h1 id="----npm-config----1160">
<span>npm-config</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Manage the npm configuration files</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-dedupe.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-dedupe----1151">
<h1 id="----npm-dedupe----1160">
<span>npm-dedupe</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Reduce duplication in the package tree</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-deprecate.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-deprecate----1151">
<h1 id="----npm-deprecate----1160">
<span>npm-deprecate</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Deprecate a version of a package</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-diff.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-diff----1151">
<h1 id="----npm-diff----1160">
<span>npm-diff</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">The registry diff command</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-dist-tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-dist-tag----1151">
<h1 id="----npm-dist-tag----1160">
<span>npm-dist-tag</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Modify package distribution tags</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-docs----1151">
<h1 id="----npm-docs----1160">
<span>npm-docs</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Open documentation for a package in a web browser</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-doctor.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-doctor----1151">
<h1 id="----npm-doctor----1160">
<span>npm-doctor</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Check the health of your npm environment</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-edit----1151">
<h1 id="----npm-edit----1160">
<span>npm-edit</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Edit an installed package</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-exec.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-exec----1151">
<h1 id="----npm-exec----1160">
<span>npm-exec</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Run a command from a local or remote npm package</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-explain.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-explain----1151">
<h1 id="----npm-explain----1160">
<span>npm-explain</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Explain installed packages</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-explore.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-explore----1151">
<h1 id="----npm-explore----1160">
<span>npm-explore</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Browse an installed package</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-find-dupes.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-find-dupes----1151">
<h1 id="----npm-find-dupes----1160">
<span>npm-find-dupes</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Find duplication in the package tree</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-fund.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-fund----1151">
<h1 id="----npm-fund----1160">
<span>npm-fund</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Retrieve funding information</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-help-search.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-help-search----1151">
<h1 id="----npm-help-search----1160">
<span>npm-help-search</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Search npm help documentation</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-help.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-help----1151">
<h1 id="----npm-help----1160">
<span>npm-help</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Get help on npm</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-init.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-init----1151">
<h1 id="----npm-init----1160">
<span>npm-init</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Create a package.json file</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-install-ci-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-install-ci-test----1151">
<h1 id="----npm-install-ci-test----1160">
<span>npm-install-ci-test</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Install a project with a clean slate and run tests</span>
</header>
Expand Down
4 changes: 2 additions & 2 deletions deps/npm/docs/output/commands/npm-install-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@

<section id="content">
<header class="title">
<h1 id="----npm-install-test----1151">
<h1 id="----npm-install-test----1160">
<span>npm-install-test</span>
<span class="version">@11.5.1</span>
<span class="version">@11.6.0</span>
</h1>
<span class="description">Install package(s) and run tests</span>
</header>
Expand Down
Loading
Loading