nw-builder 4.18.1 → 4.19.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/README.md CHANGED
@@ -234,7 +234,7 @@ This object defines additional properties used for building for a specific platf
234
234
  | `productName` | `string` | `name` in NW.js manifest | Name of the product with which the file is distributed. This string is required. |
235
235
  | `productVersion` | `string` | Value of `version` in NW.js manifest | Version of the product with which the file is distributed—for example, 3.10 or 5.00.RC2. |
236
236
  | `specialBuild` | `string` | `undefined` | Text that specifies how this version of the file differs from the standard version—for example, Private build for TESTER1 solving mouse problems on M250 and M250E computers. |
237
- | `languageCode` | `number` | `1033` | Language of the file, defined by Microsoft, see: https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/6c085406-a698-4e12-9d4d-c3b0ee3dbc4a |
237
+ | `languageCode` | `number` | `1033` | Language of the file, defined by Microsoft, see [MS-OE376](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376)6c085406-a698-4e12-9d4d-c3b0ee3dbc4a |
238
238
 
239
239
  #### Linux-specific options (`LinuxRc`)
240
240
 
@@ -265,19 +265,20 @@ This object defines additional properties used for building for a specific platf
265
265
 
266
266
  #### MacOS-specific options (`OsxRc`)
267
267
 
268
- | Name | Type | Description |
269
- | ------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------- |
270
- | name | `string` | The name of the application |
271
- | icon | `string` | The path to the icon file. It should be a .icns file. (**WARNING**: Please define the icon in the NW.js manifest instead) |
272
- | LSApplicationCategoryType | `string` | The category that best describes your app for the App Store. |
273
- | CFBundleIdentifier | `string` | A unique identifier for a bundle usually in reverse DNS format. |
274
- | CFBundleName | `string` | A user-visible short name for the bundle. |
275
- | CFBundleDisplayName | `string` | The user-visible name for the bundle. |
276
- | CFBundleSpokenName | `string` | A replacement for the app name in text-to-speech operations. |
277
- | CFBundleVersion | `string` | The version of the build that identifies an iteration of the bundle. |
278
- | CFBundleShortVersionString | `string` | The release or version number of the bundle. |
279
- | NSHumanReadableCopyright | `string` | A human-readable copyright notice for the bundle. |
280
- | NSLocalNetworkUsageDescription | `string` | A human-readable description of why the application needs access to the local network. |
268
+ | Name | Type | Description |
269
+ | ------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------- |
270
+ | name | `string` | The name of the application |
271
+ | icon | `string` | The path to the icon file. It should be a .icns file. (**WARNING**: Please define the icon in the NW.js manifest instead) |
272
+ | LSApplicationCategoryType | `string` | The category that best describes your app for the App Store. |
273
+ | CFBundleIdentifier | `string` | A unique identifier for a bundle usually in reverse DNS format. |
274
+ | CFBundleName | `string` | A user-visible short name for the bundle. |
275
+ | CFBundleDisplayName | `string` | The user-visible name for the bundle. |
276
+ | CFBundleSpokenName | `string` | A replacement for the app name in text-to-speech operations. |
277
+ | CFBundleVersion | `string` | The version of the build that identifies an iteration of the bundle. |
278
+ | CFBundleShortVersionString | `string` | The release or version number of the bundle. |
279
+ | NSHumanReadableCopyright | `string` | A human-readable copyright notice for the bundle. |
280
+ | NSLocalNetworkUsageDescription | `string` | A human-readable description of why the application needs access to the local network. |
281
+ | LSFileQuarantineEnabled | `boolean` | A Boolean value indicating whether the files this app creates are quarantined by default. |
281
282
 
282
283
  ## Guides
283
284
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nw-builder",
3
- "version": "4.18.1",
3
+ "version": "4.19.0",
4
4
  "description": "Build NW.js desktop applications for MacOS, Windows and Linux.",
5
5
  "keywords": [
6
6
  "NW.js",
@@ -58,16 +58,16 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@eslint/js": "^10.0.1",
61
- "@vitest/coverage-v8": "^4.1.10",
61
+ "@vitest/coverage-v8": "^4.1.11",
62
62
  "base-volta-off-of-nwjs": "^1.0.5",
63
- "eslint": "^10.8.1",
64
- "eslint-plugin-jsdoc": "^64.2.0",
63
+ "eslint": "^10.9.1",
64
+ "eslint-plugin-jsdoc": "^64.2.1",
65
65
  "eslint-plugin-simple-import-sort": "^14.0.0",
66
66
  "globals": "^17.11.0",
67
- "nw": "^0.114.1",
67
+ "nw": "^0.115.0",
68
68
  "prettier": "^3.9.6",
69
69
  "selenium-webdriver": "^4.47.0",
70
- "vitest": "^4.0.14"
70
+ "vitest": "^4.1.11"
71
71
  },
