@companion-module/tools 1.3.2 → 1.4.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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.0](https://github.com/bitfocus/companion-module-tools/compare/v1.3.2...v1.4.0) (2023-08-22)
4
+
5
+
6
+ ### Features
7
+
8
+ * add option to disable minification. ([9f626f6](https://github.com/bitfocus/companion-module-tools/commit/9f626f69b82b9dc10b195ed076e01f794246f85b))
9
+
3
10
  ## [1.3.2](https://github.com/bitfocus/companion-module-tools/compare/v1.3.1...v1.3.2) (2023-06-20)
4
11
 
5
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companion-module/tools",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
@@ -25,17 +25,17 @@
25
25
  "dependencies": {
26
26
  "@typescript-eslint/eslint-plugin": "^5.59.9",
27
27
  "@typescript-eslint/parser": "^5.59.9",
28
- "eslint": "^8.42.0",
28
+ "eslint": "^8.47.0",
29
29
  "eslint-config-prettier": "^8.8.0",
30
- "eslint-plugin-n": "^16.0.0",
30
+ "eslint-plugin-n": "^16.0.2",
31
31
  "eslint-plugin-prettier": "^4.2.1",
32
32
  "find-up": "^6.3.0",
33
33
  "parse-author": "^2.0.0",
34
34
  "prettier": "^2.8.8",
35
35
  "tar": "^6.1.15",
36
- "webpack": "^5.86.0",
36
+ "webpack": "^5.88.2",
37
37
  "webpack-cli": "^5.1.4",
38
- "zx": "^7.2.2"
38
+ "zx": "^7.2.3"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@companion-module/base": "^1.4.1"
package/scripts/build.js CHANGED
@@ -31,7 +31,7 @@ console.log(`Framework path: ${frameworkDir}`)
31
31
  await fs.remove('pkg')
32
32
 
33
33
  const webpackArgs = {}
34
- if (argv.dev || argv.debug) webpackArgs['env']= 'dev'
34
+ if (argv.dev || argv.debug) webpackArgs['env'] = 'dev'
35
35
 
36
36
  const webpackArgsArray = []
37
37
  for (const [k, v] of Object.entries(webpackArgs)) {
@@ -140,16 +140,15 @@ if (webpackConfigJson.node?.__dirname === true) {
140
140
  if (dirPkgJson.dependencies?.['node-gyp-build'] && fs.existsSync(prebuildsDir)) {
141
141
  fs.mkdirpSync(path.join('pkg', thisPath))
142
142
  fs.copySync(prebuildsDir, path.join('pkg', prebuildsDir))
143
-
143
+
144
144
  console.log('copying node-gyp-build prebuilds from', thisPath)
145
145
  }
146
146
  }
147
147
  }
148
-
148
+
149
149
  copyNodeGypBuildPrebuilds('')
150
150
  }
151
151
 
152
-
153
152
  // Write the package.json
154
153
  // packageJson.bundleDependencies = Object.keys(packageJson.dependencies)
155
154
  await fs.writeFile('pkg/package.json', JSON.stringify(packageJson))
@@ -39,6 +39,9 @@ module.exports = async (env) => {
39
39
  experiments: {
40
40
  topLevelAwait: true,
41
41
  },
42
+ optimization: {
43
+ minimize: !webpackExt.disableMinifier,
44
+ },
42
45
  module: {
43
46
  rules: [
44
47
  // {
@@ -58,8 +61,10 @@ module.exports = async (env) => {
58
61
  // Let modules define additional plugins. Hopefully this won't conflict with anything we add
59
62
  ...(webpackExt.plugins || []),
60
63
  ],
61
- node: webpackExt.useOriginalStructureDirname ? {
62
- __dirname: true
63
- } : undefined,
64
+ node: webpackExt.useOriginalStructureDirname
65
+ ? {
66
+ __dirname: true,
67
+ }
68
+ : undefined,
64
69
  }
65
70
  }