-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: @npmcli/[email protected], @npmcli/[email protected]
These dependency updates fix the issue found in `9.7.0` that was the reason for its deprecation. Specifically `npm` will now use `bin` before `directories.bin` when looking for bin scripts. This matches the behavior of `[email protected]`.
- Loading branch information
1 parent
974e7d8
commit 97acdd9
Showing
8 changed files
with
58 additions
and
40 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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
const is = require('./is.js') | ||
const { dirname } = require('path') | ||
|
||
module.exports = async ({ cwd = process.cwd() } = {}) => { | ||
if (await is({ cwd })) { | ||
return cwd | ||
} | ||
while (cwd !== dirname(cwd)) { | ||
cwd = dirname(cwd) | ||
module.exports = async ({ cwd = process.cwd(), root } = {}) => { | ||
while (true) { | ||
if (await is({ cwd })) { | ||
return cwd | ||
} | ||
const next = dirname(cwd) | ||
if (cwd === root || cwd === next) { | ||
return null | ||
} | ||
cwd = next | ||
} | ||
return null | ||
} |
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