Skip to content
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

### Dependencies

- Update @bugsnag/cuid to [v3.2.1] (https://github.com/bugsnag/cuid/releases/tag/v3.2.1) [#2706](https://github.com/bugsnag/bugsnag-js/pull/2706)
- Update bugsnag-cocoa to [v6.35.0](https//github.com/bugsnag/bugsnag-cocoa/releases/tag/v6.35.0) [#2663](https://github.com/bugsnag/bugsnag-js/pull/2663)
- Update bugsnag-android to [v6.22.0](https//github.com/bugsnag/bugsnag-android/releases/tag/v6.22.0) [#2656](https://github.com/bugsnag/bugsnag-js/pull/2656)
- Update bugsnag-android to [v6.23.0](https//github.com/bugsnag/bugsnag-android/releases/tag/v6.23.0) [#2673](https://github.com/bugsnag/bugsnag-js/pull/2673)
Expand Down
63 changes: 47 additions & 16 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"author": "Bugsnag",
"license": "MIT",
"dependencies": {
"@bugsnag/cuid": "^3.0.0",
"@bugsnag/cuid": "^3.2.1",
"@bugsnag/safe-json-stringify": "^6.0.0",
"error-stack-parser": "^2.0.3",
"iserror": "^0.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/in-flight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"author": "Bugsnag",
"license": "MIT",
"dependencies": {
"@bugsnag/cuid": "^3.0.0"
"@bugsnag/cuid": "^3.2.1"
},
"devDependencies": {
"@bugsnag/core": "^8.8.0"
Expand Down
7 changes: 3 additions & 4 deletions packages/plugin-browser-device/device.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
const assign = require('@bugsnag/core/lib/es-utils/assign')
const BUGSNAG_ANONYMOUS_ID_KEY = 'bugsnag-anonymous-id'
const cuid = require('@bugsnag/cuid')

const getDeviceId = (win) => {
try {
const storage = win.localStorage

let id = storage.getItem(BUGSNAG_ANONYMOUS_ID_KEY)

// If we get an ID, make sure it looks like a valid cuid. The length can
// fluctuate slightly, so some leeway is built in
if (id && /^c[a-z0-9]{20,32}$/.test(id)) {
// If we get an ID, make sure it looks like a valid cuid
if (id && cuid.isCuid(id)) {
return id
}

const cuid = require('@bugsnag/cuid')
id = cuid()

storage.setItem(BUGSNAG_ANONYMOUS_ID_KEY, id)
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-browser-device/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"author": "Bugsnag",
"license": "MIT",
"dependencies": {
"@bugsnag/cuid": "^3.0.0"
"@bugsnag/cuid": "^3.2.1"
},
"devDependencies": {
"@bugsnag/core": "^8.8.0"
Expand Down
Loading