-
-
Notifications
You must be signed in to change notification settings - Fork 229
chore: move to esm #4403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: move to esm #4403
Changes from 22 commits
686034b
d6ba802
4eb9420
7c4bb6b
0cc76a9
98ed4ba
2eeb552
5851cbd
19f1c0c
66e4bf4
09717f9
6bc3f10
2baf010
a303fec
5a7b39b
69d5076
7d16b86
fdd8d5d
b4ca151
d7f93fd
265c958
2cb4dbf
cd619fa
0ecd12c
fe3ee83
90398fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| recursive: true | ||
| watch-files: | ||
| - 'test/**/*.ts' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v20.19.4 | ||
| v22.20.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| module.exports = { | ||
| export default { | ||
| semi: false, | ||
| singleQuote: true, | ||
| useTabs: true, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,26 @@ | ||
| 'use strict' | ||
|
|
||
| import { | ||
| import type { | ||
| MqttClient as Client, | ||
| IClientOptions, | ||
| IClientPublishOptions, | ||
| IClientSubscribeOptions, | ||
| connect, | ||
| } from 'mqtt' | ||
| import { connect } from 'mqtt' | ||
| import { | ||
| allSettled, | ||
| parseJSON, | ||
| sanitizeTopic, | ||
| pkgJson, | ||
| stringifyJSON, | ||
| } from './utils' | ||
| import { module } from './logger' | ||
| import { TypedEventEmitter } from './EventEmitter' | ||
| import { storeDir } from '../config/app' | ||
| } from './utils.ts' | ||
| import { module } from './logger.ts' | ||
| import { TypedEventEmitter } from './EventEmitter.ts' | ||
| import { storeDir } from '../config/app.ts' | ||
| import { ensureDir } from 'fs-extra' | ||
| import { Manager } from 'mqtt-jsonl-store' | ||
| import { join } from 'path' | ||
|
|
||
| const url = require('native-url') | ||
| import { join } from 'node:path' | ||
| import url from 'native-url' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd use the browser-compatible WhatWG URL API instead of an extra dependency.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. every time I tried using that I ended up reverting my changes as them are not 100% compatibile
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting. I did this in Z-Wave JS to enable browser support and it worked just fine.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See: mqttjs/MQTT.js#1927 |
||
|
|
||
| const logger = module('Mqtt') | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.