Skip to content

deps: @npmcli/[email protected] #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2023
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
16 changes: 1 addition & 15 deletions lib/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ const path = require('path')
const log = require('proc-log')
const git = require('@npmcli/git')

// Replace with https://github.com/npm/git/pull/135 once it lands
const gitFind = async ({ cwd, root }) => {
if (await git.is({ cwd })) {
return cwd
}
while (cwd !== path.dirname(cwd) && cwd !== root) {
cwd = path.dirname(cwd)
if (await git.is({ cwd })) {
return cwd
}
}
return null
}

const normalize = async (pkg, { strict, steps, root }) => {
const data = pkg.content
const scripts = data.scripts || {}
Expand Down Expand Up @@ -193,7 +179,7 @@ const normalize = async (pkg, { strict, steps, root }) => {

// populate "gitHead" attribute
if (steps.includes('gitHead') && !data.gitHead) {
const gitRoot = await gitFind({ cwd: pkg.path, root })
const gitRoot = await git.find({ cwd: pkg.path, root })
let head
if (gitRoot) {
try {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"tap": "^16.0.1"
},
"dependencies": {
"@npmcli/git": "^4.0.4",
"@npmcli/git": "^4.1.0",
"glob": "^10.2.2",
"json-parse-even-better-errors": "^3.0.0",
"normalize-package-data": "^5.0.0",
Expand Down