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

Remove 0.37 deprecation warnings #9

Merged
merged 2 commits into from
Apr 6, 2016
Merged

Remove 0.37 deprecation warnings #9

merged 2 commits into from
Apr 6, 2016

Conversation

inukshuk
Copy link
Contributor

@inukshuk inukshuk commented Apr 4, 2016

This removes deprecation warnings in 0.37

Since the tests run outside of Electron I'm just defaulting to an empty version string to make sure the tests don't fail.

@@ -2,6 +2,7 @@ var assign = require('object-assign')
var path = require('path')
var BrowserWindow = require('browser-window')
var wargs = require('./args')
var v = (process.versions.electron || '').split('.').map(Number)
Copy link

Choose a reason for hiding this comment

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

This could be a good place for the new assignment magic in ES2015:

let [major, minor, patch] = process.versions.electron.split('.').map(Number)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, absolutely! But here the code is supposed to be backwards compatible and the tests are currently run with mocha in node (so we'd have to enable --harmony_destructuring or use babel).

Besides, I would hope that these version checks can be removed soon anyway, seeing how fast Electron is moving along.

@jprichardson
Copy link
Owner

ACK. Although, I think it's fine to support just the latest until Electron becomes stable. i.e the maintenance of legacy Electron code may not be worth it.

@jprichardson jprichardson merged commit 7aaed3a into jprichardson:master Apr 6, 2016
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.

4 participants