From 41a3f123f18b1da15796b0df3d58d69a95a1baf0 Mon Sep 17 00:00:00 2001 From: Milan Burda Date: Mon, 17 Dec 2018 23:01:00 +0100 Subject: [PATCH] docs: move `require` related breaking changes to Electron 6.0 (#16109) --- docs/api/breaking-changes.md | 69 ++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/docs/api/breaking-changes.md b/docs/api/breaking-changes.md index 6fa271728f2..88f9c08f285 100644 --- a/docs/api/breaking-changes.md +++ b/docs/api/breaking-changes.md @@ -6,6 +6,41 @@ Breaking changes will be documented here, and deprecation warnings added to JS c The `FIXME` string is used in code comments to denote things that should be fixed for future releases. See https://github.com/electron/electron/search?q=fixme +# Planned Breaking API Changes (6.0) + +## `electron.screen` in renderer process + +```js +// Deprecated +require('electron').screen +// Replace with +require('electron').remote.screen +``` + +## `require` in sandboxed renderers + +```js +// Deprecated +require('child_process') +// Replace with +require('electron').remote.require('child_process') + +// Deprecated +require('fs') +// Replace with +require('electron').remote.require('fs') + +// Deprecated +require('os') +// Replace with +require('electron').remote.require('os') + +// Deprecated +require('path') +// Replace with +require('electron').remote.require('path') +``` + # Planned Breaking API Changes (5.0) ## `new BrowserWindow({ webPreferences })` @@ -65,40 +100,6 @@ not present, then the native module will fail to load on Windows, with an error message like `Cannot find module`. See the [native module guide](/docs/tutorial/using-native-node-modules.md) for more. -## `electron.screen` in renderer process - -```js -// Deprecated -require('electron').screen -// Replace with -require('electron').remote.screen -``` - -## `require` in sandboxed renderers - -```js -// Deprecated -require('child_process') -// Replace with -require('electron').remote.require('child_process') - -// Deprecated -require('fs') -// Replace with -require('electron').remote.require('fs') - -// Deprecated -require('os') -// Replace with -require('electron').remote.require('os') - -// Deprecated -require('path') -// Replace with -require('electron').remote.require('path') -``` - - # Breaking API Changes (3.0) The following list includes the breaking API changes in Electron 3.0.