@netlify/functions-utils 4.1.0 → 4.1.4

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 +3 -3
  2. package/src/main.js +2 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/functions-utils",
3
- "version": "4.1.0",
3
+ "version": "4.1.4",
4
4
  "description": "Utility for adding Functions files in Netlify Build",
5
5
  "type": "module",
6
6
  "exports": "./src/main.js",
@@ -45,13 +45,13 @@
45
45
  },
46
46
  "license": "MIT",
47
47
  "dependencies": {
48
- "@netlify/zip-it-and-ship-it": "^5.4.0",
48
+ "@netlify/zip-it-and-ship-it": "^5.5.0",
49
49
  "cpy": "^8.1.0",
50
50
  "path-exists": "^4.0.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "ava": "^3.15.0",
54
- "del": "^5.1.0",
54
+ "del": "^6.0.0",
55
55
  "sinon": "^12.0.0",
56
56
  "sort-on": "^4.1.0",
57
57
  "tmp-promise": "^3.0.0"
package/src/main.js CHANGED
@@ -1,13 +1,10 @@
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 { listFunctions, listFunctionsFiles } from '@netlify/zip-it-and-ship-it'
6
5
  import cpy from 'cpy'
7
6
  import pathExists from 'path-exists'
8
7
 
9
- const pStat = promisify(stat)
10
-
11
8
  // Add a Netlify Function file to the `functions` directory so it is processed
12
9
  // by `@netlify/plugin-functions-core`
13
10
  export const add = async function (src, dist, { fail = defaultFail } = {}) {
@@ -29,7 +26,7 @@ export const add = async function (src, dist, { fail = defaultFail } = {}) {
29
26
  }
30
27
 
31
28
  const getSrcGlob = async function (src, srcBasename) {
32
- const srcStat = await pStat(src)
29
+ const srcStat = await fs.stat(src)
33
30
 
34
31
  if (srcStat.isDirectory()) {
35
32
  return `${srcBasename}/**`