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

Issue 21316 windows node11 #2699

Merged
merged 54 commits into from
Nov 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
1581e54
Merge branch 'develop'
brian-mann Oct 10, 2017
87d4f44
Merge branch 'develop'
brian-mann Oct 14, 2017
d29909b
Merge branch 'develop'
brian-mann Oct 15, 2017
2461681
release 1.0.3 [skip ci]
brian-mann Oct 30, 2017
a81d185
Merge branch 'develop'
brian-mann Oct 30, 2017
242c55b
Merge branch 'develop'
brian-mann Oct 30, 2017
5726ef5
Merge branch 'develop'
brian-mann Nov 20, 2017
6e85c3c
Merge branch 'develop'
brian-mann Nov 21, 2017
ce148c5
Merge branch 'develop'
brian-mann Nov 27, 2017
f7729a9
Merge branch 'develop'
brian-mann Dec 4, 2017
e91490f
Merge branch 'develop'
brian-mann Dec 7, 2017
7208cf0
Merge branch 'develop'
brian-mann Dec 7, 2017
4d85570
Merge branch 'develop'
brian-mann Dec 15, 2017
3f36c56
Merge branch 'develop'
brian-mann Dec 19, 2017
4ff28a9
Merge branch 'develop'
brian-mann Dec 26, 2017
af27b63
Merge branch 'develop'
brian-mann Feb 5, 2018
d83f9e8
release 2.0.0 [skip ci]
brian-mann Feb 16, 2018
59f026c
Merge branch 'develop'
brian-mann Feb 16, 2018
81f068e
Merge branch 'develop'
brian-mann Feb 16, 2018
d4a4700
Merge branch 'develop'
brian-mann Feb 17, 2018
cf22c2b
Merge branch 'develop'
brian-mann Feb 19, 2018
6ef26a5
Merge branch 'develop'
brian-mann Feb 21, 2018
c972e7a
Merge branch 'develop'
brian-mann Feb 26, 2018
4476e6c
Merge branch 'develop'
brian-mann Mar 1, 2018
2e68ab8
Add a comment to Issue Template directing questions to be asked in ch…
jennifer-shehane Mar 5, 2018
ea0c477
Merge branch 'develop'
brian-mann May 30, 2018
d656e21
Merge branch 'develop'
brian-mann May 31, 2018
af96dff
Merge branch 'develop'
brian-mann Jun 29, 2018
6c85a02
Merge branch 'develop'
brian-mann Jul 30, 2018
d48d842
release 3.1.0 [skip ci]
brian-mann Aug 14, 2018
68b9c91
Merge branch 'develop'
brian-mann Aug 14, 2018
6246971
Merge pull request #1 from cypress-io/develop
Oct 31, 2018
0759ed9
add fix for windows + node11
Oct 31, 2018
3493040
Merge branch 'develop' into issue_21316_windows-node11
Oct 31, 2018
8bf7b37
add getNode11WindowsFix to the utils
Oct 31, 2018
f6b6334
Merge branch 'issue_21316_windows-node11' of github.com:zerdos/cypres…
Oct 31, 2018
9ecd31b
formatting
Nov 1, 2018
171e22f
do not convert to the windowsHide to string
Nov 1, 2018
fd150f2
add unit tests
Nov 1, 2018
680ee5c
add unit tests
Nov 1, 2018
649fb58
Merge branch 'develop' into issue_21316_windows-node11
Nov 1, 2018
63f0d4f
add unit tests
Nov 1, 2018
63e2677
Merge branch 'issue_21316_windows-node11' of github.com:zerdos/cypres…
Nov 1, 2018
9392767
Revert "formatting"
Nov 1, 2018
bfbdd54
Merge branch 'develop' into issue_21316_windows-node11
Nov 2, 2018
5544fa8
don't ask to commit package.json version
brian-mann Nov 2, 2018
f404395
release 3.1.1 [skip ci]
brian-mann Nov 2, 2018
ed1378b
Merge branch 'develop'
brian-mann Nov 2, 2018
bf8d471
Merge branch 'develop' into issue_21316_windows-node11
Nov 7, 2018
54abec5
Merge remote-tracking branch 'origin/master' into issue_21316_windows…
chrisbreiding Nov 13, 2018
58e1197
move isPlatform into cli/util
chrisbreiding Nov 13, 2018
e9e8e37
fix version comparison
chrisbreiding Nov 13, 2018
fec755c
revert accidental merge from master
chrisbreiding Nov 13, 2018
3c0ff0c
Merge remote-tracking branch 'origin/develop' into issue_21316_window…
chrisbreiding Nov 13, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions cli/lib/exec/spawn.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const _ = require('lodash')
const os = require('os')
const cp = require('child_process')
const path = require('path')
const Promise = require('bluebird')
Expand All @@ -13,16 +12,12 @@ const { throwFormErrorText, errors } = require('../errors')
const isXlibOrLibudevRe = /^(?:Xlib|libudev)/
const isHighSierraWarningRe = /\*\*\* WARNING/

