rollbar 2.26.3 → 2.26.5

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.
Files changed (117) hide show
  1. package/.github/workflows/ci.yml +33 -11
  2. package/.lgtm.yml +7 -7
  3. package/.prettierignore +18 -0
  4. package/.vscode/settings.json +39 -0
  5. package/CHANGELOG.md +121 -35
  6. package/CLAUDE.md +28 -0
  7. package/Gruntfile.js +48 -38
  8. package/README.md +2 -4
  9. package/SECURITY.md +5 -0
  10. package/bower.json +1 -3
  11. package/defaults.js +17 -5
  12. package/dist/plugins/jquery.min.js +1 -1
  13. package/dist/rollbar.js +6107 -5461
  14. package/dist/rollbar.js.map +1 -1
  15. package/dist/rollbar.min.js +1 -1
  16. package/dist/rollbar.min.js.map +1 -1
  17. package/dist/rollbar.named-amd.js +6107 -5466
  18. package/dist/rollbar.named-amd.js.map +1 -1
  19. package/dist/rollbar.named-amd.min.js +2 -1
  20. package/dist/rollbar.named-amd.min.js.map +1 -1
  21. package/dist/rollbar.noconflict.umd.js +6128 -5488
  22. package/dist/rollbar.noconflict.umd.js.map +1 -1
  23. package/dist/rollbar.noconflict.umd.min.js +2 -1
  24. package/dist/rollbar.noconflict.umd.min.js.map +1 -1
  25. package/dist/rollbar.snippet.js +1 -1
  26. package/dist/rollbar.umd.js +6107 -5467
  27. package/dist/rollbar.umd.js.map +1 -1
  28. package/dist/rollbar.umd.min.js +2 -1
  29. package/dist/rollbar.umd.min.js.map +1 -1
  30. package/docs/extension-exceptions.md +35 -30
  31. package/docs/migration_v0_to_v1.md +41 -38
  32. package/index.d.ts +270 -231
  33. package/karma.conf.js +15 -15
  34. package/package.json +10 -12
  35. package/prettier.config.js +7 -0
  36. package/src/api.js +21 -10
  37. package/src/apiUtility.js +12 -8
  38. package/src/browser/core.js +103 -65
  39. package/src/browser/defaults/scrubFields.js +3 -3
  40. package/src/browser/detection.js +7 -8
  41. package/src/browser/domUtility.js +18 -8
  42. package/src/browser/globalSetup.js +12 -6
  43. package/src/browser/logger.js +1 -1
  44. package/src/browser/plugins/jquery.js +35 -35
  45. package/src/browser/predicates.js +1 -1
  46. package/src/browser/rollbar.js +1 -1
  47. package/src/browser/rollbarWrapper.js +8 -5
  48. package/src/browser/shim.js +43 -19
  49. package/src/browser/snippet_callback.js +6 -4
  50. package/src/browser/telemetry.js +570 -358
  51. package/src/browser/transforms.js +46 -27
  52. package/src/browser/transport/fetch.js +16 -14
  53. package/src/browser/transport/xhr.js +29 -13
  54. package/src/browser/transport.js +91 -32
  55. package/src/browser/url.js +16 -8
  56. package/src/browser/wrapGlobals.js +27 -8
  57. package/src/defaults.js +3 -3
  58. package/src/errorParser.js +14 -11
  59. package/src/merge.js +32 -23
  60. package/src/notifier.js +16 -13
  61. package/src/predicates.js +43 -23
  62. package/src/queue.js +71 -39
  63. package/src/rateLimiter.js +59 -18
  64. package/src/react-native/logger.js +1 -1
  65. package/src/react-native/rollbar.js +59 -55
  66. package/src/react-native/transforms.js +13 -9
  67. package/src/react-native/transport.js +44 -34
  68. package/src/rollbar.js +22 -13
  69. package/src/scrub.js +0 -1
  70. package/src/server/locals.js +69 -39
  71. package/src/server/logger.js +4 -4
  72. package/src/server/parser.js +72 -47
  73. package/src/server/rollbar.js +133 -55
  74. package/src/server/sourceMap/stackTrace.js +33 -18
  75. package/src/server/telemetry/urlHelpers.js +9 -11
  76. package/src/server/telemetry.js +68 -45
  77. package/src/server/transforms.js +37 -21
  78. package/src/server/transport.js +62 -32
  79. package/src/telemetry.js +92 -28
  80. package/src/transforms.js +33 -21
  81. package/src/truncation.js +8 -5
  82. package/src/utility/headers.js +43 -43
  83. package/src/utility/replace.js +9 -0
  84. package/src/utility/traverse.js +1 -1
  85. package/src/utility.js +93 -52
  86. package/test/api.test.js +31 -29
  87. package/test/apiUtility.test.js +43 -44
  88. package/test/browser.core.test.js +141 -131
  89. package/test/browser.domUtility.test.js +52 -35
  90. package/test/browser.predicates.test.js +13 -13
  91. package/test/browser.rollbar.test.js +597 -503
  92. package/test/browser.telemetry.test.js +45 -38
  93. package/test/browser.transforms.test.js +146 -128
  94. package/test/browser.transport.test.js +54 -46
  95. package/test/browser.url.test.js +12 -11
  96. package/test/fixtures/locals.fixtures.js +245 -126
  97. package/test/notifier.test.js +90 -78
  98. package/test/predicates.test.js +260 -214
  99. package/test/queue.test.js +230 -214
  100. package/test/rateLimiter.test.js +50 -42
  101. package/test/react-native.rollbar.test.js +149 -115
  102. package/test/react-native.transforms.test.js +21 -23
  103. package/test/react-native.transport.test.js +23 -11
  104. package/test/server.lambda.test.js +70 -53
  105. package/test/server.locals.test.js +437 -210
  106. package/test/server.parser.test.js +32 -26
  107. package/test/server.predicates.test.js +45 -43
  108. package/test/server.rollbar.test.js +311 -259
  109. package/test/server.telemetry.test.js +208 -83
  110. package/test/server.transforms.test.js +455 -361
  111. package/test/server.transport.test.js +144 -76
  112. package/test/telemetry.test.js +46 -37
  113. package/test/transforms.test.js +68 -66
  114. package/test/truncation.test.js +55 -53
  115. package/test/utility.test.js +279 -222
  116. package/webpack.config.js +46 -42
  117. package/.gitmodules +0 -3
