Skip to content

Commit 9916c61

Browse files
committedMay 30, 2021
chore(ci): set check_latest flag to true
1 parent 3aecf09 commit 9916c61

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed
 

‎.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/setup-node@v2
2727
with:
2828
node-version: ${{ matrix.node-version }}
29-
check-latest: '*'
29+
check-latest: true
3030
- run: npm ci
3131
- name: Linting
3232
run: npm run format:ci

‎src/lib/helpers/handleFileTracking.js

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { join } = require('path')
22

33
const findCacheDir = require('find-cache-dir')
4-
const { existsSync, readdirSync, readFileSync, rmdirSync, removeSync, writeFileSync } = require('fs-extra')
4+
const { existsSync, readdirSync, readFileSync, removeSync, writeFileSync } = require('fs-extra')
55

66
const { NETLIFY_PUBLISH_PATH, NETLIFY_FUNCTIONS_PATH } = require('../config')
77

@@ -22,15 +22,13 @@ const handleFileTracking = ({ functionsPath, publishPath }) => {
2222
const trackingFile = readFileSync(trackingFilePath, 'utf8')
2323
const [trackedFunctions, trackedPublish] = trackingFile.split(TRACKING_FILE_SEPARATOR)
2424
const cleanConfiguredFiles = (trackedFiles, dirPath) => {
25-
trackedFiles.forEach((file) => {
26-
const filePath = join(dirPath, file.trim('\r'))
27-
if (file !== '') {
28-
if (process.platform === 'win32') {
29-
rmdirSync(filePath, { recursive: true })
30-
}
25+
trackedFiles
26+
.map((file) => file.trim())
27+
.filter(Boolean)
28+
.forEach((file) => {
29+
const filePath = join(dirPath, file)
3130
removeSync(filePath)
32-
}
33-
})
31+
})
3432
}
3533

3634
if (isConfiguredPublishDir) {

0 commit comments

Comments
 (0)