Skip to content

Commit

Permalink
feat: 文件删除测试
Browse files Browse the repository at this point in the history
  • Loading branch information
kongjing committed May 4, 2023
1 parent 66f267e commit baaecfb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/warning/a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const anymatch = require('anymatch')

console.info(anymatch(['./packages/warning/*.js'], 'packages/warning/a.js'))
9 changes: 8 additions & 1 deletion packages/warning/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ function checkEmial(email) {
/** gitAdd中符合glob的文件路径 */
async function getGlobUrls(monitorFiles) {
const res = await sgf()
console.info('_____________', res)
console.info(
'_____________',
res
.filter((item) => {
return anymatch(monitorFiles, item.filename)
})
.map((item) => item.filename),
)

return res
.filter((item) => {
Expand Down

0 comments on commit baaecfb

Please # to comment.