@@ -2,30 +2,52 @@ name: Rollbar.js CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
6
- tags: [ v* ]
5
+ branches: [next/2.x/main]
6
+ tags: [v*]
7
7
  pull_request:
8
- branches: [ master ]
8
+ branches: [next/2.x/main]
9
9
 
10
10
  jobs:
11
11
  build:
12
- runs-on: ubuntu-20.04
12
+ runs-on: ubuntu-22.04
13
+
13
14
  strategy:
14
15
  matrix:
15
- node-version: [10, 12, 14, 16]
16
+ include:
17
+ - node: 14
18
+ npm: ^8
19
+ - node: 16
20
+ npm: ^8
21
+ - node: 18
22
+ npm: ^9
23
+ - node: 20
24
+ npm: ^10
25
+ - node: latest
26
+ npm: latest
16
27
 
17
28
  steps:
18
- - uses: actions/checkout@v2
19
- with:
20
- submodules: recursive
29
+ - name: Checkout
30
+ uses: actions/checkout@v4
21
31
 
22
- - name: Install node.js
23
- uses: actions/setup-node@v2-beta
32
+ - name: Set up node ${{ matrix.node }}
33
+ uses: actions/setup-node@v4
24
34
  with:
25
- node-version: ${{ matrix.node-version }}
35
+ node-version: ${{ matrix.node }}
36
+
37
+ - name: Update npm
38
+ run: npm install -g npm@${{ matrix.npm }}
26
39
 
27
40
  - name: npm install
28
41
  run: npm install
29
42
 
43
+ - name: Lint
44
+ uses: wearerequired/lint-action@v2
45
+ with:
46
+ github_token: ${{ secrets.GITHUB_TOKEN }}
47
+ prettier: true
48
+ eslint: true
49
+ eslint_args: '--max-warnings 0'
50
+ eslint_extensions: js
51
+
30
52
  - name: Run tests
31
53
  run: npm run test_ci