function isPlatform (platform) {
return os.platform() === platform
}

function needsStderrPiped (needsXvfb) {
return isPlatform('darwin') || (needsXvfb && isPlatform('linux'))
return util.isPlatform('darwin') || (needsXvfb && util.isPlatform('linux'))
}

function needsEverythingPipedDirectly () {
return isPlatform('win32')
return util.isPlatform('win32')
}

function getStdio (needsXvfb) {
Expand Down
18 changes: 18 additions & 0 deletions cli/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const isInstalledGlobally = require('is-installed-globally')
const pkg = require(path.join(__dirname, '..', 'package.json'))
const logger = require('./logger')
const debug = require('debug')('cypress:cli')
const compareVersions = require('compare-versions')

const getosAsync = Promise.promisify(getos)

Expand Down Expand Up @@ -67,6 +68,7 @@ const util = {
.mapValues((value) => { // stringify to 1 or 0
return value ? '1' : '0'
})
.extend(util.getNode11WindowsFix()) // the value has to be falsy, '0' as a string not good enoughs
.value()
},

Expand All @@ -78,6 +80,14 @@ const util = {
}
},

getNode11WindowsFix () {
if (compareVersions(util.getNodeVersion(), 'v11') >= 0 && util.isPlatform('win32')) {
return {
windowsHide: false,
}
}
},

getEnvColors () {
const sc = util.supportsColor()

Expand All @@ -88,6 +98,14 @@ const util = {
}
},

getNodeVersion () {
return process.version
},

isPlatform (platform) {
return os.platform() === platform
},

isTty (fd) {
return tty.isatty(fd)
},
Expand Down
1 change: 1 addition & 0 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"check-more-types": "2.24.0",
"commander": "2.11.0",
"common-tags": "1.4.0",
"compare-versions": "3.4.0",
"debug": "3.1.0",
"execa": "0.10.0",
"executable": "4.1.1",
Expand Down
30 changes: 30 additions & 0 deletions cli/test/lib/util_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,36 @@ describe('util', () => {
DEBUG_COLORS: '0',
})
})

context('.windowsHide', () => {
it('is false on windows with node 11', () => {
os.platform.returns('win32')
sinon.stub(process, 'version').value('v11.0.0')
expect(util.getEnvOverrides().windowsHide).to.be.false
})

it('is false on windows with node > 11', () => {
os.platform.returns('win32')
sinon.stub(process, 'version').value('v12.0.0')
expect(util.getEnvOverrides().windowsHide).to.be.false
})

it('is undefined on windows with node < 11', () => {
os.platform.returns('win32')
sinon.stub(process, 'version').value('v8.0.0')
expect(util.getEnvOverrides().windowsHide).to.be.undefined

os.platform.returns('win32')
sinon.stub(process, 'version').value('v10.0.0')
expect(util.getEnvOverrides().windowsHide).to.be.undefined
})

it('is undefined on non-windows with node 11', () => {
os.platform.returns('darwin')
sinon.stub(process, 'version').value('v11.0.0')
expect(util.getEnvOverrides().windowsHide).to.be.undefined
})
})
})

context('.getForceTty', () => {
Expand Down