Skip to content

Commit

Permalink
Merge branch 'master' into remove-duplicated-code
Browse files Browse the repository at this point in the history
  • Loading branch information
matux authored Mar 7, 2024
2 parents a7dd9da + 04e15e0 commit 651931b
Show file tree
Hide file tree
Showing 27 changed files with 9,889 additions and 383 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,42 @@ name: Rollbar.js CI

on:
push:
branches: [ master ]
tags: [ v* ]
branches: [master]
tags: [v*]
pull_request:
branches: [ master ]
branches: [master]

jobs:
build:
runs-on: ubuntu-20.04

strategy:
matrix:
node-version: [10, 12, 14, 16]
include:
- node: 14
npm: ^8
- node: 16
npm: ^8
- node: 18
npm: ^9
- node: 20
npm: ^10
- node: latest
npm: latest

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install node.js
uses: actions/setup-node@v2-beta
- name: Set up node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: ${{ matrix.node }}

- name: Update npm
run: npm install -g npm@${{ matrix.npm }}

- name: npm install
run: npm install
Expand Down
15 changes: 11 additions & 4 deletions dist/rollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4688,7 +4688,7 @@ module.exports = {


module.exports = {
version: '2.26.2',
version: '2.26.3',
endpoint: 'api.rollbar.com/api/1/item/',
logLevel: 'debug',
reportLevel: 'debug',
Expand Down Expand Up @@ -5140,7 +5140,9 @@ Instrumenter.prototype.instrumentNetwork = function() {
var xhrp = this._window.XMLHttpRequest.prototype;
replace(xhrp, 'open', function(orig) {
return function(method, url) {
if (_.isType(url, 'string')) {
var isUrlObject = _isUrlObject(url)
if (_.isType(url, 'string') || isUrlObject) {
url = isUrlObject ? url.toString() : url;
if (this.__rollbar_xhr) {
this.__rollbar_xhr.method = method;
this.__rollbar_xhr.url = url;
Expand Down Expand Up @@ -5303,8 +5305,9 @@ Instrumenter.prototype.instrumentNetwork = function() {
var input = args[0];
var method = 'GET';
var url;
if (_.isType(input, 'string')) {
url = input;
var isUrlObject = _isUrlObject(input)
if (_.isType(input, 'string') || isUrlObject) {
url = isUrlObject ? input.toString() : input;
} else if (input) {
url = input.url;
if (input.method) {
Expand Down Expand Up @@ -5731,6 +5734,10 @@ Instrumenter.prototype.removeListeners = function(section) {
}
};

function _isUrlObject(input) {
return typeof URL !== 'undefined' && input instanceof URL
}

module.exports = Instrumenter;


Expand Down
2 changes: 1 addition & 1 deletion dist/rollbar.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/rollbar.min.js

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions dist/rollbar.named-amd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/rollbar.named-amd.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/rollbar.named-amd.min.js

Large diffs are not rendered by default.

15 changes: 11 additions & 4 deletions dist/rollbar.noconflict.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/rollbar.noconflict.umd.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/rollbar.noconflict.umd.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 651931b

Please sign in to comment.