Skip to content

Commit a983381

Browse files
authoredSep 29, 2023
Merge pull request #1119 from rollbar/matt/sc-127975/remove-node-8-support
Remove node 8 support
2 parents ca540c9 + b31c1b8 commit a983381

8 files changed

+2028
-9103
lines changed
 

‎.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-20.04
1313
strategy:
1414
matrix:
15-
node-version: [8, 10, 12, 14, 16]
15+
node-version: [10, 12, 14, 16]
1616

1717
steps:
1818
- uses: actions/checkout@v2

‎Gruntfile.js

+3-33
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
/**
22
* Build and test rollbar.js
3-
*
4-
* Test with browserstack:
5-
* $> BROWSER_STACK_USERNAME=username BROWSER_STACK_ACCESS_KEY=12345asdf grunt test --browsers=bs_ie_latest
6-
*
73
*/
84

95

@@ -15,7 +11,6 @@ var pkg = require('./package.json');
1511
var fs = require('fs');
1612

1713
var webpackConfig = require('./webpack.config.js');
18-
var browserStackBrowsers = require('./browserstack.browsers');
1914

2015

2116
function findTests(context) {
@@ -33,7 +28,7 @@ function findTests(context) {
3328
return mapping;
3429
}
3530

36-
function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
31+
function buildGruntKarmaConfig(singleRun, tests, reporters) {
3732
var config = {
3833
options: {
3934
configFile: './karma.conf.js',
@@ -71,10 +66,6 @@ function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
7166
},
7267
};
7368

74-
if (browsers && browsers.length) {
75-
config.options.browsers = browsers;
76-
}
77-
7869
if (reporters && reporters.length) {
7970
config.options.reporters = reporters;
8071
}
@@ -112,27 +103,6 @@ module.exports = function(grunt) {
112103
require('time-grunt')(grunt);
113104

114105
var browserTests = findTests('browser');
115-
var browsers = grunt.option('browsers');
116-
if (browsers) {
117-
browsers = browsers.split(',');
118-
119-
var browserStackAliases = [];
120-
var nonBrowserStackAliases = [];
121-
browsers.forEach(function(browserName) {
122-
if (browserName.slice(0, 3) === 'bs_') {
123-
browserStackAliases.push(browserName);
124-
} else {
125-
nonBrowserStackAliases.push(browserName);
126-
}
127-
});
128-
129-
var expandedBrowsers = browserStackBrowsers.filter.apply(null, browserStackAliases);
130-
var expandedBrowserNames = [];
131-
expandedBrowsers.forEach(function(browser) {
132-
expandedBrowserNames.push(browser._alias);
133-
});
134-
browsers = nonBrowserStackAliases.concat(expandedBrowserNames);
135-
}
136106

137107
var singleRun = grunt.option('singleRun');
138108
if (singleRun === undefined) {
@@ -165,7 +135,7 @@ module.exports = function(grunt) {
165135
}
166136
},
167137

168-
karma: buildGruntKarmaConfig(singleRun, browsers, browserTests, reporters),
138+
karma: buildGruntKarmaConfig(singleRun, browserTests, reporters),
169139

170140
replace: {
171141
snippets: {
@@ -188,7 +158,7 @@ module.exports = function(grunt) {
188158
return captures.join('\n');
189159
}
190160
},
191-
// README travis link
161+
// README CI link
192162
{
193163
from: new RegExp('(https://github\\.com/rollbar/rollbar\\.js/workflows/Rollbar\\.js%20CI/badge\\.svg\\?branch=v)([0-9a-zA-Z.-]+)'),
194164
to: function(match, index, fullText, captures) {

‎browserstack.browsers.js

-153
This file was deleted.

‎browserstack.browsers.json

-4,384
This file was deleted.

‎karma.conf.js

+1-19
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
11
var path = require('path');
22
var webpack = require('webpack');
33
var defaults = require('./defaults');
4-
var browserStackBrowsers = require('./browserstack.browsers');
54

65
var defaultsPlugin = new webpack.DefinePlugin(defaults);
76

8-
var allBrowsers = browserStackBrowsers.filter('bs_all');
9-
var allBrowsersByBrowser = {
10-
// Travis needs the --no-sandbox option,
11-
// so add as a custom launcher to be used as the default browser.
12-
ChromeNoSandbox: {
13-
base: 'ChromeHeadless',
14-
flags: ['--no-sandbox']
15-
}
16-
};
17-
allBrowsers.forEach(function(browser) {
18-
allBrowsersByBrowser[browser._alias] = browser;
19-
});
20-
21-
227
module.exports = function (config) {
238
config.set({
24-
browsers: ['ChromeNoSandbox'],
9+
browsers: ['ChromeHeadless'],
2510

2611
// The Travis environment has these specified.
2712
// To run BrowserStack tests locally, specify the environment variables:
@@ -35,9 +20,6 @@ module.exports = function (config) {
3520
captureConsole: true
3621
},
3722

38-
// Used for testing on BrowserStack
39-
customLaunchers: allBrowsersByBrowser,
40-
4123
// Files are specified in the grunt-karma configuration in Gruntfile.js
4224
//files: []
4325

‎package-lock.json

+2,012-4,498
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+11-14
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,35 @@
2727
"source-map": "^0.5.7"
2828
},
2929
"devDependencies": {
30-
"babel-core": "^6.26.3",
30+
"@babel/core": "^7.22.11",
3131
"babel-eslint": "^10.0.3",
3232
"babel-loader": "^8.0.4",
3333
"bluebird": "^3.3.5",
34-
"browserstack-api": "0.0.5",
3534
"chai": "^4.2.0",
3635
"chalk": "^1.1.1",
3736
"eslint": "^6.8.0",
3837
"eslint-loader": "^3.0.3",
39-
"express": "^4.16.4",
38+
"express": "^4.18.2",
4039
"glob": "^5.0.14",
4140
"grunt": "^1.1.0",
4241
"grunt-bumpup": "^0.6.3",
4342
"grunt-cli": "^1.3.2",
44-
"grunt-contrib-concat": "~0.3.0",
43+
"grunt-contrib-concat": "^2.1.0",
4544
"grunt-contrib-connect": "^2.1.0",
46-
"grunt-contrib-copy": "~0.5.0",
47-
"grunt-contrib-jshint": "^2.1.0",
45+
"grunt-contrib-copy": "^1.0.0",
46+
"grunt-contrib-jshint": "^3.2.0",
4847
"grunt-contrib-uglify": "^4.0.0",
4948
"grunt-contrib-watch": "^1.1.0",
50-
"grunt-karma": "^3.0.2",
49+
"grunt-karma": "^4.0.2",
5150
"grunt-parallel": "^0.5.1",
5251
"grunt-text-replace": "^0.4.0",
5352
"grunt-vows": "^0.4.2",
54-
"grunt-webpack": "^3.1.3",
53+
"grunt-webpack": "^5.0.0",
5554
"istanbul-instrumenter-loader": "^3.0.1",
5655
"jade": "~0.27.7",
5756
"jasmine-core": "^2.3.4",
5857
"jquery-mockjax": "^2.5.0",
59-
"karma": "^5.0.4",
60-
"karma-browserstack-launcher": "^1.5.1",
58+
"karma": "^6.4.2",
6159
"karma-chai": "^0.1.0",
6260
"karma-chrome-launcher": "^2.2.0",
6361
"karma-expect": "^1.1.0",
@@ -70,20 +68,19 @@
7068
"karma-safari-launcher": "^0.1.1",
7169
"karma-sinon": "^1.0.4",
7270
"karma-sourcemap-loader": "^0.3.5",
73-
"karma-webpack": "^4.0.2",
74-
"mocha": "^7.1.2",
71+
"karma-webpack": "^5.0.0",
72+
"mocha": "^10.2.0",
7573
"natives": "^1.1.6",
7674
"nock": "^11.9.1",
7775
"node-libs-browser": "^0.5.2",
78-
"request": "^2.88.0",
7976
"requirejs": "^2.1.20",
8077
"script-loader": "0.6.1",
8178
"sinon": "^8.1.1",
8279
"stackframe": "^0.2.2",
8380
"strict-loader": "^1.2.0",
8481
"time-grunt": "^1.0.0",
8582
"vows": "^0.8.3",
86-
"webpack": "^4.46.0"
83+
"webpack": "^5.88.2"
8784
},
8885
"optionalDependencies": {
8986
"decache": "^3.0.5"

‎webpack.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ var outputPath = path.resolve(__dirname, 'dist');
88

99
var defaultsPlugin = new webpack.DefinePlugin(defaults);
1010
var uglifyPlugin = new TerserPlugin({
11-
sourceMap: true,
1211
parallel: true
1312
});
1413

0 commit comments

Comments
 (0)
Please sign in to comment.