@netlify/cache-utils 4.1.0 → 4.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/fs.js +2 -5
package/package.json
CHANGED
package/src/fs.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { promises as fs } from 'fs'
|
|
2
2
|
import { basename, dirname } from 'path'
|
|
3
|
-
import { promisify } from 'util'
|
|
4
3
|
|
|
5
4
|
import cpy from 'cpy'
|
|
6
5
|
import globby from 'globby'
|
|
7
6
|
import junk from 'junk'
|
|
8
7
|
import moveFile from 'move-file'
|
|
9
8
|
|
|
10
|
-
const pStat = promisify(stat)
|
|
11
|
-
|
|
12
9
|
// Move or copy a cached file/directory from/to a local one
|
|
13
10
|
export const moveCacheFile = async function (src, dest, move) {
|
|
14
11
|
// Moving is faster but removes the source files locally
|
|
@@ -58,6 +55,6 @@ const getSrcGlob = async function (src) {
|
|
|
58
55
|
|
|
59
56
|
const getStat = async function (src) {
|
|
60
57
|
try {
|
|
61
|
-
return await
|
|
58
|
+
return await fs.stat(src)
|
|
62
59
|
} catch {}
|
|
63
60
|
}
|