文件操作 - add-git-sha.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/node_modules/npm/node_modules/pacote/lib/util/add-git-sha.js
编辑文件内容
// add a sha to a git remote url spec const addGitSha = (spec, sha) => { if (spec.hosted) { const h = spec.hosted const opt = { noCommittish: true } const base = h.https && h.auth ? h.https(opt) : h.shortcut(opt) return `${base}#${sha}` } else { // don't use new URL for this, because it doesn't handle scp urls return spec.rawSpec.replace(/#.*$/, '') + `#${sha}` } } module.exports = addGitSha
修改文件时间
将文件时间修改为当前时间的前一年
删除文件