-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #52767 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
- Loading branch information
1 parent
be587e3
commit 26b1231
Showing
418 changed files
with
9,123 additions
and
16,420 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
#!/usr/bin/env pwsh | ||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
|
||
$exe="" | ||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
# Fix case when both the Windows and Linux builds of Node | ||
# are installed in the same directory | ||
$exe=".exe" | ||
$NODE_EXE="$PSScriptRoot/node.exe" | ||
if (-not (Test-Path $NODE_EXE)) { | ||
$NODE_EXE="$PSScriptRoot/node" | ||
} | ||
$ret=0 | ||
|
||
$nodeexe = "node$exe" | ||
$nodebin = $(Get-Command $nodeexe -ErrorAction SilentlyContinue -ErrorVariable F).Source | ||
if ($nodebin -eq $null) { | ||
Write-Host "$nodeexe not found." | ||
exit 1 | ||
if (-not (Test-Path $NODE_EXE)) { | ||
$NODE_EXE="node" | ||
} | ||
$nodedir = $(New-Object -ComObject Scripting.FileSystemObject).GetFile("$nodebin").ParentFolder.Path | ||
|
||
$npmprefixjs="$nodedir/node_modules/npm/bin/npm-prefix.js" | ||
$npmprefix=(& $nodeexe $npmprefixjs) | ||
$NPM_PREFIX_JS="$PSScriptRoot/node_modules/npm/bin/npm-prefix.js" | ||
$NPM_CLI_JS="$PSScriptRoot/node_modules/npm/bin/npm-cli.js" | ||
$NPM_PREFIX=(& $NODE_EXE $NPM_PREFIX_JS) | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
Write-Host "Could not determine Node.js install directory" | ||
exit 1 | ||
} | ||
$npmprefixclijs="$npmprefix/node_modules/npm/bin/npm-cli.js" | ||
|
||
$NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" | ||
if (Test-Path $NPM_PREFIX_NPM_CLI_JS) { | ||
$NPM_CLI_JS=$NPM_PREFIX_NPM_CLI_JS | ||
} | ||
|
||
# Support pipeline input | ||
if ($MyInvocation.ExpectingInput) { | ||
$input | & $nodeexe $npmprefixclijs $args | ||
$input | & $NODE_EXE $NPM_CLI_JS $args | ||
} else { | ||
& $nodeexe $npmprefixclijs $args | ||
& $NODE_EXE $NPM_CLI_JS $args | ||
} | ||
$ret=$LASTEXITCODE | ||
exit $ret | ||
|
||
exit $LASTEXITCODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
#!/usr/bin/env pwsh | ||
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
|
||
$exe="" | ||
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
# Fix case when both the Windows and Linux builds of Node | ||
# are installed in the same directory | ||
$exe=".exe" | ||
$NODE_EXE="$PSScriptRoot/node.exe" | ||
if (-not (Test-Path $NODE_EXE)) { | ||
$NODE_EXE="$PSScriptRoot/node" | ||
} | ||
$ret=0 | ||
|
||
$nodeexe = "node$exe" | ||
$nodebin = $(Get-Command $nodeexe -ErrorAction SilentlyContinue -ErrorVariable F).Source | ||
if ($nodebin -eq $null) { | ||
Write-Host "$nodeexe not found." | ||
exit 1 | ||
if (-not (Test-Path $NODE_EXE)) { | ||
$NODE_EXE="node" | ||
} | ||
$nodedir = $(New-Object -ComObject Scripting.FileSystemObject).GetFile("$nodebin").ParentFolder.Path | ||
|
||
$npmprefixjs="$nodedir/node_modules/npm/bin/npm-prefix.js" | ||
$npmprefix=(& $nodeexe $npmprefixjs) | ||
$NPM_PREFIX_JS="$PSScriptRoot/node_modules/npm/bin/npm-prefix.js" | ||
$NPX_CLI_JS="$PSScriptRoot/node_modules/npm/bin/npx-cli.js" | ||
$NPM_PREFIX=(& $NODE_EXE $NPM_PREFIX_JS) | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
Write-Host "Could not determine Node.js install directory" | ||
exit 1 | ||
} | ||
$npmprefixclijs="$npmprefix/node_modules/npm/bin/npx-cli.js" | ||
|
||
$NPM_PREFIX_NPX_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npx-cli.js" | ||
if (Test-Path $NPM_PREFIX_NPX_CLI_JS) { | ||
$NPX_CLI_JS=$NPM_PREFIX_NPX_CLI_JS | ||
} | ||
|
||
# Support pipeline input | ||
if ($MyInvocation.ExpectingInput) { | ||
$input | & $nodeexe $npmprefixclijs $args | ||
$input | & $NODE_EXE $NPX_CLI_JS $args | ||
} else { | ||
& $nodeexe $npmprefixclijs $args | ||
& $NODE_EXE $NPX_CLI_JS $args | ||
} | ||
$ret=$LASTEXITCODE | ||
exit $ret | ||
|
||
exit $LASTEXITCODE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
example, running `npm ls promzard` in npm's source tree will show: | ||
|
||
```bash | ||
npm@10.5.2 /path/to/npm | ||
npm@10.7.0 /path/to/npm | ||
└─┬ [email protected] | ||
└── [email protected] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,28 +24,17 @@ support this interface. | |
* `npm profile get [<property>]`: Display all of the properties of your | ||
profile, or one or more specific properties. It looks like: | ||
|
||
```bash | ||
+-----------------+---------------------------+ | ||
| name | example | | ||
+-----------------+---------------------------+ | ||
| email | [email protected] (verified) | | ||
+-----------------+---------------------------+ | ||
| two factor auth | auth-and-writes | | ||
+-----------------+---------------------------+ | ||
| fullname | Example User | | ||
+-----------------+---------------------------+ | ||
| homepage | | | ||
+-----------------+---------------------------+ | ||
| freenode | | | ||
+-----------------+---------------------------+ | ||
| twitter | | | ||
+-----------------+---------------------------+ | ||
| github | | | ||
+-----------------+---------------------------+ | ||
| created | 2015-02-26T01:38:35.892Z | | ||
+-----------------+---------------------------+ | ||
| updated | 2017-10-02T21:29:45.922Z | | ||
+-----------------+---------------------------+ | ||
``` | ||
name: example | ||
email: [email protected] (verified) | ||
two-factor auth: auth-and-writes | ||
fullname: Example User | ||
homepage: | ||
freenode: | ||
twitter: | ||
github: | ||
created: 2015-02-26T01:38:35.892Z | ||
updated: 2017-10-02T21:29:45.922Z | ||
``` | ||
|
||
* `npm profile set <property> <value>`: Set the value of a profile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ Note: This command is unaware of workspaces. | |
|
||
### Version | ||
|
||
10.5.2 | ||
10.7.0 | ||
|
||
### Description | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.