@companion-module/tools 2.2.2 → 2.2.3

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.2.3](https://github.com/bitfocus/companion-module-tools/compare/v2.2.2...v2.2.3) (2025-04-12)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * sanitise output filename ([cb07027](https://github.com/bitfocus/companion-module-tools/commit/cb0702738632da68ccd651f96f72ff038c30f3a1))
9
+
3
10
  ## [2.2.2](https://github.com/bitfocus/companion-module-tools/compare/v2.2.1...v2.2.2) (2025-03-09)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companion-module/tools",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
package/scripts/build.js CHANGED
@@ -23,6 +23,10 @@ if (argv.help) {
23
23
  process.exit(0)
24
24
  }
25
25
 
26
+ function toSanitizedDirname(name) {
27
+ return name.replace(/[^a-zA-Z0-9-\.]/g, '-').replace(/[-+]/g, '-')
28
+ }
29
+
26
30
  const require = createRequire(import.meta.url)
27
31
 
28
32
  async function findModuleDir(cwd) {
@@ -201,7 +205,7 @@ if (Object.keys(packageJson.dependencies).length) {
201
205
  }
202
206
 
203
207
  // Create tgz of the build
204
- let tgzFile = `${manifestJson.name}-${manifestJson.version}`
208
+ let tgzFile = toSanitizedDirname(`${manifestJson.id}-${manifestJson.version}`)
205
209
  if (typeof argv['output'] === 'string') {
206
210
  // -o flag, to allow legacy behaviour creating pkg.tgz output
207
211
  tgzFile = argv['output']