package/.lgtm.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  path_classifiers:
2
- generated:
3
- - release
4
- - dist
5
- docs:
6
- - examples
7
- test:
8
- - test
2
+ generated:
3
+ - release
4
+ - dist
5
+ docs:
6
+ - examples
7
+ test:
8
+ - test
@@ -0,0 +1,18 @@
1
+ .github
2
+ .next
3
+ .yalc
4
+ build
5
+ bundles
6
+ coverage
7
+ dist
8
+ lib
9
+ node_modules
10
+ out
11
+ public
12
+ release
13
+ vendor
14
+
15
+ # ignore prettifying examples for now due to
16
+ # 1. there being minified snippets all over the place and
17
+ # 2. some tests fail cause they depend on some sources being exactly as they are
18
+ examples
@@ -0,0 +1,39 @@
1
+ {
2
+ "[github-actions-workflow]": {
3
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
4
+ "editor.formatOnSave": true
5
+ },
6
+ "[javascript]": {
7
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
8
+ "editor.formatOnSave": true
9
+ },
10
+ "[javascriptreact]": {
11
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
12
+ "editor.formatOnSave": true
13
+ },
14
+ "[json5]": {
15
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
16
+ "editor.formatOnSave": true
17
+ },
18
+ "[jsonc]": {
19
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
20
+ "editor.formatOnSave": true
21
+ },
22
+ "[typescript]": {
23
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
24
+ "editor.formatOnSave": true
25
+ },
26
+ "[typescriptreact]": {
27
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
28
+ "editor.formatOnSave": true
29
+ },
30
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
31
+ "editor.formatOnSave": true,
32
+ "editor.formatOnSaveMode": "file",
33
+ "editor.tabSize": 2,
34
+ "editor.codeActionsOnSave": {
35
+ "source.fixAll.eslint": "explicit"
36
+ },
37
+ "files.trimTrailingWhitespace": true,
38
+ "prettier.useEditorConfig": false
39
+ }
package/CHANGELOG.md CHANGED
@@ -24,7 +24,6 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
24
24
  The boolean configuration options `captureEmail` and `captureUsername` can be used to change
25
25
  this behaviour.
26
26
 
27
-
28
27
  ## v2.3.6
29
28
 
30
29
  - Updates for React Native
@@ -46,26 +45,26 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
46
45
 
47
46
  ## v2.3.2
48
47
 
