From b52367e3b22990d32298fd2344b52e189c69d09f Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 11 Jan 2017 17:51:34 -0800 Subject: [PATCH 1/3] Update native-mate to electron org --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 6164ed8b97..5bc253bad5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,7 +12,7 @@ url = https://github.com/electron/chromium-breakpad.git [submodule "vendor/native_mate"] path = vendor/native_mate - url = https://github.com/zcbenz/native-mate.git + url = https://github.com/electron/native-mate.git [submodule "vendor/crashpad"] path = vendor/crashpad url = https://github.com/electron/crashpad.git From 726bab02936f9430298c62380e2094aae34b911c Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 11 Jan 2017 17:51:46 -0800 Subject: [PATCH 2/3] Add specs for process.versions.electron/chrome --- spec/node-spec.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/node-spec.js b/spec/node-spec.js index d6151175d1..e92b2a0d25 100644 --- a/spec/node-spec.js +++ b/spec/node-spec.js @@ -290,4 +290,12 @@ describe('node feature', function () { require('vm').runInNewContext('') }) }) + + it('includes the electron version in process.versions', () => { + assert(/^\d+\.\d+\.\d+$/.test(process.versions.electron)) + }) + + it('includes the chrome version in process.versions', () => { + assert(/^\d+\.\d+\.\d+\.\d+$/.test(process.versions.chrome)) + }) }) From 323edb9d5310f736217d533f9b30f462fba60df6 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 12 Jan 2017 13:49:25 -0800 Subject: [PATCH 3/3] Add read-only version to planned 2.0 API --- atom/common/api/atom_bindings.cc | 1 + docs/tutorial/planned-breaking-changes.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/atom/common/api/atom_bindings.cc b/atom/common/api/atom_bindings.cc index 27b3352f37..9173a10a38 100644 --- a/atom/common/api/atom_bindings.cc +++ b/atom/common/api/atom_bindings.cc @@ -112,6 +112,7 @@ void AtomBindings::BindTo(v8::Isolate* isolate, mate::Dictionary versions; if (dict.Get("versions", &versions)) { + // TODO(kevinsawicki): Make read-only in 2.0 to match node versions.Set(ATOM_PROJECT_NAME, ATOM_VERSION_STRING); versions.Set("chrome", CHROME_VERSION_STRING); diff --git a/docs/tutorial/planned-breaking-changes.md b/docs/tutorial/planned-breaking-changes.md index 681c66fc45..e2d0e3a939 100644 --- a/docs/tutorial/planned-breaking-changes.md +++ b/docs/tutorial/planned-breaking-changes.md @@ -87,6 +87,10 @@ process.versions['atom-shell'] process.versions.electron ``` +* `process.versions.electron` and `process.version.chrome` will be made + read-only properties for consistency with the other `process.versions` + properties set by Node. + ## `Tray` ```js