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

chore: deprecate remote #25293

Merged
merged 3 commits into from
Sep 10, 2020
Merged

chore: deprecate remote #25293

merged 3 commits into from
Sep 10, 2020

Conversation

nornagon
Copy link
Member

@nornagon nornagon commented Sep 2, 2020

Description of Change

Ref #21408.

This adds a new deprecation warning message when require('electron').remote is encountered.

Checklist

Release Notes

Notes: Deprecated the remote module. It is replaced by @electron/remote.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Sep 2, 2020
@@ -50,6 +50,25 @@ If your crash ingestion server does not support compressed payloads, you can
turn off compression by specifying `{ compress: false }` in the crash reporter
options.

### Deprecated: `remote` module

The `remote` module is deprecated in Electron 12, and will be removed in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we utilize this message to further indicate that you shouldn't just replace and forget. Let's use it as another chance to educate why using remote is bad.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @electron/remote repository has a big warning at the top. I think that's enough.

import { browserModuleNames } from '@electron/internal/browser/api/module-names';
import { commonModuleList } from '@electron/internal/common/api/module-list';

deprecate.log('The remote module is deprecated. Use https://github.com/electron/remote instead.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also update this doc to note that remote is deprecated:
https://www.electronjs.org/docs/api/remote

@nornagon
Copy link
Member Author

nornagon commented Sep 3, 2020

@jkleinsc that's already been done in master. #24941

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! @nornagon I missed that the doc had been updated.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Sep 3, 2020
@nornagon nornagon merged commit dd781c4 into master Sep 10, 2020
@release-clerk
Copy link

release-clerk bot commented Sep 10, 2020

Release Notes Persisted

Deprecated the remote module. It is replaced by @electron/remote.

@nornagon nornagon deleted the deprecate-remote branch September 10, 2020 16:17
mlaurencin pushed a commit to mlaurencin/electron that referenced this pull request Sep 16, 2020
TheCrether added a commit to TermFTP/TermFTP-Client that referenced this pull request Nov 25, 2021
only breaking changes were how the remote API is called (@electron/remote)
electron/electron#25293
in order for react imports to work, `contextIsolation` has to be set to `false`, since it is `true` by default now
TheCrether added a commit to TermFTP/TermFTP-Client that referenced this pull request Nov 25, 2021
only breaking changes were how the remote API is called (@electron/remote)
electron/electron#25293
in order for react imports to work, `contextIsolation` has to be set to `false`, since it is `true` by default now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants