Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add electron/utility module for utility process #246

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

devm33
Copy link
Contributor

@devm33 devm33 commented Oct 4, 2023

This adds a 'electron/utility' module for modules available to the utility process.

This PR depends on electron/docs-parser#95 in order to add the ProcessBlock.utility property.

Opting to make the change in a minimal way to not interfere with the main+renderer=common logic and just add the additional Utility with just the minimal set of exports available to the utility process.

See electron/electron#40017 for an example of adding new API to the utility process that will need this change.

@devm33
Copy link
Contributor Author

devm33 commented Oct 11, 2023

@MarshallOfSound or @dsanders11 would you be able to review this as a follow up to electron/docs-parser#95 Thanks!

@devm33
Copy link
Contributor Author

devm33 commented Oct 17, 2023

Thanks for reviewing @dsanders11! Would you be able to merge and deploy this change so I can use it in electron/electron#40017

@dsanders11 dsanders11 merged commit 7a1aef3 into electron:main Oct 17, 2023
3 checks passed
@continuous-auth
Copy link

🎉 This PR is included in version 8.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@devm33 devm33 deleted the devm33/utility branch October 17, 2023 20:05
devm33 added a commit to devm33/electron that referenced this pull request Oct 17, 2023
devm33 added a commit to devm33/electron that referenced this pull request Oct 18, 2023
Upgrades docs-parser and typescript-definitions to add new
'electron/utility' namespace added in:
electron/docs-parser#95
electron/typescript-definitions#246
devm33 added a commit to devm33/typescript-definitions that referenced this pull request Oct 19, 2023
Added in electron#246, the Utility namespace currently has no concrete values in
it on electron/electron@main. This change ensures Electron.Utility is
available as a property even when the namespace has no values.
devm33 added a commit to devm33/typescript-definitions that referenced this pull request Oct 25, 2023
Added in electron#246, the Utility namespace currently has no concrete values in
it on electron/electron@main. This change ensures Electron.Utility is
available as a property even when the namespace has no values.
dsanders11 pushed a commit that referenced this pull request Oct 25, 2023
* fix: ensure Electron.Utility property exists

Added in #246, the Utility namespace currently has no concrete values in
it on electron/electron@main. This change ensures Electron.Utility is
available as a property even when the namespace has no values.

* fix: only set Utility property if namespace empty

If the Utility namespace has concrete values and the const Utility
property is set it causes `error TS2300: Duplicate identifier 'Utility'.`
This tracks whether any values are added to the Utility namespace and
only sets the property workaround if there are none.
devm33 added a commit to devm33/electron that referenced this pull request Oct 26, 2023
Upgrades docs-parser and typescript-definitions to add new
'electron/utility' namespace added in:
- electron/docs-parser#95
- electron/typescript-definitions#246
- electron/typescript-definitions#247
jkleinsc pushed a commit to electron/electron that referenced this pull request Oct 31, 2023
…ons (#40264)

* feat: add utility process typescript namespace

Upgrades docs-parser and typescript-definitions to add new
'electron/utility' namespace added in:
- electron/docs-parser#95
- electron/typescript-definitions#246
- electron/typescript-definitions#247

* build: update yarn.lock

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
…ons (electron#40264)

* feat: add utility process typescript namespace

Upgrades docs-parser and typescript-definitions to add new
'electron/utility' namespace added in:
- electron/docs-parser#95
- electron/typescript-definitions#246
- electron/typescript-definitions#247

* build: update yarn.lock

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants