@companion-module/tools 2.4.0 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/package.json +64 -64
- package/scripts/build.js +30 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.4.2](https://github.com/bitfocus/companion-module-tools/compare/v2.4.1...v2.4.2) (2025-10-18)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* prune some unnecessary native prebuilt binaries from packages ([f943056](https://github.com/bitfocus/companion-module-tools/commit/f943056f8175c6a8f1619725d5f55e32991064f5))
|
|
9
|
+
|
|
10
|
+
## [2.4.1](https://github.com/bitfocus/companion-module-tools/compare/v2.4.0...v2.4.1) (2025-09-28)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* update release-please and provenance generation ([15a5393](https://github.com/bitfocus/companion-module-tools/commit/15a539300373fd0e26a0eb7c3b2b500e5c90a4b4))
|
|
16
|
+
|
|
3
17
|
## [2.4.0](https://github.com/bitfocus/companion-module-tools/compare/v2.3.0...v2.4.0) (2025-09-04)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
2
|
+
"name": "@companion-module/tools",
|
|
3
|
+
"version": "2.4.2",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/bitfocus/companion-module-tools.git"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"companion-generate-manifest": "scripts/generate-manifest.js",
|
|
13
|
+
"companion-module-build": "scripts/build.js",
|
|
14
|
+
"companion-module-check": "scripts/check.js"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": "^18.18 || ^22.18"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"eslint",
|
|
21
|
+
"scripts",
|
|
22
|
+
"tsconfig",
|
|
23
|
+
".prettierrc.json",
|
|
24
|
+
"index.js",
|
|
25
|
+
"CHANGELOG.md",
|
|
26
|
+
"webpack.*"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@eslint/js": "^9.36.0",
|
|
30
|
+
"eslint-config-prettier": "^10.1.8",
|
|
31
|
+
"eslint-plugin-n": "^17.23.1",
|
|
32
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
33
|
+
"find-up": "^7.0.0",
|
|
34
|
+
"parse-author": "^2.0.0",
|
|
35
|
+
"semver": "^7.7.2",
|
|
36
|
+
"tar": "^7.5.1",
|
|
37
|
+
"webpack": "^5.101.3",
|
|
38
|
+
"webpack-cli": "^6.0.1",
|
|
39
|
+
"zx": "^8.8.4"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@companion-module/base": "^1.12.0",
|
|
43
|
+
"eslint": "^9.36.0",
|
|
44
|
+
"prettier": "^3.6.2",
|
|
45
|
+
"typescript-eslint": "^8.44.1"
|
|
46
|
+
},
|
|
47
|
+
"peerDependenciesMeta": {
|
|
48
|
+
"eslint": {
|
|
49
|
+
"optional": true
|
|
50
|
+
},
|
|
51
|
+
"prettier": {
|
|
52
|
+
"optional": true
|
|
53
|
+
},
|
|
54
|
+
"typescript-eslint": {
|
|
55
|
+
"optional": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@types/eslint": "^9.6.1",
|
|
60
|
+
"eslint": "^9.36.0",
|
|
61
|
+
"prettier": "^3.6.2",
|
|
62
|
+
"typescript-eslint": "^8.44.1"
|
|
63
|
+
},
|
|
64
|
+
"packageManager": "yarn@4.10.3"
|
|
65
|
+
}
|
package/scripts/build.js
CHANGED
|
@@ -142,9 +142,9 @@ if (fs.existsSync(webpackExtPath)) {
|
|
|
142
142
|
|
|
143
143
|
for (const lib of webpackExt.prebuilds) {
|
|
144
144
|
const srcDir = await findModuleDir(require.resolve(lib))
|
|
145
|
-
const
|
|
146
|
-
for (const
|
|
147
|
-
await fs.copy(path.join(srcDir, 'prebuilds',
|
|
145
|
+
const filesOrDirs = await fs.readdir(path.join(srcDir, 'prebuilds'))
|
|
146
|
+
for (const fileOrDir of filesOrDirs) {
|
|
147
|
+
await fs.copy(path.join(srcDir, 'prebuilds', fileOrDir), path.join(packageBaseDir, 'prebuilds', fileOrDir))
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
@@ -204,6 +204,33 @@ if (Object.keys(packageJson.dependencies).length) {
|
|
|
204
204
|
await $`yarn --cwd ${packageBaseDir} install --no-immutable`
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
// Prune any excessive prebuilds
|
|
208
|
+
const prebuildDirName = path.join(packageBaseDir, 'prebuilds')
|
|
209
|
+
if (fs.existsSync(prebuildDirName)) {
|
|
210
|
+
const prebuildDirs = await fs.readdir(prebuildDirName)
|
|
211
|
+
for (const dir of prebuildDirs) {
|
|
212
|
+
let keepDir = true
|
|
213
|
+
if (dir.match(/freebsd/) || dir.match(/android/)) {
|
|
214
|
+
// Unsupported platforms
|
|
215
|
+
keepDir = false
|
|
216
|
+
} else if (dir.match(/win32-ia32/)) {
|
|
217
|
+
// 32bit windows is not supported
|
|
218
|
+
keepDir = false
|
|
219
|
+
} else if (dir.match(/linux(.+)musl/)) {
|
|
220
|
+
// linux musl is not supported
|
|
221
|
+
keepDir = false
|
|
222
|
+
} else if (dir.match(/linux-arm$/) || dir.match(/linux-arm-gnueabihf/)) {
|
|
223
|
+
// linux arm (non arm64) is not supported
|
|
224
|
+
keepDir = false
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (!keepDir) {
|
|
228
|
+
console.log('Removing unneeded prebuild dir:', dir)
|
|
229
|
+
await fs.rm(path.join(prebuildDirName, dir), { recursive: true, force: true })
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
207
234
|
// Create tgz of the build
|
|
208
235
|
let tgzFile = toSanitizedDirname(`${manifestJson.id}-${manifestJson.version}`)
|
|
209
236
|
if (typeof argv['output'] === 'string') {
|