Skip to content

Commit 80990e1

Browse files
authored
Bump CUID version and replace validation
* plat-12013 update cuid version and replace validation * plat-12013 push package.lock changes * plat-12013 fix eslint issue and update changelog.md file
1 parent 4c8e269 commit 80990e1

6 files changed

Lines changed: 54 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
### Dependencies
1717

18+
- 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)
1819
- 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)
1920
- 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)
2021
- 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)

package-lock.json

Lines changed: 47 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"author": "Bugsnag",
2121
"license": "MIT",
2222
"dependencies": {
23-
"@bugsnag/cuid": "^3.0.0",
23+
"@bugsnag/cuid": "^3.2.1",
2424
"@bugsnag/safe-json-stringify": "^6.0.0",
2525
"error-stack-parser": "^2.0.3",
2626
"iserror": "^0.0.2",

packages/in-flight/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"author": "Bugsnag",
2020
"license": "MIT",
2121
"dependencies": {
22-
"@bugsnag/cuid": "^3.0.0"
22+
"@bugsnag/cuid": "^3.2.1"
2323
},
2424
"devDependencies": {
2525
"@bugsnag/core": "^8.8.0"

packages/plugin-browser-device/device.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
const assign = require('@bugsnag/core/lib/es-utils/assign')
22
const BUGSNAG_ANONYMOUS_ID_KEY = 'bugsnag-anonymous-id'
3+
const cuid = require('@bugsnag/cuid')
34

45
const getDeviceId = (win) => {
56
try {
67
const storage = win.localStorage
78

89
let id = storage.getItem(BUGSNAG_ANONYMOUS_ID_KEY)
910

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

16-
const cuid = require('@bugsnag/cuid')
1716
id = cuid()
1817

1918
storage.setItem(BUGSNAG_ANONYMOUS_ID_KEY, id)

packages/plugin-browser-device/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"author": "Bugsnag",
1818
"license": "MIT",
1919
"dependencies": {
20-
"@bugsnag/cuid": "^3.0.0"
20+
"@bugsnag/cuid": "^3.2.1"
2121
},
2222
"devDependencies": {
2323
"@bugsnag/core": "^8.8.0"

0 commit comments

Comments
 (0)