homey-lib 2.21.2 → 2.21.3

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/helpers/index.js CHANGED
@@ -10,6 +10,7 @@ try {
10
10
 
11
11
  if (fs && util && util.promisify) {
12
12
  module.exports.openAsync = util.promisify(fs.open);
13
+ module.exports.closeAsync = util.promisify(fs.close);
13
14
  module.exports.readAsync = util.promisify(fs.read);
14
15
  module.exports.statAsync = util.promisify(fs.stat);
15
16
  module.exports.readFileAsync = util.promisify(fs.readFile);
package/lib/App/index.js CHANGED
@@ -16,6 +16,7 @@ const Energy = require('../Energy');
16
16
 
17
17
  const {
18
18
  openAsync,
19
+ closeAsync,
19
20
  readAsync,
20
21
  statAsync,
21
22
  readFileAsync,
@@ -709,6 +710,7 @@ class App {
709
710
  const fd = await openAsync(filepath, 'r');
710
711
  const buffer = Buffer.alloc(numBytes);
711
712
  await readAsync(fd, buffer, 0, numBytes, 0);
713
+ await closeAsync(fd);
712
714
  return buffer;
713
715
  }
714
716
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homey-lib",
3
- "version": "2.21.2",
3
+ "version": "2.21.3",
4
4
  "description": "Shared Library for Homey",
5
5
  "main": "index.js",
6
6
  "scripts": {