-
-
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
Merged
+1,461
−761
Merged
chore: move to esm #4403
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
686034b
chore: move to esm
robertsLando d6ba802
fix: breaking changes
robertsLando 4eb9420
fix: correct file references in utils and nodemon configurations
robertsLando 7c4bb6b
chore: remove esbuild-register, use experimenta flag
robertsLando 0cc76a9
fix: testss
robertsLando 98ed4ba
fix: ui tests
robertsLando 2eeb552
fix: update import for native-url and add postinstall script for patc…
robertsLando 5851cbd
fix: update Node.js version in .nvmrc to v22.20.0
robertsLando 19f1c0c
fix: refactor content reading and replacement for clarity
robertsLando 66e4bf4
fix: use node 22 to test applicetion
robertsLando 09717f9
fix: ensure logs are always outputted and backend status is checked
robertsLando 6bc3f10
fix: fake stick
robertsLando 2baf010
fix: use production code in test application
robertsLando a303fec
Merge branch 'master' of https://github.com/zwave-js/zwave-js-ui into…
robertsLando 5a7b39b
fix: update backend process check to use 'npm start'
robertsLando 69d5076
fix: circular reference
robertsLando 7d16b86
Merge branch 'master' into move-to-esm
robertsLando fdd8d5d
refactor: update imports to use 'node:' prefix for built-in modules
robertsLando b4ca151
fix: restore esbuild meta url shim
robertsLando d7f93fd
fix: pkg build
robertsLando 265c958
Merge branch 'master' into move-to-esm
robertsLando 2cb4dbf
feat: use backend code in frontend
robertsLando cd619fa
feat: update zwave-js to version 15.15.1 and fix generateDocs script …
robertsLando 0ecd12c
fix: change _getFile method visibility from public to private
robertsLando fe3ee83
refactor: replace fs-extra with native fs/promises methods and update…
robertsLando 90398fb
fix path resolution on Windows
AlCalzone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| recursive: true | ||
| watch-files: | ||
| - 'test/**/*.ts' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v20.19.4 | ||
| v22.20.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| module.exports = { | ||
| export default { | ||
| semi: false, | ||
| singleQuote: true, | ||
| useTabs: true, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,10 +4,10 @@ | |
| /** | ||
| * Module dependencies. | ||
| */ | ||
| import jsonStore from '../lib/jsonStore' | ||
| import store from '../config/store' | ||
| import * as conf from '../config/app' | ||
| import app, { startServer } from '../app' | ||
| import jsonStore from '../lib/jsonStore.ts' | ||
| import store from '../config/store.ts' | ||
| import * as conf from '../config/app.ts' | ||
| import app, { startServer } from '../app.ts' | ||
robertsLando marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| console.log( | ||
| ` ______ __ __ _ _____ _ _ _____ \n |___ / \\ \\ / / | |/ ____| | | | |_ _|\n / /____\\ \\ /\\ / /_ ___ _____ | | (___ | | | | | | \n / /______\\ \\/ \\/ / _\' \\ \\ / / _ \\ _ | |\\___ \\ | | | | | | \n / /__ \\ /\\ / (_| |\\ V / __/ | |__| |____) | | |__| |_| |_ \n /_____| \\/ \\/ \\__,_| \\_/ \\___| \\____/|_____/ \\____/|_____|\n`, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import { joinPath } from '../lib/utils' | ||
| import { joinPath } from '../lib/utils.ts' | ||
| import { config } from 'dotenv' | ||
|
|
||
| config({ path: './.env.app' }) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,10 @@ | ||
| // config/store.js | ||
|
|
||
| import { GatewayConfig } from '../lib/Gateway' | ||
| import { MqttConfig } from '../lib/MqttClient' | ||
| import { ZnifferConfig } from '../lib/ZnifferManager' | ||
| import { ZwaveConfig, deviceConfigPriorityDir } from '../lib/ZwaveClient' | ||
| import type { GatewayConfig } from '../lib/Gateway.ts' | ||
| import type { MqttConfig } from '../lib/MqttClient.ts' | ||
| import type { ZnifferConfig } from '../lib/ZnifferManager.ts' | ||
| import type { ZwaveConfig } from '../lib/ZwaveClient.ts' | ||
| import { deviceConfigPriorityDir } from '../lib/Constants.ts' | ||
|
|
||
| export type StoreKeys = 'settings' | 'scenes' | 'nodes' | 'users' | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| // List of Home-Assistant configuration for MQTT Discovery | ||
| // https://www.home-assistant.io/docs/mqtt/discovery/ | ||
|
|
||
| import { HassDevice } from '../lib/ZwaveClient' | ||
| import type { HassDevice } from '../lib/ZwaveClient.ts' | ||
|
|
||
| type HassDeviceKey = | ||
| | 'binary_sensor' | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| // Place here repeated patterns | ||
|
|
||
| import { HassDevice } from '../lib/ZwaveClient' | ||
| import type { HassDevice } from '../lib/ZwaveClient.ts' | ||
|
|
||
| const FAN_DIMMER: HassDevice = { | ||
| type: 'fan', | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| import store from '../config/store' | ||
| import { module } from './logger' | ||
| import jsonStore, { STORE_BACKUP_PREFIX } from './jsonStore' | ||
| import store from '../config/store.ts' | ||
| import { module } from './logger.ts' | ||
| import jsonStore, { STORE_BACKUP_PREFIX } from './jsonStore.ts' | ||
| import Cron from 'croner' | ||
| import { readdir, unlink } from 'fs/promises' | ||
| import { nvmBackupsDir, storeBackupsDir } from '../config/app' | ||
| import { joinPath } from './utils' | ||
| import type ZwaveClient from './ZwaveClient' | ||
| import { readdir, unlink } from 'node:fs/promises' | ||
| import { nvmBackupsDir, storeBackupsDir } from '../config/app.ts' | ||
| import { joinPath } from './utils.ts' | ||
| import type ZwaveClient from './ZwaveClient.ts' | ||
|
|
||
| export const NVM_BACKUP_PREFIX = 'NVM_' | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| import { getMeter, getMeterScale } from '@zwave-js/core' | ||
| import { join } from 'node:path' | ||
| import { storeDir } from '../config/app.ts' | ||
|
|
||
| interface IGenericMap { | ||
| [key: number]: string | ||
|
|
@@ -43,6 +45,8 @@ export interface IMeterCCSpecific { | |
| meterType: number | ||
| } | ||
|
|
||
| export const deviceConfigPriorityDir = join(storeDir, 'config') | ||
|
|
||
| // https://github.com/OpenZWave/open-zwave/blob/0d94c9427bbd19e47457578bccc60b16c6679b49/config/Localization.xml#L606 | ||
| const _productionMap: IGenericMap = { | ||
| 0: 'instant', | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import { Router } from 'express' | ||
| import MqttClient from './MqttClient' | ||
| import { ModuleLogger } from './logger' | ||
| import ZwaveClient from './ZwaveClient' | ||
| import type { Router } from 'express' | ||
| import type MqttClient from './MqttClient.ts' | ||
| import type { ModuleLogger } from './logger.ts' | ||
| import type ZwaveClient from './ZwaveClient.ts' | ||
|
|
||
| export interface PluginContext { | ||
| zwave: ZwaveClient | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import EventEmitter from 'events' | ||
| import { applyMixin } from './utils' | ||
| import EventEmitter from 'node:events' | ||
| import { applyMixin } from './utils.ts' | ||
|
|
||
| /** | ||
| * A type-safe EventEmitter interface to use in place of Node.js's EventEmitter. | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.