49
- - Be defensive about navigator not existing on window
50
- [#514](https://github.com/rollbar/rollbar.js/pull/514)
48
+ - Be defensive about navigator not existing on window
49
+ [#514](https://github.com/rollbar/rollbar.js/pull/514)
51
50
 
52
- - Proper scrubbing
53
- [#510](https://github.com/rollbar/rollbar.js/pull/510)
51
+ - Proper scrubbing
52
+ [#510](https://github.com/rollbar/rollbar.js/pull/510)
54
53
 
55
- - Be defensive when accessing event properties
56
- [#503](https://github.com/rollbar/rollbar.js/pull/503)
54
+ - Be defensive when accessing event properties
55
+ [#503](https://github.com/rollbar/rollbar.js/pull/503)
57
56
 
58
57
  - Add environment to options type enhancement
59
- [#499](https://github.com/rollbar/rollbar.js/pull/499)
58
+ [#499](https://github.com/rollbar/rollbar.js/pull/499)
60
59
 
61
- - call the transform in the options on the server side too
62
- [#498](https://github.com/rollbar/rollbar.js/pull/498)
60
+ - call the transform in the options on the server side too
61
+ [#498](https://github.com/rollbar/rollbar.js/pull/498)
63
62
 
64
- - fixes errMsg.match is not a function error
65
- [#492](https://github.com/rollbar/rollbar.js/pull/492)
63
+ - fixes errMsg.match is not a function error
64
+ [#492](https://github.com/rollbar/rollbar.js/pull/492)
66
65
 
67
- - Call callback even if logging same as last error
68
- [#490](https://github.com/rollbar/rollbar.js/pull/490)
66
+ - Call callback even if logging same as last error
67
+ [#490](https://github.com/rollbar/rollbar.js/pull/490)
69
68
 
70
69
  ## v2.3.1
71
70
 
@@ -105,16 +104,20 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
105
104
  - Fix some typescript declaration issues
106
105
 
107
106
  ## v2.2.7
107
+
108
108
  - Ensure scrubbing has the right value for telemetry inputs if `scrubTelemetryInputs` is true.
109
109
  - Fix memory leak related to network requests
110
110
 
111
111
  ## v2.2.6
112
+
112
113
  - Fix blacklist issue
113
114
 
114
115
  ## v2.2.5
116
+
115
117
  - Revert `isNative` check for replacing JSON functions
116
118
 
117
119
  ## v2.2.4
120
+
118
121
  - Fix a "race" condition in how wait works
119
122
  - Add two options to control scrubbing of telemetry input events: `scrubTelemetryInputs` and
120
123
  `telemetryScrubber`.
@@ -126,9 +129,11 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
126
129
  rather than an integer.
127
130
 
128
131
  ## v2.2.3
132
+
129
133
  - Actually make collecting network telemetry on by default
130
134
 
131
135
  ## v2.2.2
136
+
132
137
  - Fix bug in network telemetry that was wrapping onreadystatechage in correctly
133
138
  - Enable collecting network telemetry by default
134
139
  - Fix stack overflow issue due to scrubbing of self-referential objects
@@ -137,43 +142,48 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
137
142
  - Make the typescript type declarations better
138
143
 
139
144
  ## v2.2.1
145
+
140
146
  - Disable collection of network telemetry data by default
141
147
 
142
148
  ## v2.2.0
149
+
143
150
  - Telemetry data is now collected by default in the browser. See
144
151
  [README.md](https://github.com/rollbar/rollbar.js#telemetry)
145
152
  for information and configuration details.
146
153
  - Fix some typos in the typescript declarations
147
154
 
148
155
  ## v2.1.3
156
+
149
157
  - Actually change version number in package.json and build all relevant files
150
158
 
151
159
  ## v2.1.2
160
+
152
161
  - Actually send the client-side UUID with the item
153
162
  - Fix typos in typescript declaration
154
163
 
155
164
  ## v2.1.1
156
165
 
157
- - Allow more flexibility of request objects
158
- [#346](https://github.com/rollbar/rollbar.js/pull/346)
159
- - Address issue with handleItemWithError possible not calling the callback
160
- [#345](https://github.com/rollbar/rollbar.js/pull/345)
161
- - Fixed a typo in README.md
162
- [#343](https://github.com/rollbar/rollbar.js/pull/343)
163
- - unify configuration options
164
- [#341](https://github.com/rollbar/rollbar.js/pull/341)
165
- - add some intervals to keep the event loop running when wait is called
166
- [#338](https://github.com/rollbar/rollbar.js/pull/338)
167
- - [Fixes #336] Propagate message
168
- [#337](https://github.com/rollbar/rollbar.js/pull/337)
169
- - [Fixes #269] get rid of rollbar wrapper stack frames
170
- [#335](https://github.com/rollbar/rollbar.js/pull/335)
171
- - first pass at a typescript declaration file
172
- [#334](https://github.com/rollbar/rollbar.js/pull/334)
173
- - Fix #331 Verbose logging was using the wrong key structure
174
- [#332](https://github.com/rollbar/rollbar.js/pull/332)
166
+ - Allow more flexibility of request objects
167
+ [#346](https://github.com/rollbar/rollbar.js/pull/346)
168
+ - Address issue with handleItemWithError possible not calling the callback
169
+ [#345](https://github.com/rollbar/rollbar.js/pull/345)
170
+ - Fixed a typo in README.md
171
+ [#343](https://github.com/rollbar/rollbar.js/pull/343)
172
+ - unify configuration options
173
+ [#341](https://github.com/rollbar/rollbar.js/pull/341)
174
+ - add some intervals to keep the event loop running when wait is called
175
+ [#338](https://github.com/rollbar/rollbar.js/pull/338)
176
+ - [Fixes #336] Propagate message
177
+ [#337](https://github.com/rollbar/rollbar.js/pull/337)
178
+ - [Fixes #269] get rid of rollbar wrapper stack frames
179
+ [#335](https://github.com/rollbar/rollbar.js/pull/335)
180
+ - first pass at a typescript declaration file
181
+ [#334](https://github.com/rollbar/rollbar.js/pull/334)
182
+ - Fix #331 Verbose logging was using the wrong key structure
183
+ [#332](https://github.com/rollbar/rollbar.js/pull/332)
175
184
 
176
185
  ## v2.1.0
186
+
177
187
  - Use the upstream version of console-polyfill: [#306](https://github.com/rollbar/rollbar.js/pull/306)
178
188
  - The verbose option still existed but didn't do anything, this adds back the functionality to
179
189
  output some information to the console: [#311](https://github.com/rollbar/rollbar.js/pull/311)
@@ -197,10 +207,12 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
197
207
  match what we allow in the browser: [#329](https://github.com/rollbar/rollbar.js/pull/329)
198
208
 
199
209
  ## v2.0.4
210
+
200
211
  - Fixes a small typo in the unhandled rejection handler. (pr#303)
201
- - Updated the no-conflict example to use the new noconflict bundle and updated docs.
212
+ - Updated the no-conflict example to use the new noconflict bundle and updated docs.
202
213
 
203
214
  ## v2.0.3
215
+
204
216
  - Decreased NPM package size by removing examples and coverage directories. (pr#276)
205
217
  - Handle unordered params on the server side. (pr#286)
206
218
  - Fixes a server-side bug which failed to report an error if the request did not contain a `headers` key. (pr#288)
@@ -210,13 +222,16 @@ The change log has moved to this repo's [GitHub Releases Page](https://github.co
210
222
  - Added a no-conflict bundle for the browser. (pr#295)
211
223
 
212
224
  ## v2.0.2
225
+
213
226
  - Added/updated docs on how to use rollbar.js with React, Angular 1 & 2, Ember, Backbone.js
214
227
  - Fixed a bug which was not respecting the `enabled` flag. (pr#280)
215
228
 
216
229
  ## v2.0.1
230
+
217
231
  - Maintenance release - No new features or bugfixes
218
232
 
219
233
  ## v2.0.0
234
+
220
235
  This release is the first where the library supports both browser and node environments from the
221
236
  same package. We decided to deprecate the `rollbar-browser` npm package in favor of using the
222
237
  `rollbar` npm package for all javascript environments. This single codebase now handles both
@@ -247,6 +262,7 @@ be noticable. However, there are a few cases where one might run in to trouble.
247
262
  the convenience instance located at `window.Rollbar` will be setup as this handler.
248
263
 
249
264
  **v1.9.4**
265
+
250
266
  - Updated to the newest version of console-polyfill (pr#244)
251
267
  - Log functions now return an object with the uuid as one of the keys (pr#236)
252
268
  - Fix issue related to Object.assign which caused problems on IE8 (pr#246)
@@ -255,16 +271,20 @@ be noticable. However, there are a few cases where one might run in to trouble.
255
271
  `[object Object]` (pr#249)
256
272
 
257
273
  **v1.9.3**
274
+
258
275
  - Serve rollbar.js from CDNJS
259
276
 
260
277
  **v1.9.2**
278
+
261
279
  - Fix bug which would break `Rollbar.wrap()` if a string was thrown. (pr#222)
262
280
 
263
281
  **v1.9.1**
282
+
264
283
  - Re-add rollbar.snippet.js to the Bower distribution. (pr#196)
265
284
  - This re-adds `dist/rollbar.snippet.js` to be backwards compatible with v1.8.5
266
285
 
267
286
  **v1.9.0**
287
+
268
288
  - Added support for arrays as custom data. (pr#194)
269
289
  - Documentation added for disabling Rollbar in the presence of ad blockers. (pr#190)
270
290
  - Added support for unhandled rejections from Promises. (pr#192)
@@ -278,21 +298,27 @@ be noticable. However, there are a few cases where one might run in to trouble.
278
298
  - `src`
279
299
 
280
300
  **v1.8.5**
301
+
281
302
  - Support retrying after being in offline mode. (pr#186)
282
303
 
283
304
  **v1.8.4**
305
+
284
306
  - Check messages body for ignored messages. (pr#180)
285
307
 
286
308
  **v1.8.3**
309
+
287
310
  - Fix a bug introduced in 1.8.0 where payload options were being removed by calls to `configure()`. (pr#176)
288
311
 
289
312
  **v1.8.2**
313
+
290
314
  - Using the latest error-stack-parser from NPM. (pr#171)
291
315
 
292
316
  **v1.8.1**
317
+
293
318
  - Changed the error-stack-parser dependency to use git+https. (pr#168)
294
319
 
295
320
  **v1.8.0**
321
+
296
322
  - Fixed a few bugs in IE9, IE8 which were not recognozing `Error` instances properly. (pr#164)
297
323
  - Changed the behavior of `.global()` to only store options that we know how to process. (pr#164)
298
324
  - Refactored the code to remove custom polyfills. (pr#164)
@@ -300,24 +326,30 @@ be noticable. However, there are a few cases where one might run in to trouble.
300
326
  - Fixed a bug in the jQuery plugin which would cause an error to be thrown in the internal `checkIgnore()` function. (pr#161)
301
327
 
302
328
  **v1.7.5**
329
+
303
330
  - Fix bug when checking window.onerror.belongsToShim.
304
331
 
305
332
  **v1.7.4**
333
+
306
334
  - Don't save shim's onerror when we are building globalnotifier.
307
335
  This fixes tests using window.onerror on a browser console
308
336
  - Fix Default endpoint on docs/configuration.md
309
337
 
310
338
  **v1.7.3**
339
+
311
340
  - Added a named AMD module to the list of build targets. (pr#151)
312
341
 
313
342
  **v1.7.2**
343
+
314
344
  - Bumped version so that NPM lists 1.7.2 as the latest, (was pointing to 1.6.0) (issue#148)
315
345
 
316
346
  **v1.7.1**
347
+
317
348
  - Integrated karma tests. (pr#130)
318
349
  - Added warning message for common issue with `loadFull()`
319
350
 
320
351
  **v1.7.0**
352
+
321
353
  - Fixed a bug that was not recognizing custom Error subclasses as valid errors. (pr#142)
322
354
  - Added documentation for the `hostWhiteList` option. (pr#138)
323
355
  - Changed the default uncaught error level to "error" instead of "warning".
@@ -326,14 +358,17 @@ be noticable. However, there are a few cases where one might run in to trouble.
326
358
  asynchronously. This option is set to `true` by default.
327
359
 
328
360
  **v1.6.1**
361
+
329
362
  - Updated bower.json to contain only a single .js entry. (issue#126)
330
363
 
331
364
  **v1.6.0**
365
+
332
366
  - Fixed a bug that caused IE 8 to not properly initialize `window.Rollbar`. (pr#129)
333
367
  - Fixed the `XDomainRequest` code to work properly in IE 8.
334
368
  - Updated error parsing to provide more useful information for IE 8 errors
335
369
 
336
370
  **v1.5.0**
371
+
337
372
  - Published rollbar.js to npmjs.com as rollbar-browser. (pr#127)
338
373
  - Fixes a bug where thrown non-error objects were not properly handled. (pr#125)
339
374
  - Fixes a bug that was logging an incorrect message when the notifier was disabled. (pr#124)
@@ -341,158 +376,204 @@ be noticable. However, there are a few cases where one might run in to trouble.
341
376
  - Lots of code cleanup and smaller minified file size.
342
377
 
343
378
  **v1.4.4**
379
+
344
380
  - Remove the `window.onload` event handler from the snippet and just create the script tag for the full rollbar.js source directly. (pr#120)
345
381
 
346
382
  **v1.4.3**
383
+
347
384
  - Fixed a bug that would cause the notifier to crash when run in a Selenium test. (pr#117)
348
385
  - Force the notifier to always use HTTPS when communicating with api.rollbar.com. (pr#116)
349
386
 
350
387
  **v1.4.2**
388
+
351
389
  - Fixed a bug that occurred in FF when Rollbar logged an internal error or if verbose mode was turned on. (pr#105)
352
390
 
353
391
  **v1.4.1**
392
+
354
393
  - Fixed a bug that would load the wrong AMD module if a custom "rollbar" module was already defined.
355
394
  - Customers should copy and paste the new snippet into their code.
356
395
 
357
396
  **v1.4.0**
397
+
358
398
  - Fix a bug, (introduced in v1.3) that caused Rollbar to generate an error when used with RequireJS.
359
399
  - Customers should copy and paste the new snippet into their code.
360
400
 
361
401
  **v1.3.0**
402
+
362
403
  - Add more strict JSHint options and fix errors/warnings.
363
404
 
364
405
  **v1.3.0-rc.4**
406
+
365
407
  - Fixes IE8 bug where JSON was not defined.
366
408
 
367
409
  **v1.3.0-rc.3**
410
+
368
411
  - Remove polyfill.
369
412
 
370
413
  **v1.3.0-rc.2**
414
+
371
415
  - Fix main values in bower.json.
372
416
 
373
417
  **v1.3.0-rc.1**
418
+
374
419
  - Fixes for IE8+
375
420
 
376
421
  **v1.3.0-alpha.5**
422
+
377
423
  - Fix rollbar.umd.min.js URL in the snippet
378
424
  - Remove sourceMappingURL comment due to browser bug concerns
379
425
 
380
426
  **v1.3.0-alpha.4**
427
+
381
428
  - Update CHANGELOG.md.
382
429
 
383
430
  **v1.3.0-alpha.3**
431
+
384
432
  - Remove repeated timer to send enqueued payloads.
385
433
  - Change argument name in Stack() to fix uglify bug.
386
- - Change __DEFAULT_ROLLBARJS_URL__ to use https.
387
- - Set window._globalRollbarOptions when calling .configure().
434
+ - Change **DEFAULT_ROLLBARJS_URL** to use https.
435
+ - Set window.\_globalRollbarOptions when calling .configure().
388
436
 
389
437
  **v1.3.0-alpha.2**
438
+
390
439
  - Update missing dist/ files.
391
440
 
392
441
  **v1.3.0-alpha.1**
442
+
393
443
  - Build the library using webpack.
394
444
  - Replace tracekit and use error-stack-parser.
395
445
 
396
446
  **1.2.2**
447
+
397
448
  - Added `nojson` distribution, for use on sites with a Content Security Policy that disallows `unsafe-eval`. (The standard distributions ship with a built-in JSON implementation, since external libraries, such as MooTools, sometimes break the brower's built-in JSON.) If you know that the built-in JSON is not being modified in your application, or you are disallowing `unsafe-eval`, use this distribution.
398
449
 
399
450
  **1.2.1**
451
+
400
452
  - Fixed bug where the global notifier not being used to atch event listener exceptions. (pr#70)
401
453
 
402
454
  **1.2.0**
455
+
403
456
  - Fixed AMD build to now return the notifier instance from the `init()` method.
404
457
 
405
458
  **1.1.16 - EDIT: This version has been removed due to finding a bug that broke backward compatibility.**
459
+
406
460
  - Optimized the AMD build to not create a Notifier instance until the `init()` method is called.
407
461
 
408
462
  **1.1.15**
463
+
409
464
  - Fix a bug where custom context functions that returned `undefined` were causing `Rollbar.wrap()` to throw an error.
410
465
 
411
466
  **1.1.14**
467
+
412
468
  - Fix a bug in IE8 where DOMException was being used even though it's not defined, (#62).
413
469
 
414
470
  **1.1.13**
471
+
415
472
  - Add `responseText` and `statusText` to the data reported by the jQuery ajax plugin, (pr#61).
416
473
 
417
474
  **1.1.12**
475
+
418
476
  - Fixes a bug where `DOMException` objects were not recognized as error objects. (#55).
419
477
 
420
478
  **1.1.11**
479
+
421
480
  - Fixes a bug where wrapped functions were crashing when a `null` callback was given to `removeEventListener()`, (pr#50).
422
481
 
423
482
  **1.1.10**
483
+
424
484
  - Pulls in the latest JSON-js changes that do not call `.toJSON()` if the method exists already. This was breaking because MooTools v1.2.4 sets `.toJSON()` to use a broken JSON stringify implementation.
425
485
 
426
486
  **1.1.9**
487
+
427
488
  - Always use the custom JSON implementation since some users are initializing a library that will overwrite a working `JSON.stringify()` with a broken one after Rollbar has checked for `JSON.stringify()` correctness.
428
489
 
429
490
  **1.1.8**
491
+
430
492
  - Added a callback function to `loadFull()` to support Segment.io's plugin model.
431
493
 
432
494
  **1.1.7**
495
+
433
496
  - Added `verbose` and `logFunction` options, (pr#42).
434
497
 
435
498
  **1.1.6**
499
+
436
500
  - Added a `_wrappedSource` key to exceptions caught by the `wrap()` method to record the source of the wrapped function.
437
501
 
438
502
  **1.1.5**
503
+
439
504
  - Added a `context` parameter to `Rollbar.wrap()`, (#26).
440
505
  - Added a `transform` option to allow the user to read/modify the payload before we send it to Rollbar, (#41 #43).
441
506
 
442
507
  **1.1.4**
508
+
443
509
  - Added the `enabled` flag to determine when we should enqueue payloads to be sent, (#28).
444
510
 
445
511
  **1.1.3**
512
+
446
513
  - Fixed a bug that was causing a stack overflow error in IE8, (#38).
447
514
  - Shaved off a few bytes from the snippet's size.
448
515
 
449
516
  **1.1.2**
517
+
450
518
  - Fixed a bug that was causing `Rollbar.configure()` to incorrectly handle overwriting array configuration.
451
519
  - Added in support for a `ignoredMessages` configuration option, (pr#35).
452
520
  - Fixed a bug that was causing some `EventListener` objects to not be unbound, (pr#33).
453
521
  - Updated the snippet with fixes.
454
522
 
455
523
  **1.1.1**
524
+
456
525
  - Fixed a bug with default rate limits. The defaults were not applied unless Rollbar.global() was called.
457
526
 
458
527
  **1.1.0**
528
+
459
529
  - Add support for AMD JS loaders and refactor rollbar.require.js into rollbar.amd.js and rollbar.commonjs.js.
460
530
 
461
531
  **1.0.0-rc.11**
532
+
462
533
  - Add support for whitelisting host names/domains, (pr#31).
463
534
 
464
535
  **1.0.0-rc.10**
536
+
465
537
  - Add support for using rollbar with Webpack/Browserify via `require("rollbar.require.min.js")` with examples.
466
538
 
467
539
  **1.0.0-rc.9**
540
+
468
541
  - Fixed a bug that caused a wrapped async handler to break if there was no callback provided.
469
542
 
470
543
  **1.0.0-rc.8**
544
+
471
545
  - Fixed a bug that created/used a global variable.
472
546
 
473
547
  **1.0.0-rc.7**
548
+
474
549
  - Change default reportLevel to `debug`. Previously, calls to `Rollbar.info` and `Rollbar.debug` were filtered out under the default configuration; now they are let through.
475
550
 
476
551
  **1.0.0-rc.6**
552
+
477
553
  - Fixed a bug where items were sent in reverse order when queued
478
554
  - Add `maxItems` global option. If defined, at most this many items per pageview will be sent. Default `0`, meaning "no limit".
479
555
 
480
556
  **1.0.0-rc.5**
557
+
481
558
  - Fix invalid payload generated when a non-Error object is passed as the error (#20)
482
559
  - Pass correct window.onerror args to original onerror (#23)
483
560
  - jQuery plugin: ignore status 0 events (#22)
484
561
  - Fix issue where callbacks to `.debug()`, etc. were not called if reportLevel filters the item (#24)
485
562
 
486
563
  **1.0.0-rc.4**
564
+
487
565
  - Fix snippet in IE8 (change `map` to a for loop)
488
566
 
489
567
  **1.0.0-rc.3**
568
+
490
569
  - Remove source maps from build process (no user-facing changes)
491
570
 
492
571
  **1.0.0-rc.2**
572
+
493
573
  - Send access token as a request header in browsers that support XMLHttpRequest
494
574
 
495
575
  **1.0.0-rc.1**
576
+
496
577
  - Fix bug where we were attempting to wrap an object instead of a function.
497
578
  - https://github.com/rollbar/rollbar.js/pull/17
498
579
  - Fix bug in jQuery plugin that wasn't passing along the jQuery object.
@@ -501,17 +582,21 @@ be noticable. However, there are a few cases where one might run in to trouble.
501
582
  - https://github.com/rollbar/rollbar.js/blob/master/docs/migration_v0_to_v1.md
502
583
 
503
584
  **1.0.0-beta9**
585
+
504
586
  - Fix api response JSON parsing on older browsers
505
587
 
506
588
  **1.0.0-beta8**
589
+
507
590
  - Fix uncaught errors being ignored in some browsers
508
591
  - Default uncaught error level now `warning` instead of `error`, also configurable
509
592
  - Wrap `addEventListener` to get more rich stack trace info for uncaught exceptions
510
593
 
511
594
  **1.0.0-beta7**
595
+
512
596
  - Use a custom JSON.stringify method if the existing one does not work properly.
513
597
 
514
598
  **1.0.0-beta4**
599
+
515
600
  - Fix some documentation bugs
516
601
  - Changes made to the snippet to put `environment` in the `payload` key.
517
602
  - Remove the default `context` value and associated logic around it being either a string or a function.
@@ -519,4 +604,5 @@ be noticable. However, there are a few cases where one might run in to trouble.
519
604
  ## Upgrade Instructions
520
605
 
521
606
  ### v1.0.x to v1.1.x
607
+
522
608
  1. Replace your rollbar snippet with the latest from the [rollbar.js quickstart docs](https://rollbar.com/docs/notifier/rollbar.js/) or from [the GitHub repo](https://github.com/rollbar/rollbar.js/blob/master/dist/rollbar.snippet.js).
package/CLAUDE.md ADDED
@@ -0,0 +1,28 @@
1
+ # Rollbar.js Development Guide
2
+
3
+ ## Build/Lint/Test Commands
4
+ - Build: `npm run build`
5
+ - Lint: `npm run lint`
6
+ - Test all: `npm run test`
7
+ - Test browser: `npm run test-browser`
8
+ - Test server: `npm run test-server`
9
+ - Single test: `./node_modules/.bin/karma start --single-run --files={path/to/test}`
10
+
11
+ ## Code Style
12
+ - Use ESLint with extends: `eslint:recommended`
13
+ - Single quotes for strings
14
+ - CamelCase for variables (properties excluded)
15
+ - Trailing commas for all multi-line objects/arrays
16
+ - Maximum complexity: 35
17
+ - Underscore prefix allowed for private methods/variables
18
+ - Prefix unused parameters with underscore: `function(data, _unused)`
19
+ - Use Prettier with default config for formatting
20
+
21
+ ## Error Handling
22
+ - Prefer try/catch blocks around risky operations
23
+ - Log errors through Rollbar's own logger system
24
+ - Scrub sensitive fields in error payloads (see package.json defaults)
25
+
26
+ ## TypeScript Support
27
+ - Type definitions in index.d.ts
28
+ - Add JSDoc types to enable intellisense when needed