rollbar 2.26.2 → 2.26.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-20.04
13
13
  strategy:
14
14
  matrix:
15
- node-version: [8, 10, 12, 14, 16]
15
+ node-version: [10, 12, 14, 16]
16
16
 
17
17
  steps:
18
18
  - uses: actions/checkout@v2
package/Gruntfile.js CHANGED
@@ -1,9 +1,5 @@
1
1
  /**
2
2
  * 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
- *
7
3
  */
8
4
 
9
5
 
@@ -15,7 +11,6 @@ var pkg = require('./package.json');
15
11
  var fs = require('fs');
16
12
 
17
13
  var webpackConfig = require('./webpack.config.js');
18
- var browserStackBrowsers = require('./browserstack.browsers');
19
14
 
20
15
 
21
16
  function findTests(context) {
@@ -33,7 +28,7 @@ function findTests(context) {
33
28
  return mapping;
34
29
  }
35
30
 
36
- function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
31
+ function buildGruntKarmaConfig(singleRun, tests, reporters) {
37
32
  var config = {
38
33
  options: {
39
34
  configFile: './karma.conf.js',
@@ -71,10 +66,6 @@ function buildGruntKarmaConfig(singleRun, browsers, tests, reporters) {
71
66
  },
72
67
  };
73
68
 
74
- if (browsers && browsers.length) {
75
- config.options.browsers = browsers;
76
- }
77
-
78
69
  if (reporters && reporters.length) {
79
70
  config.options.reporters = reporters;
80
71
  }
@@ -112,27 +103,6 @@ module.exports = function(grunt) {
112
103
  require('time-grunt')(grunt);
113
104
 
114
105
  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
- }
136
106
 
137
107
  var singleRun = grunt.option('singleRun');
138
108
  if (singleRun === undefined) {
@@ -165,7 +135,7 @@ module.exports = function(grunt) {
165
135
  }
166
136
  },
167
137
 
168
- karma: buildGruntKarmaConfig(singleRun, browsers, browserTests, reporters),
138
+ karma: buildGruntKarmaConfig(singleRun, browserTests, reporters),
169
139
 
170
140
  replace: {
171
141
  snippets: {
@@ -188,7 +158,7 @@ module.exports = function(grunt) {
188
158
  return captures.join('\n');
189
159
  }
190
160
  },
191
- // README travis link
161
+ // README CI link
192
162
  {
193
163
  from: new RegExp('(https://github\\.com/rollbar/rollbar\\.js/workflows/Rollbar\\.js%20CI/badge\\.svg\\?branch=v)([0-9a-zA-Z.-]+)'),
194
164
  to: function(match, index, fullText, captures) {
package/dist/rollbar.js CHANGED
@@ -4688,7 +4688,7 @@ module.exports = {
4688
4688
 
4689
4689
 
4690
4690
  module.exports = {
4691
- version: '2.26.2',
4691
+ version: '2.26.3',
4692
4692
  endpoint: 'api.rollbar.com/api/1/item/',
4693
4693
  logLevel: 'debug',
4694
4694
  reportLevel: 'debug',
@@ -5140,7 +5140,9 @@ Instrumenter.prototype.instrumentNetwork = function() {
5140
5140
  var xhrp = this._window.XMLHttpRequest.prototype;
5141
5141
  replace(xhrp, 'open', function(orig) {
5142
5142
  return function(method, url) {
5143
- if (_.isType(url, 'string')) {
5143
+ var isUrlObject = _isUrlObject(url)
5144
+ if (_.isType(url, 'string') || isUrlObject) {
5145
+ url = isUrlObject ? url.toString() : url;
5144
5146
  if (this.__rollbar_xhr) {
5145
5147
  this.__rollbar_xhr.method = method;
5146
5148
  this.__rollbar_xhr.url = url;
@@ -5303,8 +5305,9 @@ Instrumenter.prototype.instrumentNetwork = function() {
5303
5305
  var input = args[0];
5304
5306
  var method = 'GET';
5305
5307
  var url;
5306
- if (_.isType(input, 'string')) {
5307
- url = input;
5308
+ var isUrlObject = _isUrlObject(input)
5309
+ if (_.isType(input, 'string') || isUrlObject) {
5310
+ url = isUrlObject ? input.toString() : input;
5308
5311
  } else if (input) {
5309
5312
  url = input.url;
5310
5313
  if (input.method) {
@@ -5731,6 +5734,10 @@ Instrumenter.prototype.removeListeners = function(section) {
5731
5734
  }
5732
5735
  };
5733
5736
 
5737
+ function _isUrlObject(input) {
5738
+ return typeof URL !== 'undefined' && input instanceof URL
5739
+ }
5740
+
5734
5741
  module.exports = Instrumenter;
5735
5742
 
5736
5743