Skip to content

Commit

Permalink
Merge pull request #10 from phillipivan/main
Browse files Browse the repository at this point in the history
Use node 22
  • Loading branch information
phillipivan authored Nov 30, 2024
2 parents c553e43 + 097a187 commit aff2149
Show file tree
Hide file tree
Showing 10 changed files with 2,566 additions and 2,220 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode/
.yarn/
node_modules/
package-lock.json
/pkg
Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
4 changes: 4 additions & 0 deletions companion/HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ The Action Recorder will translate any recieved tally or connected messages into

## Version History

### Version 1.2.3
- Use Node 22
- Update dependencies

### Version 1.2.2
- Better logging of recieved tally/connected messages

Expand Down
2 changes: 1 addition & 1 deletion companion/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"runtime": {
"type": "node18",
"type": "node22",
"api": "nodejs-ipc",
"apiVersion": "0.0.0",
"entrypoint": "../src/main.js"
Expand Down
14 changes: 14 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { generateEslintConfig } from '@companion-module/tools/eslint/config.mjs'

const baseConfig = await generateEslintConfig({})

const customConfig = [
...baseConfig,
{
languageOptions: {
sourceType: 'module',
},
},
]

export default customConfig
19 changes: 13 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
{
"name": "generic-swp02",
"version": "1.2.2",
"version": "1.2.3",
"main": "src/main.js",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --write",
"lint:raw": "eslint --ext .ts --ext .js --ignore-pattern dist --ignore-pattern pkg",
"lint": "yarn lint:raw ."
"lint:raw": "eslint",
"lint": "yarn lint:raw .",
"package": "yarn companion-module-build"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/bitfocus/companion-module-generic-swp02.git"
},
"dependencies": {
"@companion-module/base": "~1.8.0"
"@companion-module/base": "~1.11.2"
},
"devDependencies": {
"@companion-module/tools": "^1.5.1"
"@companion-module/tools": "^2.1.0",
"eslint": "^9.15.0",
"prettier": "^3.3.3"
},
"prettier": "@companion-module/tools/.prettierrc.json"
"prettier": "@companion-module/tools/.prettierrc.json",
"engines": {
"node": "^22.11"
},
"packageManager": "[email protected]"
}
2 changes: 1 addition & 1 deletion src/feedbacks.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default async function (self) {
if (isNaN(dst) || dst < 0 || dst > self.config.dst) {
self.log(
'warn',
`feedback:checkCrosspoint:callback - invalid dest provided ${dst} from ${feedback.options.dst}`
`feedback:checkCrosspoint:callback - invalid dest provided ${dst} from ${feedback.options.dst}`,
)
return undefined
} else if (dst === 0) {
Expand Down
14 changes: 7 additions & 7 deletions src/processcmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function processCmd(chunk) {
if (reply.length != msgLength.interrogate) {
this.log(
'warn',
` Interrogate. Unexpected Length. Expected: ${msgLength.interrogate} Recieved: ${reply.length}`
` Interrogate. Unexpected Length. Expected: ${msgLength.interrogate} Recieved: ${reply.length}`,
)
return undefined
}
Expand Down Expand Up @@ -58,7 +58,7 @@ export function processCmd(chunk) {
actionId: 'connect',
options: { dst: dstSrc[0], src: dstSrc[1] },
},
`connect ${dstSrc[0]}`
`connect ${dstSrc[0]}`,
)
}
break
Expand Down Expand Up @@ -196,7 +196,7 @@ export function processCmd(chunk) {
if (reply.length != msgLength.dualControllerStatusResponse) {
this.log(
'warn',
` dualControllerStatusResponse. Unexpected Length. Expected: ${msgLength.dualControllerStatusResponse} Recieved: ${reply.length}`
` dualControllerStatusResponse. Unexpected Length. Expected: ${msgLength.dualControllerStatusResponse} Recieved: ${reply.length}`,
)
return undefined
}
Expand Down Expand Up @@ -246,7 +246,7 @@ export function processCmd(chunk) {
}
this.log(
'warn',
'unit unexpectedly returned a extendedTally/extendedConnected. this module does not handle extended commands'
'unit unexpectedly returned a extendedTally/extendedConnected. this module does not handle extended commands',
)
break
case cmd.extendedConnectOnGo:
Expand Down Expand Up @@ -275,7 +275,7 @@ export function processCmd(chunk) {
if (reply.length != msgLength.routerConfigurationRequest) {
this.log(
'warn',
`Unexpected Length. Expected: ${msgLength.routerConfigurationRequest} Recieved: ${reply.length}`
`Unexpected Length. Expected: ${msgLength.routerConfigurationRequest} Recieved: ${reply.length}`,
)
return undefined
}
Expand All @@ -285,7 +285,7 @@ export function processCmd(chunk) {
if (reply.length != msgLength.routerConfigurationResponse1) {
this.log(
'warn',
`Unexpected Length. Expected: ${msgLength.routerConfigurationResponse1} Recieved: ${reply.length}`
`Unexpected Length. Expected: ${msgLength.routerConfigurationResponse1} Recieved: ${reply.length}`,
)
return undefined
}
Expand All @@ -295,7 +295,7 @@ export function processCmd(chunk) {
if (reply.length != msgLength.routerConfigurationResponse2) {
this.log(
'warn',
`Unexpected Length. Expected: ${msgLength.routerConfigurationResponse2} Recieved: ${reply.length}`
`Unexpected Length. Expected: ${msgLength.routerConfigurationResponse2} Recieved: ${reply.length}`,
)
return undefined
}
Expand Down
Loading

0 comments on commit aff2149

Please sign in to comment.