From 9e37ce165bce75a167370e4a30f72b4a1b63244e Mon Sep 17 00:00:00 2001 From: ilkin-overleaf <100852799+ilkin-overleaf@users.noreply.github.com> Date: Thu, 4 Aug 2022 12:38:30 +0300 Subject: [PATCH] Merge pull request #9119 from overleaf/ii-update-sentry [web] Update @sentry/browser to latest GitOrigin-RevId: 9358e53b849c765c21ba120baf3e817aa66b9e7c --- package-lock.json | 112 +++++++++++++++--- .../js/infrastructure/error-reporter.js | 4 +- services/web/package.json | 2 +- 3 files changed, 100 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 882caeb4ff..e4c2d3272f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4603,17 +4603,64 @@ } }, "node_modules/@sentry/browser": { - "version": "6.17.3", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-6.17.3.tgz", - "integrity": "sha512-UElPk6/Q/78eL8tHGHy080uHVQAuieWXlSMSzrJMVNa+vwXPwEeyL+WbPtKkND2jGwdODjg+pSj960RqhIv+ig==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.8.1.tgz", + "integrity": "sha512-9JuagYqHyaZu/4RqyxrAgEHo71oV592XBuUKC33gajCVKWbyG3mNqudSMoHtdM1DrV9REZ4Elha7zFaE2cJX6g==", "dependencies": { - "@sentry/core": "6.17.3", - "@sentry/types": "6.17.3", - "@sentry/utils": "6.17.3", + "@sentry/core": "7.8.1", + "@sentry/types": "7.8.1", + "@sentry/utils": "7.8.1", "tslib": "^1.9.3" }, "engines": { - "node": ">=6" + "node": ">=8" + } + }, + "node_modules/@sentry/browser/node_modules/@sentry/core": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.8.1.tgz", + "integrity": "sha512-PRivbdIzApi/gSixAxozhOBTylSVdw/9VxaStYHd7JJGhs36KXkV8ylpbCmYO4ap7/Ue9/slzwpvPOJJzmzAgA==", + "dependencies": { + "@sentry/hub": "7.8.1", + "@sentry/types": "7.8.1", + "@sentry/utils": "7.8.1", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/browser/node_modules/@sentry/hub": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-7.8.1.tgz", + "integrity": "sha512-AxwyGyS9Lp4XsURu4t8opa5vZ+NAB6I/n+B/Uix3YZea9z8jdWYAu9vsXSizOrtxekc/i7ZN4bnlNgXVHix0iA==", + "dependencies": { + "@sentry/types": "7.8.1", + "@sentry/utils": "7.8.1", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/browser/node_modules/@sentry/types": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.8.1.tgz", + "integrity": "sha512-LOoaeBXVI23Kh5SpIbxSRiJ6+eYZXVOFyPFH1T1mGBj95LPwRMqOdg0lUTmFJGBKbDGDB/YNjNnu1kQ7GrXBXw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/browser/node_modules/@sentry/utils": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.8.1.tgz", + "integrity": "sha512-isUZjft4HWTOk1Z58KFJ/zzXeFtIJgP82CkYQlW464ZR2WCqPHYlXXXRWZpOHOfMnrf+gWeX9WAGS9rTAdhiSg==", + "dependencies": { + "@sentry/types": "7.8.1", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" } }, "node_modules/@sentry/browser/node_modules/tslib": { @@ -34529,7 +34576,7 @@ "@reach/tabs": "^0.15.0", "@replit/codemirror-emacs": "overleaf/codemirror-emacs#90bcadaaaf38ed0d88cf15f0ddb8e868ca253e17", "@replit/codemirror-vim": "^6.0.1", - "@sentry/browser": "^6.3.5", + "@sentry/browser": "^7.8.1", "@uppy/core": "^1.15.0", "@uppy/dashboard": "^1.11.0", "@uppy/react": "^1.11.0", @@ -42064,7 +42111,7 @@ "@reach/tabs": "^0.15.0", "@replit/codemirror-emacs": "overleaf/codemirror-emacs#90bcadaaaf38ed0d88cf15f0ddb8e868ca253e17", "@replit/codemirror-vim": "^6.0.1", - "@sentry/browser": "^6.3.5", + "@sentry/browser": "7.8.1", "@testing-library/cypress": "^8.0.3", "@testing-library/dom": "^8.13.0", "@testing-library/react": "^12.1.5", @@ -43981,16 +44028,51 @@ "requires": {} }, "@sentry/browser": { - "version": "6.17.3", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-6.17.3.tgz", - "integrity": "sha512-UElPk6/Q/78eL8tHGHy080uHVQAuieWXlSMSzrJMVNa+vwXPwEeyL+WbPtKkND2jGwdODjg+pSj960RqhIv+ig==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.8.1.tgz", + "integrity": "sha512-9JuagYqHyaZu/4RqyxrAgEHo71oV592XBuUKC33gajCVKWbyG3mNqudSMoHtdM1DrV9REZ4Elha7zFaE2cJX6g==", "requires": { - "@sentry/core": "6.17.3", - "@sentry/types": "6.17.3", - "@sentry/utils": "6.17.3", + "@sentry/core": "7.8.1", + "@sentry/types": "7.8.1", + "@sentry/utils": "7.8.1", "tslib": "^1.9.3" }, "dependencies": { + "@sentry/core": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.8.1.tgz", + "integrity": "sha512-PRivbdIzApi/gSixAxozhOBTylSVdw/9VxaStYHd7JJGhs36KXkV8ylpbCmYO4ap7/Ue9/slzwpvPOJJzmzAgA==", + "requires": { + "@sentry/hub": "7.8.1", + "@sentry/types": "7.8.1", + "@sentry/utils": "7.8.1", + "tslib": "^1.9.3" + } + }, + "@sentry/hub": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-7.8.1.tgz", + "integrity": "sha512-AxwyGyS9Lp4XsURu4t8opa5vZ+NAB6I/n+B/Uix3YZea9z8jdWYAu9vsXSizOrtxekc/i7ZN4bnlNgXVHix0iA==", + "requires": { + "@sentry/types": "7.8.1", + "@sentry/utils": "7.8.1", + "tslib": "^1.9.3" + } + }, + "@sentry/types": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.8.1.tgz", + "integrity": "sha512-LOoaeBXVI23Kh5SpIbxSRiJ6+eYZXVOFyPFH1T1mGBj95LPwRMqOdg0lUTmFJGBKbDGDB/YNjNnu1kQ7GrXBXw==" + }, + "@sentry/utils": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.8.1.tgz", + "integrity": "sha512-isUZjft4HWTOk1Z58KFJ/zzXeFtIJgP82CkYQlW464ZR2WCqPHYlXXXRWZpOHOfMnrf+gWeX9WAGS9rTAdhiSg==", + "requires": { + "@sentry/types": "7.8.1", + "tslib": "^1.9.3" + } + }, "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", diff --git a/services/web/frontend/js/infrastructure/error-reporter.js b/services/web/frontend/js/infrastructure/error-reporter.js index 557e9a574d..e58f715398 100644 --- a/services/web/frontend/js/infrastructure/error-reporter.js +++ b/services/web/frontend/js/infrastructure/error-reporter.js @@ -19,8 +19,8 @@ function sentryReporter() { autoSessionTracking: false, // Ignore errors unless they come from our origins - // Adapted from: https://docs.sentry.io/platforms/javascript/#decluttering-sentry - whitelistUrls: [ + // Adapted from: https://docs.sentry.io/platforms/javascript/configuration/filtering/#decluttering-sentry + allowUrls: [ new RegExp(window.ExposedSettings.sentryAllowedOriginRegex), ], diff --git a/services/web/package.json b/services/web/package.json index 55596d56e9..2de5709d19 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -72,7 +72,7 @@ "@reach/tabs": "^0.15.0", "@replit/codemirror-emacs": "overleaf/codemirror-emacs#90bcadaaaf38ed0d88cf15f0ddb8e868ca253e17", "@replit/codemirror-vim": "^6.0.1", - "@sentry/browser": "^6.3.5", + "@sentry/browser": "^7.8.1", "@uppy/core": "^1.15.0", "@uppy/dashboard": "^1.11.0", "@uppy/react": "^1.11.0",