@companion-module/tools 2.0.1 → 2.0.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 +14 -0
- package/package.json +6 -6
- package/scripts/build.js +7 -4
- package/scripts/check.js +4 -0
- package/scripts/generate-manifest.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.3](https://github.com/bitfocus/companion-module-tools/compare/v2.0.2...v2.0.3) (2024-09-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* update `zx` and another try at `webpack` invocation on windows ([8973b61](https://github.com/bitfocus/companion-module-tools/commit/8973b613f4ae1fd07eaae88a8c9b3e963fd7f62b))
|
|
9
|
+
|
|
10
|
+
## [2.0.2](https://github.com/bitfocus/companion-module-tools/compare/v2.0.1...v2.0.2) (2024-09-08)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* build script bad webpack path for some projects ([a35529b](https://github.com/bitfocus/companion-module-tools/commit/a35529b042ff0a93dc281da2a85ef77ff002b503))
|
|
16
|
+
|
|
3
17
|
## [2.0.1](https://github.com/bitfocus/companion-module-tools/compare/v2.0.0...v2.0.1) (2024-09-08)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@companion-module/tools",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"webpack.*"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@eslint/js": "^9.
|
|
29
|
+
"@eslint/js": "^9.10.0",
|
|
30
30
|
"eslint-config-prettier": "^9.1.0",
|
|
31
31
|
"eslint-plugin-n": "^17.10.2",
|
|
32
32
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"tar": "^7.4.3",
|
|
36
36
|
"webpack": "^5.94.0",
|
|
37
37
|
"webpack-cli": "^5.1.4",
|
|
38
|
-
"zx": "^
|
|
38
|
+
"zx": "^8.1.6"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@companion-module/base": "^1.7.1",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@types/eslint": "^9.6.
|
|
59
|
-
"eslint": "^9.
|
|
58
|
+
"@types/eslint": "^9.6.1",
|
|
59
|
+
"eslint": "^9.10.0",
|
|
60
60
|
"prettier": "^3.3.3",
|
|
61
|
-
"typescript-eslint": "^8.
|
|
61
|
+
"typescript-eslint": "^8.5.0"
|
|
62
62
|
},
|
|
63
63
|
"packageManager": "yarn@4.4.1"
|
|
64
64
|
}
|
package/scripts/build.js
CHANGED
|
@@ -9,6 +9,10 @@ import * as tar from 'tar'
|
|
|
9
9
|
import { validateManifest } from '@companion-module/base'
|
|
10
10
|
import { createRequire } from 'module'
|
|
11
11
|
|
|
12
|
+
if (process.platform === 'win32') {
|
|
13
|
+
usePowerShell() // to enable powershell
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
const require = createRequire(import.meta.url)
|
|
13
17
|
|
|
14
18
|
async function findModuleDir(cwd) {
|
|
@@ -44,9 +48,8 @@ for (const [k, v] of Object.entries(webpackArgs)) {
|
|
|
44
48
|
// build the code
|
|
45
49
|
$.cwd = toolsDir
|
|
46
50
|
const webpackConfig = path.join(toolsDir, 'webpack.config.cjs').replace(/\\/g, '/') // Fix slashes because windows is a pain
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
await $`${webpackPath} -c ${webpackConfig} ${webpackArgsArray}`
|
|
51
|
+
// use npx to invoke. manual paths does not work on windows, and using `yarn` requires corepack
|
|
52
|
+
await $`npx webpack -c ${webpackConfig} ${webpackArgsArray}`
|
|
50
53
|
$.cwd = undefined
|
|
51
54
|
|
|
52
55
|
// copy in the metadata
|
|
@@ -182,6 +185,6 @@ await tar
|
|
|
182
185
|
{
|
|
183
186
|
gzip: true,
|
|
184
187
|
},
|
|
185
|
-
['pkg']
|
|
188
|
+
['pkg'],
|
|
186
189
|
)
|
|
187
190
|
.pipe(fs.createWriteStream('pkg.tgz'))
|
package/scripts/check.js
CHANGED
|
@@ -8,6 +8,10 @@ import { findUp } from 'find-up'
|
|
|
8
8
|
import { validateManifest } from '@companion-module/base'
|
|
9
9
|
import { createRequire } from 'module'
|
|
10
10
|
|
|
11
|
+
if (process.platform === 'win32') {
|
|
12
|
+
usePowerShell() // to enable powershell
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
const require = createRequire(import.meta.url)
|
|
12
16
|
|
|
13
17
|
async function findModuleDir(cwd) {
|
|
@@ -5,6 +5,10 @@ import 'zx/globals'
|
|
|
5
5
|
import { fs, path, $ } from 'zx'
|
|
6
6
|
import parseAuthor from 'parse-author'
|
|
7
7
|
|
|
8
|
+
if (process.platform === 'win32') {
|
|
9
|
+
usePowerShell() // to enable powershell
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
if (await fs.pathExists('companion/manifest.json')) {
|
|
9
13
|
throw new Error('Manifest has already been created')
|
|
10
14
|
}
|