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

Upgrade to Electron 3.1.8 and node 10.2.1 #4355

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ packages/desktop-gui/src/jsconfig.json
# from driver
packages/driver/test/cypress/videos

# from reporter
packages/reporter/test/cypress/videos

# from example
packages/example/app
packages/example/build
Expand All @@ -35,9 +38,6 @@ packages/example/cypress/videos
packages/example/cypress/fixtures/profile.json
packages/example/cypress/fixtures/users.json

# from driver
packages/driver/test/cypress/videos

# from server
packages/server/.cy
packages/server/.projects
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.9.3
10.2.1
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ branches:
# https://www.appveyor.com/docs/lang/nodejs-iojs/
environment:
# use matching version of Node.js
nodejs_version: "8.9.3"
nodejs_version: "10.2.1"
# encode secure variables which will NOT be used
# in pull requests
# https://www.appveyor.com/docs/build-configuration/#secure-variables
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers:node8.9.3-chrome73
- image: cypress/browsers:node10.2.1-chrome74
environment:
PLATFORM: linux

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
"author": "Brian Mann",
"productName": "Cypress",
"engines": {
"node": ">=8.9.3"
"node": "10.2.1"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/electron/lib/electron.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ module.exports = {
argv.push("--enable-logging")

cp.spawn(execPath, argv, {stdio: "inherit"})
.on "close", (code) ->
debug("electron closing with code", code)
.on "close", (code, errCode) ->
debug("electron closing with code: %s, error code: %s", code, errCode)

if code
debug("original command was")
Expand Down
2 changes: 1 addition & 1 deletion packages/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"bin": {
"cypress-electron": "./bin/cypress-electron"
},
"electronVersion": "2.0.18"
"electronVersion": "3.1.8"
}
50 changes: 21 additions & 29 deletions packages/example/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
let gulp = require('gulp')
let ghPages = require('gulp-gh-pages-will')
let clean = require('gulp-clean')
let RevAll = require('gulp-rev-all')
let runSequence = require('run-sequence')

gulp.task('assets', function () {
let revAllOpts = {
const gulp = require('gulp')
const ghPages = require('gulp-gh-pages-will')
const gulpClean = require('gulp-clean')
const RevAll = require('gulp-rev-all')

const assets = () => {
const revAllOpts = {
dontGlobal: ['.ico', 'fira.css', 'javascript-logo.png'],
dontRenameFile: ['.ico', '.html', /fonts/],
dontSearchFile: ['.js'],
Expand All @@ -15,32 +14,25 @@ gulp.task('assets', function () {
return gulp.src('./app/**/*')
.pipe(RevAll.revision(revAllOpts))
.pipe(gulp.dest('build'))
})

gulp.task('cname', function () {
return gulp.src('CNAME')
.pipe(gulp.dest('build'))
})
}

gulp.task('gitignore', function () {
return gulp.src('.gitignore')
const cname = () => {
return gulp.src('CNAME', { allowEmpty: true })
.pipe(gulp.dest('build'))
})
}

gulp.task('clean', function () {
return gulp.src('./build')
.pipe(clean())
})
const clean = () => {
return gulp.src('./build', { allowEmpty: true })
.pipe(gulpClean())
}

gulp.task('push-gh-pages', function () {
const pushGhPages = () => {
return gulp.src('build/**/*')
.pipe(ghPages())
})
}

const build = gulp.series(clean, gulp.parallel(assets, cname))

gulp.task('build', function (cb) {
return runSequence('clean', ['assets', 'cname', 'gitignore'], cb)
})
exports.build = build

gulp.task('deploy', function (cb) {
return runSequence('build', 'push-gh-pages', cb)
})
exports.deploy = gulp.series(build, pushGhPages)
5 changes: 2 additions & 3 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@
"chai": "3.5.0",
"cross-env": "5.2.0",
"cypress-example-kitchensink": "1.5.5",
"gulp": "3.9.1",
"gulp": "4.0.2",
"gulp-clean": "0.4.0",
"gulp-gh-pages-will": "0.5.5",
"gulp-rev-all": "0.9.8",
"gulp-rev-all": "1.0.0",
"mocha": "2.5.3",
"run-sequence": "1.2.2",
"shelljs": "0.8.3"
}
}
94 changes: 94 additions & 0 deletions packages/extension/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
const fs = require('fs-extra')
const pkg = require('./package.json')
const gulp = require('gulp')
const rimraf = require('rimraf')
const source = require('vinyl-source-stream')
const coffeeify = require('coffeeify')
const browserify = require('browserify')
const cypressIcons = require('@cypress/icons')

const copySocketClient = () => {
return gulp.src(require('../socket').getPathToClientSource())
.pipe(gulp.dest('dist'))
}

const clean = (done) => {
rimraf('dist', done)
}

const manifest = (done) => {
gulp.src('app/manifest.json')
.pipe(gulp.dest('dist'))
.on('end', () => {
return fs.readJson('dist/manifest.json', function (err, json) {
json.version = pkg.version

return fs.writeJson('dist/manifest.json', json, { spaces: 2 }, done)
})
})

return null
}

const background = () => {
return browserify({
entries: 'app/background.coffee',
transform: coffeeify,
})
.bundle()
.pipe(source('background.js'))
.pipe(gulp.dest('dist'))
}

const html = () => {
return gulp.src('app/**/*.html')
.pipe(gulp.dest('dist'))
}

const css = () => {
return gulp.src('app/**/*.css')
.pipe(gulp.dest('dist'))
}

const icons = () => {
return gulp.src([
cypressIcons.getPathToIcon('icon_16x16.png'),
cypressIcons.getPathToIcon('icon_19x19.png'),
cypressIcons.getPathToIcon('icon_38x38.png'),
cypressIcons.getPathToIcon('icon_48x48.png'),
cypressIcons.getPathToIcon('icon_128x128.png'),
])
.pipe(gulp.dest('dist/icons'))
}

const logos = () => {
return gulp.src([
cypressIcons.getPathToLogo('cypress-bw.png'),
])
.pipe(gulp.dest('dist/logos'))
}

const build = gulp.series(
clean,
gulp.parallel(
copySocketClient,
icons,
logos,
manifest,
background,
html,
css
)
)

const watchBuild = () => {
return gulp.watch('app/**/*', build)
}

const watch = gulp.series(build, watchBuild)

module.exports = {
build,
clean,
watch,
}
8 changes: 3 additions & 5 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@
"cross-env": "5.2.0",
"eol": "0.9.1",
"fs-extra": "8.1.0",
"gulp": "3.9.1",
"gulp-clean": "0.4.0",
"gulp-rename": "1.4.0",
"run-sequence": "1.2.2",
"gulp": "4.0.2",
"rimraf": "2.6.3",
"sinon": "1.17.7",
"sinon-chai": "3.3.0",
"vinyl-source-stream": "1.1.2"
"vinyl-source-stream": "2.0.0"
}
}
10 changes: 6 additions & 4 deletions packages/https-proxy/test/helpers/proxy.coffee
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
allowDestroy = require("server-destroy-vvo")
http = require("http")
path = require("path")
httpsProxy = require("../../lib/proxy")
Expand Down Expand Up @@ -28,6 +29,8 @@ module.exports = {
start: (port) ->
prx = http.createServer()

allowDestroy(prx)

dir = path.join(process.cwd(), "ca")

httpsProxy.create(dir, port, {
Expand Down Expand Up @@ -60,8 +63,7 @@ module.exports = {
resolve(proxy)

stop: ->
new Promise (resolve) ->
prx.close(resolve)
.then ->
prx.proxy.close()
## close all open connections and force quit
prx.destroy()
prx.proxy.close()
}
2 changes: 1 addition & 1 deletion packages/https-proxy/test/integration/proxy_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ describe "Proxy", ->
})
.then =>
throw new Error('should not succeed')
.catch { message: 'Error: socket hang up' }, =>
.catch { message: 'Error: Client network socket disconnected before secure TLS connection was established' }, =>
expect(createProxyConn).to.not.be.called
expect(createSocket).to.be.calledWith({
port: @proxy._sniPort
Expand Down
2 changes: 1 addition & 1 deletion packages/network/test/unit/agent_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ describe('lib/agent', function () {
.catch((e) => {
expect(e.message).to.eq('Error: A connection to the upstream proxy could not be established: The upstream proxy closed the socket after connecting but before sending a response.')

return proxy.closeAsync()
proxy.close()
})
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Because this error occurred during a 'before each' hook we are skipping the rema
at stack trace line
at stack trace line
at stack trace line
at stack trace line

2) s3a "before all" hook for "t8a":
Error: s3a before hook failed
Expand Down
1 change: 0 additions & 1 deletion packages/server/__snapshots__/2_config_spec.coffee.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ exports['e2e config fails 1'] = `
at stack trace line
at stack trace line
at stack trace line
at stack trace line



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ exports['e2e forms submissions with jquery XHR POST failing 1'] = `
at stack trace line
at stack trace line
at stack trace line
at stack trace line



Expand Down
1 change: 0 additions & 1 deletion packages/server/__snapshots__/3_issue_173_spec.coffee.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ exports['e2e issue 173 failing 1'] = `
at stack trace line
at stack trace line
at stack trace line
at stack trace line



Expand Down
1 change: 1 addition & 0 deletions packages/server/__snapshots__/3_plugins_spec.coffee.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Error: Async error from plugins file
at stack trace line
at stack trace line
at stack trace line
at stack trace line


(Results)
Expand Down
1 change: 0 additions & 1 deletion packages/server/__snapshots__/4_promises_spec.coffee.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ exports['e2e promises failing1 1'] = `
2) catches promise errors and calls done with err even when async:
Error: foo
at stack trace line
at stack trace line



Expand Down
5 changes: 0 additions & 5 deletions packages/server/__snapshots__/4_request_spec.coffee.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ RequestError: Error: connect ECONNREFUSED 127.0.0.1:16795
at stack trace line
at stack trace line
at stack trace line
at stack trace line
at stack trace line
at stack trace line
at stack trace line

at stack trace line
Expand All @@ -155,7 +152,6 @@ RequestError: Error: connect ECONNREFUSED 127.0.0.1:16795
at stack trace line
at stack trace line
at stack trace line
at stack trace line



Expand Down Expand Up @@ -279,7 +275,6 @@ Body: Service Unavailable
at stack trace line
at stack trace line
at stack trace line
at stack trace line



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ https://on.cypress.io/returning-value-and-commands-in-custom-command
at stack trace line
at stack trace line
at stack trace line
at stack trace line

3) errors when not invoking commands, invoking done callback, and returning a promise:
Cypress detected that you returned a promise in a test, but also invoked a done callback. Return a promise -or- invoke a done callback, not both.
Expand Down