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 dependencies for new nodejs version. #235

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
'env': {
'browser': true,
'es6': true,
'node': true,
},
'extends': [
'google',
],
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly',
},
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module',
},
'rules': {
},
};
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
language: node_js
sudo: false

node_js:
- "0.12"
- "4.2"
node_js:
- "node"
- "12"
- "8"

cache:
directories:
Expand All @@ -25,6 +26,7 @@ env:
zkP183w3LESZo2MA/iWtADxSY8e4ws1UJ7gwNH4P2sw+Qcxr+Q4=

install:
- npm install -g jshint jsonlint npm
- npm install -g grunt-cli
- npm install

Expand Down
39 changes: 19 additions & 20 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
'use strict';

var packageJSON = require('./package.json');
const packageJSON = require('./package.json');

module.exports = function (grunt) {

var utils = require('./src/utils')(grunt);
var tunnelId = Math.floor((new Date()).getTime() / 1000 - 1230768000).toString();
module.exports = function(grunt) {
const utils = require('./src/utils')(grunt);
const tunnelId = Math.floor((new Date()).getTime() / 1000 - 1230768000).toString();

function negateResult(result, callback) {
// Reverses the job's passed status. Can be used as the onTestComplete callback for
// the negative tests.
var user = process.env.SAUCE_USERNAME;
var pass = process.env.SAUCE_ACCESS_KEY;
const user = process.env.SAUCE_USERNAME;
const pass = process.env.SAUCE_ACCESS_KEY;

utils
.makeRequest({
method: 'PUT',
url: ['https://saucelabs.com/rest/v1', user, 'jobs', result.job_id].join('/'),
auth: { user: user, pass: pass },
json: { passed: !result.passed }
})
.thenResolve(!result.passed)
.nodeify(callback);
.makeRequest({
method: 'PUT',
url: ['https://saucelabs.com/rest/v1', user, 'jobs', result.job_id].join('/'),
auth: {user: user, pass: pass},
json: {passed: !result.passed},
})
.thenResolve(!result.passed)
.nodeify(callback);
}

grunt.task.loadTasks('tasks');
Expand All @@ -35,14 +34,14 @@ module.exports = function (grunt) {
build: process.env.TRAVIS_JOB_ID || 'dev-'+process.env.USER+':'+Date.now(),
tags: ['v'+packageJSON.version, 'grunt-saucelabs'],
browsers: [
['Windows 7', 'chrome', '']
['Windows 7', 'chrome', ''],
],
tunneled: false,
sauceConfig: {
'video-upload-on-pass': false,
'tunnel-identifier': tunnelId
}
}
}
'tunnel-identifier': tunnelId,
},
},
},
});
};
38 changes: 19 additions & 19 deletions examples/custom/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
module.exports = function (grunt) {
var browsers = [{
module.exports = function(grunt) {
const browsers = [{
browserName: 'firefox',
version: '19',
platform: 'XP'
platform: 'XP',
}, {
browserName: 'googlechrome',
platform: 'XP'
platform: 'XP',
}, {
browserName: 'googlechrome',
platform: 'linux'
platform: 'linux',
}, {
browserName: 'internet explorer',
platform: 'WIN8',
version: '10'
version: '10',
}, {
browserName: 'internet explorer',
platform: 'VISTA',
version: '9'
version: '9',
}];

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
'pkg': grunt.file.readJSON('package.json'),
'connect': {
server: {
options: {
base: '',
port: 9999
}
}
port: 9999,
},
},
},

'saucelabs-custom': {
all: {
options: {
urls: [
'http://127.0.0.1:9999/index.html'
'http://127.0.0.1:9999/index.html',
],
browsers: browsers,
build: process.env.TRAVIS_JOB_ID,
testname: 'custom tests',
throttled: 3,
sauceConfig: {
'video-upload-on-pass': false
}
}
}
'video-upload-on-pass': false,
},
},
},
},
watch: {}
'watch': {},
});

grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-saucelabs');

grunt.registerTask('default', ['connect', 'saucelabs-custom']);
};
};
38 changes: 19 additions & 19 deletions examples/jasmine/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
module.exports = function (grunt) {
var browsers = [{
module.exports = function(grunt) {
const browsers = [{
browserName: 'firefox',
version: '19',
platform: 'XP'
platform: 'XP',
}, {
browserName: 'googlechrome',
platform: 'XP'
platform: 'XP',
}, {
browserName: 'googlechrome',
platform: 'linux'
platform: 'linux',
}, {
browserName: 'internet explorer',
platform: 'WIN8',
version: '10'
version: '10',
}, {
browserName: 'internet explorer',
platform: 'VISTA',
version: '9'
version: '9',
}];

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
'pkg': grunt.file.readJSON('package.json'),
'connect': {
server: {
options: {
base: '',
port: 9999
}
}
port: 9999,
},
},
},

'saucelabs-jasmine': {
all: {
options: {
urls: [
'http://127.0.0.1:9999/SpecRunner.html',
'http://127.0.0.1:9999/SpecRunnerDos.html'
'http://127.0.0.1:9999/SpecRunnerDos.html',
],
browsers: browsers,
build: process.env.TRAVIS_JOB_ID,
testname: 'jasmine tests',
throttled: 3,
sauceConfig: {
'video-upload-on-pass': false
}
}
}
'video-upload-on-pass': false,
},
},
},
},
watch: {}
'watch': {},
});

grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-saucelabs');

grunt.registerTask('default', ['connect', 'saucelabs-jasmine']);
};
};
Loading