-
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: #52351 Reviewed-By: Luke Karrys <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Ulises Gascón <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
- Loading branch information
1 parent
cf738ae
commit 24bd695
Showing
219 changed files
with
1,600 additions
and
1,081 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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env node | ||
// This is a single-use bin to help windows discover the proper prefix for npm | ||
// without having to load all of npm first | ||
// It does not accept argv params | ||
|
||
const path = require('path') | ||
const Config = require('@npmcli/config') | ||
const { definitions, flatten, shorthands } = require('@npmcli/config/lib/definitions') | ||
const config = new Config({ | ||
npmPath: path.dirname(__dirname), | ||
// argv is explicitly not looked at since prefix is not something that can be changed via argv | ||
argv: [], | ||
definitions, | ||
flatten, | ||
shorthands, | ||
excludeNpmCwd: false, | ||
}) | ||
|
||
async function main () { | ||
try { | ||
await config.load() | ||
// eslint-disable-next-line no-console | ||
console.log(config.globalPrefix) | ||
} catch (err) { | ||
// eslint-disable-next-line no-console | ||
console.error(err) | ||
process.exit(1) | ||
} | ||
} | ||
main() |
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
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 | ||
[email protected].0 /path/to/npm | ||
[email protected].1 /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
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.0 | ||
10.5.1 | ||
|
||
### 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,7 +160,7 @@ <h3 id="description">Description</h3> | |
the results to only the paths to the packages named. Note that nested | ||
packages will <em>also</em> show the paths to the specified packages. For | ||
example, running <code>npm ls promzard</code> in npm's source tree will show:</p> | ||
<pre><code class="language-bash">[email protected].0 /path/to/npm | ||
<pre><code class="language-bash">[email protected].1 /path/to/npm | ||
└─┬ [email protected] | ||
└── [email protected] | ||
</code></pre> | ||
|
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.