Skip to content

Commit

Permalink
Remove default imports (#7)
Browse files Browse the repository at this point in the history
Remove default imports where possible. Optional only has a default
import.
  • Loading branch information
amrc-benmorrow authored Apr 30, 2024
2 parents 2915966 + b5a98dd commit f91db0e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright 2022 AMRC.
*/

import util from "util";
import * as util from "util";

export class Debug {
constructor (opts) {
Expand Down
2 changes: 1 addition & 1 deletion lib/deps.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ export async function build_node_fetch () {
return (url, opts) => got_fetch(`${url}`, opts);
}

import sparkplug_payload from "sparkplug-payload";
import * as sparkplug_payload from "sparkplug-payload";
export const SpB = sparkplug_payload.get("spBv1.0");

2 changes: 1 addition & 1 deletion lib/service/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright 2022 AMRC.
*/

import semver from "semver";
import * as semver from "semver";

import { Address } from "../sparkplug/util.js";

Expand Down
2 changes: 1 addition & 1 deletion lib/service/configdb-watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* required dependency on rxjs.
*/

import rx from "rxjs";
import * as rx from "rxjs";

export class ConfigDBWatcher {
constructor (configdb, device) {
Expand Down
2 changes: 1 addition & 1 deletion lib/service/configdb.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright 2022 AMRC.
*/

import format from "util";
import { format } from "util";

import { App, Service, Null as Null_UUID } from "../uuids.js";

Expand Down
3 changes: 1 addition & 2 deletions lib/service/mqtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* Copyright 2022 AMRC
*/

import timers from "timers/promises";

import { BasicSparkplugNode } from "../sparkplug/basic-node.js";

import { GSS, MQTT } from "../deps.js";
Expand Down Expand Up @@ -183,6 +181,7 @@ export default class MQTTInterface extends ServiceInterface {
* make the Sparkplug Node code an optional dep in the future. */
async basic_sparkplug_node (opts) {
return new BasicSparkplugNode({
debug: this.debug,
...opts,
mqttFactory: will => this.mqtt_client({ ...opts, will }),
});
Expand Down
2 changes: 1 addition & 1 deletion lib/service/service-interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright 2022 AMRC.
*/

import content_type from "content-type";
import * as content_type from "content-type";
import Optional from "optional-js";

import { Service } from "../uuids.js";
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@amrc-factoryplus/service-client",
"version": "1.3.5",
"version": "1.3.6",
"description": "",
"main": "lib/index.js",
"type": "module",
Expand Down

0 comments on commit f91db0e

Please sign in to comment.