From 107251948880f6b21b22b8122aef672f536ced9b Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 16 Sep 2016 15:57:07 -0700 Subject: [PATCH] Mark atom-shell version as deprecated --- atom/browser/atom_browser_main_parts.cc | 2 +- atom/browser/browser.h | 2 +- atom/common/api/atom_bindings.cc | 4 +++- atom/common/api/atom_bindings.h | 2 +- atom/renderer/atom_renderer_client.cc | 2 +- docs/tutorial/planned-breaking-changes.md | 9 +++++++++ 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/atom/browser/atom_browser_main_parts.cc b/atom/browser/atom_browser_main_parts.cc index e160eb7c0ce1..4af06a426bd4 100644 --- a/atom/browser/atom_browser_main_parts.cc +++ b/atom/browser/atom_browser_main_parts.cc @@ -117,7 +117,7 @@ void AtomBrowserMainParts::PostEarlyInitialization() { if (node_debugger_->IsRunning()) env->AssignToContext(v8::Debug::GetDebugContext()); - // Add atom-shell extended APIs. + // Add Electron extended APIs. atom_bindings_->BindTo(js_env_->isolate(), env->process_object()); // Load everything. diff --git a/atom/browser/browser.h b/atom/browser/browser.h index 5bb2500b6633..f5e37ce6d546 100644 --- a/atom/browser/browser.h +++ b/atom/browser/browser.h @@ -60,7 +60,7 @@ class Browser : public WindowListObserver { // Overrides the application version. void SetVersion(const std::string& version); - // Returns the application's name, default is just Atom-Shell. + // Returns the application's name, default is just Electron. std::string GetName() const; // Overrides the application name. diff --git a/atom/common/api/atom_bindings.cc b/atom/common/api/atom_bindings.cc index cf80d64441ef..311e7e987183 100644 --- a/atom/common/api/atom_bindings.cc +++ b/atom/common/api/atom_bindings.cc @@ -117,8 +117,10 @@ void AtomBindings::BindTo(v8::Isolate* isolate, mate::Dictionary versions; if (dict.Get("versions", &versions)) { versions.Set(ATOM_PROJECT_NAME, ATOM_VERSION_STRING); - versions.Set("atom-shell", ATOM_VERSION_STRING); // For compatibility. versions.Set("chrome", CHROME_VERSION_STRING); + + // TODO(kevinsawicki): Remove in 2.0 + versions.Set("atom-shell", ATOM_VERSION_STRING); } } diff --git a/atom/common/api/atom_bindings.h b/atom/common/api/atom_bindings.h index 9460145d2391..39f3b53a227d 100644 --- a/atom/common/api/atom_bindings.h +++ b/atom/common/api/atom_bindings.h @@ -24,7 +24,7 @@ class AtomBindings { virtual ~AtomBindings(); // Add process.atomBinding function, which behaves like process.binding but - // load native code from atom-shell instead. + // load native code from Electron instead. void BindTo(v8::Isolate* isolate, v8::Local process); private: diff --git a/atom/renderer/atom_renderer_client.cc b/atom/renderer/atom_renderer_client.cc index 4e16e3c8454b..e7d7a6e36cab 100644 --- a/atom/renderer/atom_renderer_client.cc +++ b/atom/renderer/atom_renderer_client.cc @@ -266,7 +266,7 @@ void AtomRendererClient::DidCreateScriptContext( // Setup node environment for each window. node::Environment* env = node_bindings_->CreateEnvironment(context); - // Add atom-shell extended APIs. + // Add Electron extended APIs. atom_bindings_->BindTo(env->isolate(), env->process_object()); AddRenderBindings(env->isolate(), env->process_object(), preferences_manager_.get()); diff --git a/docs/tutorial/planned-breaking-changes.md b/docs/tutorial/planned-breaking-changes.md index 896fd07000b3..d5f7d25a67f8 100644 --- a/docs/tutorial/planned-breaking-changes.md +++ b/docs/tutorial/planned-breaking-changes.md @@ -54,6 +54,15 @@ nativeImage.toJpeg() nativeImage.toJPEG() ``` +## `process` + +```js +// Deprecated +process.versions['atom-shell'] +// Replace with +process.versions.electron +``` + ## `Tray` ```js