72
72
  "dependencies": {
73
73
  "@nwutils/getter": "^0.2.5",
@@ -76,9 +76,9 @@
76
76
  "commander": "^15.0.0",
77
77
  "glob": "^13.0.6",
78
78
  "plist": "^5.0.0",
79
- "resedit": "^3.0.2",
79
+ "resedit": "^3.1.0",
80
80
  "semver": "^7.8.5",
81
- "tar": "^7.5.19"
81
+ "tar": "^7.5.22"
82
82
  },
83
83
  "volta": {
84
84
  "node": "26.7.0",
package/src/bld/osx.js CHANGED
@@ -12,12 +12,14 @@ import semver from "semver";
12
12
  * @param {string} helperName - Helper App Name
13
13
  * @param {string} helperId - Helper App ID
14
14
  * @param {string} appCFBundleIdentifier - options.app.CFBundleIdentifier
15
+ * @param {string} LSFileQuarantineEnabled - options.app.LSFileQuarantineEnabled
15
16
  */
16
17
  async function updateHelperPlist(
17
18
  plistPath,
18
19
  helperName,
19
20
  helperId,
20
21
  appCFBundleIdentifier,
22
+ LSFileQuarantineEnabled,
21
23
  ) {
22
24
  const plistFullPath = path.resolve(plistPath, "Contents/Info.plist");
23
25
  const plistJson = parse(await fs.promises.readFile(plistFullPath, "utf-8"));
@@ -25,7 +27,7 @@ async function updateHelperPlist(
25
27
  plistJson.CFBundleName = helperName;
26
28
  plistJson.CFBundleExecutable = helperName;
27
29
  plistJson.CFBundleIdentifier = `${appCFBundleIdentifier}.${helperId}`;
28
- plistJson.LSFileQuarantineEnabled = false;
30
+ plistJson.LSFileQuarantineEnabled = LSFileQuarantineEnabled;
29
31
  await fs.promises.writeFile(plistFullPath, build(plistJson));
30
32
  }
31
33
 
@@ -127,6 +129,7 @@ export default async function setOsxConfig({
127
129
  newHelperAppName.replace(/.app$/, ""),
128
130
  helperApp.id,
129
131
  app.CFBundleIdentifier,
132
+ app.LSFileQuarantineEnabled,
130
133
  );
131
134
  }
132
135
 
@@ -181,8 +184,8 @@ export default async function setOsxConfig({
181
184
  contentsInfoPlistJson.CFBundleExecutable = app.name;
182
185
  contentsInfoPlistJson.NSLocalNetworkUsageDescription =
183
186
  app.NSLocalNetworkUsageDescription;
184
- /* Workaround for https://github.com/nwjs/nw.js/issues/7646 */
185
- contentsInfoPlistJson.LSFileQuarantineEnabled = false;
187
+ /* See https://github.com/nwjs/nw.js/issues/7646 */
188
+ contentsInfoPlistJson.LSFileQuarantineEnabled = app.LSFileQuarantineEnabled;
186
189
 
187
190
  /* Remove properties that were not updated by the user. */
188
191
  Object.keys(contentsInfoPlistJson).forEach((option) => {
package/src/index.d.ts CHANGED
@@ -172,6 +172,8 @@ export interface OsxAppOptions {
172
172
  NSHumanReadableCopyright?: string;
173
173
  /** A human-readable description of why the application needs access to the local network. */
174
174
  NSLocalNetworkUsageDescription?: string;
175
+ /** A Boolean value indicating whether the files this app creates are quarantined by default. */
176
+ LSFileQuarantineEnabled?: boolean;
175
177
  }
176
178
 
177
179
  /**
package/src/util.js CHANGED
@@ -307,6 +307,7 @@ export const parse = async (options, pkg) => {
307
307
  options.app.NSHumanReadableCopyright ?? undefined;
308
308
  options.app.NSLocalNetworkUsageDescription =
309
309
  options.app.NSLocalNetworkUsageDescription ?? undefined;
310
+ options.app.LSFileQuarantineEnabled ?? false;
310
311
  }
311
312
 
312
313
  return { ...options };
@@ -684,6 +685,15 @@ export const validate = async (options, releaseInfo) => {
684
685
  options.app.NSLocalNetworkUsageDescription,
685
686
  );
686
687
  }
688
+ if (
689
+ options.app.LSFileQuarantineEnabled &&
690
+ typeof options.app.LSFileQuarantineEnabled !== "boolean"
691
+ ) {
692
+ throw new Error(
693
+ "Expected options.app.LSFileQuarantineEnabled to be a boolean. Got " +
694
+ options.app.LSFileQuarantineEnabled,
695
+ );
696
+ }
687
697
  } else {
688
698
  if (typeof options.app.name !== "string") {
689
699
  throw new Error(