@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/fs.js +2 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/cache-utils",
3
- "version": "4.1.0",
3
+ "version": "4.1.1",
4
4
  "description": "Utility for caching files in Netlify Build",
5
5
  "type": "module",
6
6
  "exports": "./src/main.js",
package/src/fs.js CHANGED
@@ -1,14 +1,11 @@
1
- import { stat } from 'fs'
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 pStat(src)
58
+ return await fs.stat(src)
62
59
  } catch {}
63
60
  }