@companion-module/tools 0.0.2 → 0.1.0
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 +15 -0
- package/package.json +2 -4
- package/scripts/build.js +5 -0
- package/scripts/generate-manifest.js +2 -1
- package/tsconfig/node14/recommended.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.0](https://github.com/bitfocus/companion-module-tools/compare/v0.0.2...v0.1.0) (2022-07-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add runtime.apiVersion to manifest ([b42703b](https://github.com/bitfocus/companion-module-tools/commit/b42703b5bac6e2cb6addc8e71239c24e26c43b90))
|
|
9
|
+
* remove husky & lint-staged ([7b71d84](https://github.com/bitfocus/companion-module-tools/commit/7b71d84cb8850242846d5118f651fd7ae129615c))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* set `importHelpers: false` for recommended tsconfig ([1b04d89](https://github.com/bitfocus/companion-module-tools/commit/1b04d89bc50922466dffb416b4ed3b4acf63be71))
|
|
15
|
+
* set version field in manifest when generating pkg.tgz ([b42703b](https://github.com/bitfocus/companion-module-tools/commit/b42703b5bac6e2cb6addc8e71239c24e26c43b90))
|
|
16
|
+
* update @companion-module/base ([33df2a6](https://github.com/bitfocus/companion-module-tools/commit/33df2a61796954c30c01e25a5f08a2a1bd874e64))
|
|
17
|
+
|
|
3
18
|
## [0.0.2](https://github.com/bitfocus/companion-module-tools/compare/v0.0.1...v0.0.2) (2022-07-10)
|
|
4
19
|
|
|
5
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@companion-module/tools",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,8 +25,6 @@
|
|
|
25
25
|
"eslint-plugin-node": "^11.1.0",
|
|
26
26
|
"eslint-plugin-prettier": "^4.2.1",
|
|
27
27
|
"find-up": "^6.3.0",
|
|
28
|
-
"husky": "^8.0.1",
|
|
29
|
-
"lint-staged": "^13.0.3",
|
|
30
28
|
"parse-author": "^2.0.0",
|
|
31
29
|
"prettier": "^2.7.1",
|
|
32
30
|
"webpack": "^5.73.0",
|
|
@@ -34,6 +32,6 @@
|
|
|
34
32
|
"zx": "^4.3.0"
|
|
35
33
|
},
|
|
36
34
|
"peerDependencies": {
|
|
37
|
-
"@companion-module/base": "^0.0
|
|
35
|
+
"@companion-module/base": "^0.1.0"
|
|
38
36
|
}
|
|
39
37
|
}
|
package/scripts/build.js
CHANGED
|
@@ -31,8 +31,13 @@ await $`yarn webpack -c ${webpackConfig}`
|
|
|
31
31
|
// copy in the metadata
|
|
32
32
|
await fs.copy('companion', 'pkg/companion')
|
|
33
33
|
|
|
34
|
+
const srcPackageJson = JSON.parse(await fs.readFile(path.resolve('./package.json')))
|
|
35
|
+
const frameworkPackageJson = JSON.parse(await fs.readFile(path.join(frameworkDir, 'package.json')))
|
|
36
|
+
|
|
34
37
|
const manifestJson = JSON.parse(await fs.readFile(path.resolve('./companion/manifest.json')))
|
|
35
38
|
manifestJson.runtime.entrypoint = '../main.js'
|
|
39
|
+
manifestJson.version = srcPackageJson.version
|
|
40
|
+
manifestJson.runtime.apiVersion = frameworkPackageJson.version
|
|
36
41
|
await fs.writeFile(path.resolve('./pkg/companion/manifest.json'), JSON.stringify(manifestJson))
|
|
37
42
|
|
|
38
43
|
// Generate a minimal package.json
|
|
@@ -40,7 +40,7 @@ const manifest = {
|
|
|
40
40
|
name: pkgJson.name,
|
|
41
41
|
shortname: pkgJson.shortname ?? pkgJson.name,
|
|
42
42
|
description: pkgJson.description ?? pkgJson.name,
|
|
43
|
-
version:
|
|
43
|
+
version: '0.0.0',
|
|
44
44
|
license: pkgJson.license,
|
|
45
45
|
repository: pkgJson.repository?.url ?? `https://github.com/bitfocus/companion-module-${pkgJson.name}.git`,
|
|
46
46
|
bugs: pkgJson.bugs?.url ?? `https://github.com/bitfocus/companion-module-${pkgJson.name}/issues`,
|
|
@@ -50,6 +50,7 @@ const manifest = {
|
|
|
50
50
|
runtime: {
|
|
51
51
|
type: 'node14',
|
|
52
52
|
api: 'socket.io',
|
|
53
|
+
apiVersion: '0.0.0',
|
|
53
54
|
|
|
54
55
|
entrypoint: path.join('../', pkgJson.main || 'index.js'),
|
|
55
56
|
// universal: boolean
|