Skip to content

Commit 36f5e32

Browse files
chore: update dependencies, fix lint issues (#32)
* chore: lint fixes + prettier * chore: version bump + changelog * chore: changelog
1 parent fdcbbaa commit 36f5e32

9 files changed

Lines changed: 209 additions & 236 deletions

File tree

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ blank_issues_enabled: false
22
contact_links:
33
- name: BUG OR FEATURE REQUEST FOR COMPANION ITSELF
44
url: https://github.com/bitfocus/companion/issues
5-
about: Report it against the companion itself, to get the relevant people notified.
5+
about: Report it against the companion itself, to get the relevant people notified.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ nodeLinker: node-modules
22
enableScripts: false
33
npmMinimalAgeGate: 3d
44
npmPreapprovedPackages:
5-
- "@companion-module/*"
5+
- '@companion-module/*'

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ For more information see [HELP.md](./companion/HELP.md) and [LICENSE](./LICENSE)
99

1010
## Version History
1111

12+
### 1.0.3 (2026-07-221)
13+
14+
- fix: preset text color defaulting to black
15+
- chore: update dependencies
16+
1217
### 1.0.2 (2025-09-28)
1318

1419
- fix: module config unable to load

actions.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const { splice } = require('./upgrades')
2-
31
module.exports = function (self) {
42
self.setActionDefinitions({
53
insertData: {

feedbacks.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const { combineRgb } = require('@companion-module/base')
2-
31
module.exports = async function (self) {
42
self.setFeedbackDefinitions({
53
modifier: {

main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
const { InstanceBase, Regex, runEntrypoint, InstanceStatus } = require('@companion-module/base')
1+
const { InstanceBase, runEntrypoint, InstanceStatus } = require('@companion-module/base')
22
const UpgradeScripts = require('./upgrades')
33
const UpdateActions = require('./actions')
44
const UpdateFeedbacks = require('./feedbacks')
55
const UpdateVariableDefinitions = require('./variables')
66
const UpdatePresetDefinitions = require('./presets')
7-
const { format, escape } = require('string-kit')
7+
const { format } = require('string-kit')
88
const numfmt = require('numfmt')
99

1010
class DataEntryInstance extends InstanceBase {
@@ -290,13 +290,13 @@ class DataEntryInstance extends InstanceBase {
290290
buildRegex(string) {
291291
const parts = string.match(/^\/(.+)\/([gmiyusvd]?)$/)
292292
if (parts === null) {
293-
return new RegExp('^\b$') // if input is not a valid regexp, return valid regexp which never matches
293+
return /(?!)/ // if input is not a valid regexp, return valid regexp which never matches
294294
} else {
295295
try {
296296
return new RegExp(parts[1], parts[2])
297297
} catch (error) {
298298
this.log('error', `Cannot compile regular expression from "${string}", ${error.message}`)
299-
return new RegExp('^\b$')
299+
return /(?!)/
300300
}
301301
}
302302
}
@@ -416,7 +416,7 @@ class DataEntryInstance extends InstanceBase {
416416
} else {
417417
let locstr = locale[0]
418418
locstr = locstr.replaceAll('}{', '|')
419-
locstr = locstr.replaceAll(/[\{\}]/g, '')
419+
locstr = locstr.replaceAll(/[{}]/g, '')
420420
let locales = locstr.split('|')
421421

422422
if (locales.length === 1) {

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "companion-module-generic-dataentry",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"main": "main.js",
55
"scripts": {
66
"lint": "eslint .",
@@ -14,14 +14,14 @@
1414
"url": "git+https://github.com/bitfocus/companion-module-generic-dataentry.git"
1515
},
1616
"dependencies": {
17-
"@companion-module/base": "~1.12.0",
17+
"@companion-module/base": "~1.12.1",
1818
"numfmt": "^2.5.2",
1919
"string-kit": "^0.17.10"
2020
},
2121
"devDependencies": {
22-
"@companion-module/tools": "^2.6.1",
23-
"eslint": "^9.0.0",
24-
"prettier": "^3.3.3"
22+
"@companion-module/tools": "^2.7.2",
23+
"eslint": "^9.39.5",
24+
"prettier": "^3.9.6"
2525
},
2626
"prettier": "@companion-module/tools/.prettierrc.json",
2727
"packageManager": "yarn@4.10.3"

presets.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ module.exports = function (self) {
1313
data3type = false,
1414
feedbacks = [],
1515
desc = '',
16-
size = '44',
17-
button = ''
16+
size = '44'
1817
if (Array.isArray(opt)) {
1918
data0 = opt[0].toString()
2019
desc = data0
@@ -63,7 +62,6 @@ module.exports = function (self) {
6362
} else if (typeof opt === 'object') {
6463
data0 = opt.data0
6564
desc = opt.desc || data0
66-
button = opt.button || data0
6765
if (opt.size) size = opt.size.toString()
6866
} else {
6967
data0 = opt.toString()

0 commit comments

Comments
 (0)