Repository: electron/electron-packager
Pull request #1407 (2022-08-23 21:24:00)

fix(types): add "universal" as a valid arch
<!--
Thanks for filing a pull request!
Please check off all of the steps as they are completed by replacing [ ] with [x].
-->

* [x] I have read the [contribution documentation](https://github.com/electron/electron-packager/blob/main/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project follows, as appropriate.
* [x] The changes are appropriately documented (if applicable).
* [x] The changes have sufficient test coverage (if applicable).
* [ ] The testsuite passes successfully on my local machine (if applicable).

**Summarize your changes:**

Adds a missing typing in https://github.com/electron/electron-packager/pull/1346.



codecov[bot]: # [Codecov](https://codecov.io/gh/electron/electron-packager/pull/1407?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=electron) Report
> Merging [#1407](https://codecov.io/gh/electron/electron-packager/pull/1407?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=electron) (adad5aa) into [main](https://codecov.io/gh/electron/electron-packager/commit/0d692d7b4d157973d0f04fb1c87dce30b6914150?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=electron) (0d692d7) will **decrease** coverage by `0.77%`.
> The diff coverage is `n/a`.

```diff
@@            Coverage Diff             @@
##             main    #1407      +/-   ##
==========================================
- Coverage   95.61%   94.84%   -0.78%     
==========================================
  Files          15       15              
  Lines         776      776              
==========================================
- Hits          742      736       -6     
- Misses         34       40       +6     
```


| [Impacted Files](https://codecov.io/gh/electron/electron-packager/pull/1407?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=electron) | Coverage Δ | |
|---|---|---|
| [src/mac.js](https://codecov.io/gh/electron/electron-packager/pull/1407/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=electron#diff-c3JjL21hYy5qcw==) | `97.09% <0.00%> (-2.91%)` | :arrow_down: |
| [src/copy-filter.js](https://codecov.io/gh/electron/electron-packager/pull/1407/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=electron#diff-c3JjL2NvcHktZmlsdGVyLmpz) | `97.95% <0.00%> (-2.05%)` | :arrow_down: |

:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=electron)

malept: Add to typing tests?

Patch:
diff --git a/package.json b/package.json
index 78b8a06..88ced71 100644
--- a/package.json
+++ b/package.json
@@ -62,7 +62,7 @@
     "pkg-up": "^3.0.1",
     "sinon": "^14.0.0",
     "tsd": "^0.14.0",
-    "typedoc": "^0.19.0",
+    "typedoc": "^0.23.14",
     "typescript": "^4.0.2"
   },
   "engines": {
diff --git a/src/index.d.ts b/src/index.d.ts
index 492b51c..0010ffd 100644
--- a/src/index.d.ts
+++ b/src/index.d.ts
@@ -52,7 +52,7 @@ declare namespace electronPackager {
    * Architectures that have been supported by the official Electron prebuilt binaries, past
    * and present.
    */
-  type OfficialArch = 'ia32' | 'x64' | 'armv7l' | 'arm64' | 'mips64el';
+  type OfficialArch = 'ia32' | 'x64' | 'armv7l' | 'arm64' | 'mips64el' | 'universal';
   /**
    * Platforms that have been supported by the official Electron prebuilt binaries, past and present.
    */


Test patch:
diff --git a/test/index.test-d.ts b/test/index.test-d.ts
index bc5f52f..fc88e6c 100644
--- a/test/index.test-d.ts
+++ b/test/index.test-d.ts
@@ -49,6 +49,17 @@ await packager({
   },
 });
 
+await packager({
+  dir: '.',
+  name: 'myapplication',
+  platform: 'darwin',
+  arch: 'universal',
+  electronVersion: '20.0.0',
+  osxUniversal: {
+    mergeASARs: true
+  }
+});
+
 await packager({
   dir: '.',
   name: 'myapplication',