nw-builder 4.13.16 → 4.14.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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/package.json +9 -9
  3. package/src/cli.js +22 -10
package/README.md CHANGED
@@ -375,6 +375,7 @@ nwbuild({
375
375
  - A commit's body should have a description of changes in bullet points followed by any links it references or issues it fixes or closes.
376
376
  - Google's Release Please Action is used to update the changelog, bump the package version and generate GitHub releases.
377
377
  - NPM Publish Action publishes to `npm` if there is a version bump.
378
+ - Every time `nw` is upgraded, the `volta` package should also be updated and `nw-builder` should create a minor release (since the underlying Node version is changed).
378
379
 
379
380
  ## Roadmap
380
381
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nw-builder",
3
- "version": "4.13.16",
3
+ "version": "4.14.0",
4
4
  "description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
5
5
  "keywords": [
6
6
  "NW.js",
@@ -52,25 +52,25 @@
52
52
  "demo:exe:linux": "./tests/fixtures/out/linux/Demo",
53
53
  "demo:exe:osx": "./tests/fixtures/out/osx/Demo.app/Contents/MacOS/Demo",
54
54
  "demo:exe:win": "./tests/fixtures/out/win/Demo.exe",
55
- "demo:cli": "nwbuild --mode=get --flavor=sdk --glob=false --cacheDir=./node_modules/nw --logLevel=debug './tests/fixtures/app'"
55
+ "demo:cli": "nwbuild --mode=build --flavor=sdk --glob=false --cacheDir=./node_modules/nw --logLevel=debug --outDir=./tests/fixtures/out/linux --app.name=Demo --app.icon=./tests/fixtures/app/icon.png ./tests/fixtures/app"
56
56
  },
57
57
  "devDependencies": {
58
- "@eslint/js": "^9.30.1",
58
+ "@eslint/js": "^9.32.0",
59
59
  "@vitest/coverage-v8": "^3.2.4",
60
60
  "base-volta-off-of-nwjs": "^1.0.5",
61
- "eslint": "^9.30.1",
62
- "eslint-plugin-jsdoc": "^51.3.4",
61
+ "eslint": "^9.32.0",
62
+ "eslint-plugin-jsdoc": "^52.0.2",
63
63
  "globals": "^16.3.0",
64
- "nw": "^0.101.2",
64
+ "nw": "^0.102.0",
65
65
  "selenium-webdriver": "^4.34.0",
66
66
  "vitest": "^3.0.7"
67
67
  },
68
68
  "dependencies": {
69
69
  "archiver": "^7.0.1",
70
- "axios": "^1.10.0",
70
+ "axios": "^1.11.0",
71
71
  "commander": "^14.0.0",
72
72
  "glob": "^11.0.3",
73
- "node-gyp": "^11.2.0",
73
+ "node-gyp": "^11.3.0",
74
74
  "plist": "^3.1.0",
75
75
  "resedit": "^2.0.3",
76
76
  "semver": "^7.7.2",
@@ -79,6 +79,6 @@
79
79
  },
80
80
  "volta": {
81
81
  "node": "24.3.0",
82
- "npm": "11.2.0"
82
+ "npm": "11.5.2"
83
83
  }
84
84
  }
package/src/cli.js CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import process from 'node:process';
4
-
5
4
  import { program } from 'commander';
6
5
 
7
6
  import nwbuild from './index.js';
@@ -19,19 +18,32 @@ program
19
18
  .option('--cacheDir <string>', 'Cache NW.js binaries', './cache')
20
19
  .option('--outDir <string>', 'NW.js build artifacts', './out')
21
20
  .option('--app <object>', 'Platform specific app metadata. Refer to docs for more info', {})
22
- .option('--cache <boolean>', 'Flag to enable/disable caching', true)
23
- .option('--ffmpeg <boolean>', 'Flag to enable/disable downloading community ffmpeg', false)
24
- .option('--glob <boolean>', 'Flag to enable/disable globbing', true)
21
+ .option('--cache <boolean>', 'Enable/disable caching', true)
22
+ .option('--ffmpeg <boolean>', 'Enable/disable community ffmpeg', false)
23
+ .option('--glob <boolean>', 'Enable/disable globbing', true)
25
24
  .option('--logLevel <string>', 'Specify log level', 'info')
26
- .option('--shaSum <string>', 'Flag to enable/disable shasum', true)
27
- .option('--zip <string>', 'Flag to enable/disable compression', false)
25
+ .option('--shaSum <string>', 'Enable/disable shasum', true)
26
+ .option('--zip <string>', 'Enable/disable compression', false)
28
27
  .option('--managedManifest <string>', 'Managed manifest mode', false)
29
28
  .option('--nodeAddon <boolean>', 'Download NW.js Node headers', false);
30
29
 
31
- program.parse();
30
+ // Handle unknown --app.* arguments
31
+ const unknownArgs = program.parseOptions(process.argv).unknown;
32
+ const appConfig = {};
33
+ for (const arg of unknownArgs) {
34
+ const match = arg.match(/^--app\.([^.=]+)=(.*)$/);
35
+ if (match) {
36
+ const [, key, value] = match;
37
+ appConfig[key] = value;
38
+ }
39
+ }
32
40
 
33
- nwbuild({
41
+ // Compose final options object
42
+ const opts = {
34
43
  ...program.opts(),
35
- srcDir: program.args.join(' '),
44
+ app: appConfig,
45
+ srcDir: program.args[0],
36
46
  cli: true,
37
- });
47
+ };
48
+
49
+ nwbuild(opts);