From 532033985dc4479f9bd7795b5502c444d15dfc2e Mon Sep 17 00:00:00 2001 From: Grzegorz Date: Sun, 1 Dec 2024 15:35:56 +0100 Subject: [PATCH] cleanup --- index.js | 1 - package.json | 6 ++++-- src/denon.js | 4 +--- src/impulsegenerator.js | 1 - src/mainzone.js | 4 +--- src/mqtt.js | 1 - src/restful.js | 1 - src/surround.js | 4 +--- src/zone2.js | 4 +--- src/zone3.js | 4 +--- 10 files changed, 9 insertions(+), 21 deletions(-) diff --git a/index.js b/index.js index f3d93fb..d497f12 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,3 @@ -'use strict'; import { join } from 'path'; import { mkdirSync, existsSync, writeFileSync } from 'fs'; import MainZone from './src/mainzone.js'; diff --git a/package.json b/package.json index 6512dda..73a1d3a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "displayName": "Denon TV", "name": "homebridge-denon-tv", - "version": "5.2.0", + "version": "5.2.1", "description": "Homebridge plugin to control Denon/Marantz AV Receivers.", "license": "MIT", "author": "grzegorz914", @@ -17,7 +17,9 @@ "url": "https://github.com/grzegorz914/homebridge-denon-tv/issues" }, "type": "module", - "main": "index.js", + "exports": { + ".": "./index.js" + }, "files": [ "src", "index.js", diff --git a/src/denon.js b/src/denon.js index 902d02d..0fbc034 100644 --- a/src/denon.js +++ b/src/denon.js @@ -1,6 +1,4 @@ -'use strict'; -import { promises } from 'fs'; -const fsPromises = promises; +import { promises as fsPromises } from 'fs'; import axios from 'axios'; import { Agent } from 'https'; import EventEmitter from 'events'; diff --git a/src/impulsegenerator.js b/src/impulsegenerator.js index c5edded..af45ff7 100644 --- a/src/impulsegenerator.js +++ b/src/impulsegenerator.js @@ -1,4 +1,3 @@ -"use strict"; import EventEmitter from 'events'; class ImpulseGenerator extends EventEmitter { diff --git a/src/mainzone.js b/src/mainzone.js index 80e990f..fd8634e 100644 --- a/src/mainzone.js +++ b/src/mainzone.js @@ -1,6 +1,4 @@ -'use strict'; -import { promises } from 'fs'; -const fsPromises = promises; +import { promises as fsPromises } from 'fs'; import EventEmitter from 'events'; import Mqtt from './mqtt.js'; import RestFul from './restful.js'; diff --git a/src/mqtt.js b/src/mqtt.js index 3388791..1a3813a 100644 --- a/src/mqtt.js +++ b/src/mqtt.js @@ -1,4 +1,3 @@ -"use strict"; import asyncMqtt from 'async-mqtt'; const { connectAsync } = asyncMqtt; import EventEmitter from 'events'; diff --git a/src/restful.js b/src/restful.js index 8be05e9..ddf9936 100644 --- a/src/restful.js +++ b/src/restful.js @@ -1,4 +1,3 @@ -"use strict"; import express, { json } from 'express'; import EventEmitter from 'events'; diff --git a/src/surround.js b/src/surround.js index 0300ec9..86fa939 100644 --- a/src/surround.js +++ b/src/surround.js @@ -1,6 +1,4 @@ -'use strict'; -import { promises } from 'fs'; -const fsPromises = promises; +import { promises as fsPromises } from 'fs'; import EventEmitter from 'events'; import Mqtt from './mqtt.js'; import RestFul from './restful.js'; diff --git a/src/zone2.js b/src/zone2.js index 367151d..da702ce 100644 --- a/src/zone2.js +++ b/src/zone2.js @@ -1,6 +1,4 @@ -'use strict'; -import { promises } from 'fs'; -const fsPromises = promises; +import { promises as fsPromises } from 'fs'; import EventEmitter from 'events'; import Mqtt from './mqtt.js'; import RestFul from './restful.js'; diff --git a/src/zone3.js b/src/zone3.js index 1cb96db..06ca285 100644 --- a/src/zone3.js +++ b/src/zone3.js @@ -1,6 +1,4 @@ -'use strict'; -import { promises } from 'fs'; -const fsPromises = promises; +import { promises as fsPromises } from 'fs'; import EventEmitter from 'events'; import Mqtt from './mqtt.js'; import RestFul from './restful.js';