@companion-module/tools 0.0.2 → 0.2.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 CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.0](https://github.com/bitfocus/companion-module-tools/compare/v0.1.1...v0.2.0) (2022-09-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * update @companion-module/base ([97742a5](https://github.com/bitfocus/companion-module-tools/commit/97742a58a71e09a93988f0288e661bd5171f14ba))
9
+
10
+ ## [0.1.1](https://github.com/bitfocus/companion-module-tools/compare/v0.1.0...v0.1.1) (2022-07-21)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * don't rename modules ([0d35f51](https://github.com/bitfocus/companion-module-tools/commit/0d35f510cf24333b753d8b34a5c4af27623fcaed))
16
+
17
+ ## [0.1.0](https://github.com/bitfocus/companion-module-tools/compare/v0.0.2...v0.1.0) (2022-07-12)
18
+
19
+
20
+ ### Features
21
+
22
+ * add runtime.apiVersion to manifest ([b42703b](https://github.com/bitfocus/companion-module-tools/commit/b42703b5bac6e2cb6addc8e71239c24e26c43b90))
23
+ * remove husky & lint-staged ([7b71d84](https://github.com/bitfocus/companion-module-tools/commit/7b71d84cb8850242846d5118f651fd7ae129615c))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * set `importHelpers: false` for recommended tsconfig ([1b04d89](https://github.com/bitfocus/companion-module-tools/commit/1b04d89bc50922466dffb416b4ed3b4acf63be71))
29
+ * set version field in manifest when generating pkg.tgz ([b42703b](https://github.com/bitfocus/companion-module-tools/commit/b42703b5bac6e2cb6addc8e71239c24e26c43b90))
30
+ * update @companion-module/base ([33df2a6](https://github.com/bitfocus/companion-module-tools/commit/33df2a61796954c30c01e25a5f08a2a1bd874e64))
31
+
3
32
  ## [0.0.2](https://github.com/bitfocus/companion-module-tools/compare/v0.0.1...v0.0.2) (2022-07-10)
4
33
 
5
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companion-module/tools",
3
- "version": "0.0.2",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
@@ -18,22 +18,20 @@
18
18
  "webpack.*"
19
19
  ],
20
20
  "dependencies": {
21
- "@typescript-eslint/eslint-plugin": "^5.30.5",
22
- "@typescript-eslint/parser": "^5.30.5",
23
- "eslint": "^8.19.0",
21
+ "@typescript-eslint/eslint-plugin": "^5.36.1",
22
+ "@typescript-eslint/parser": "^5.36.1",
23
+ "eslint": "^8.23.0",
24
24
  "eslint-config-prettier": "^8.5.0",
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
- "webpack": "^5.73.0",
30
+ "webpack": "^5.74.0",
33
31
  "webpack-cli": "^4.10.0",
34
32
  "zx": "^4.3.0"
35
33
  },
36
34
  "peerDependencies": {
37
- "@companion-module/base": "^0.0.3"
35
+ "@companion-module/base": "^0.2.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
@@ -36,20 +36,21 @@ if (Array.isArray(pkgJson.contributors)) {
36
36
  }
37
37
 
38
38
  const manifest = {
39
- id: `bitfocus.${pkgJson.name}`,
39
+ id: pkgJson.name,
40
40
  name: pkgJson.name,
41
41
  shortname: pkgJson.shortname ?? pkgJson.name,
42
42
  description: pkgJson.description ?? pkgJson.name,
43
- version: pkgJson.version ?? '0.0.0',
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`,
47
47
  maintainers: maintainers,
48
- legacyIds: [...(pkgJson.legacy || []), pkgJson.name],
48
+ legacyIds: [...(pkgJson.legacy || [])],
49
49
 
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
@@ -9,7 +9,7 @@
9
9
  "*": ["../node_modules/*"]
10
10
  },
11
11
  "declaration": false,
12
- "importHelpers": true,
12
+ "importHelpers": false,
13
13
  "listFiles": false,
14
14
  "traceResolution": false,
15
15
  "pretty": true,