@companion-module/tools 1.4.4 → 1.5.1

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,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.5.1](https://github.com/bitfocus/companion-module-tools/compare/v1.5.0...v1.5.1) (2024-06-20)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * don't expand `extraFiles` directories when copying ([6ad1d43](https://github.com/bitfocus/companion-module-tools/commit/6ad1d43f6a83fa44ea2014fbe357f0ab1687ea0f))
9
+
10
+ ## [1.5.0](https://github.com/bitfocus/companion-module-tools/compare/v1.4.4...v1.5.0) (2024-02-08)
11
+
12
+
13
+ ### Features
14
+
15
+ * add option to force node-gyp to not be included in the build package ([838bb52](https://github.com/bitfocus/companion-module-tools/commit/838bb52c7c885adec12d8cf240a2b0e6955c6280))
16
+
3
17
  ## [1.4.4](https://github.com/bitfocus/companion-module-tools/compare/v1.4.3...v1.4.4) (2024-02-08)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companion-module/tools",
3
- "version": "1.4.4",
3
+ "version": "1.5.1",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  "find-up": "^7.0.0",
33
33
  "parse-author": "^2.0.0",
34
34
  "prettier": "^2.8.8",
35
- "tar": "^6.2.0",
35
+ "tar": "^6.2.1",
36
36
  "webpack": "^5.90.0",
37
37
  "webpack-cli": "^5.1.4",
38
38
  "zx": "^7.2.3"
package/scripts/build.js CHANGED
@@ -100,6 +100,12 @@ if (fs.existsSync(webpackExtPath)) {
100
100
  }
101
101
  }
102
102
 
103
+ if (webpackExt.forceRemoveNodeGypFromPkg) {
104
+ packageJson.resolutions = {
105
+ 'node-gyp': 'npm:empty-npm-package@1.0.0',
106
+ }
107
+ }
108
+
103
109
  // Copy across any prebuilds that can be loaded corectly
104
110
  if (webpackExt.prebuilds) {
105
111
  await fs.mkdir('pkg/prebuilds')
@@ -115,7 +121,11 @@ if (fs.existsSync(webpackExtPath)) {
115
121
 
116
122
  // copy extra files
117
123
  if (Array.isArray(webpackExt.extraFiles)) {
118
- const files = await globby(webpackExt.extraFiles)
124
+ const files = await globby(webpackExt.extraFiles, {
125
+ expandDirectories: false,
126
+ onlyFiles: false,
127
+ })
128
+
119
129
  for (const file of files) {
120
130
  await fs.copy(file, path.join('pkg', path.basename(file)), {
121
131
  overwrite: false,