2
0

👷 Improve sentry release detection

This commit is contained in:
Baptiste Arnaud
2023-02-06 09:48:48 +01:00
parent d7b5fd76fc
commit f07bf2532e
11 changed files with 88 additions and 100 deletions

View File

@ -31,6 +31,7 @@ const nextConfig = withTM({
const sentryWebpackPluginOptions = {
silent: true,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder',
}
module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN

View File

@ -35,7 +35,7 @@
"@giphy/react-components": "6.5.2",
"@googleapis/drive": "4.0.1",
"@lezer/css": "^1.1.1",
"@sentry/nextjs": "7.34.0",
"@sentry/nextjs": "7.36.0",
"@stripe/stripe-js": "1.46.0",
"@tanstack/react-query": "^4.23.0",
"@tanstack/react-table": "8.7.8",

View File

@ -1,23 +1,14 @@
// This file configures the initialization of Sentry on the browser.
// The config you add here will be used whenever a page is visited.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
dsn: SENTRY_DSN,
ignoreErrors: ['ResizeObserver loop limit exceeded'],
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
beforeBreadcrumb(breadcrumb, hint) {
try {
if (breadcrumb.category?.startsWith('ui')) {
breadcrumb.message = `${hint?.event.target.tagName.toLowerCase()}: ${
hint?.event.target.innerText
}`
}
} catch (e) {
/* empty */
}
return breadcrumb
debug: true,
beforeSend: (event) => {
console.log('[SENTRY] beforeSend event:', event)
return event
},
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder',
})

View File

@ -1,11 +1,8 @@
// This file configures the initialization of Sentry on the browser.
// The config you add here will be used whenever a page is visited.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/
import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
ignoreErrors: ['ResizeObserver loop limit exceeded'],
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
dsn: SENTRY_DSN,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-builder',
})

View File

@ -13,6 +13,7 @@ import { ItemNodeContent } from './ItemNodeContent'
import { ItemNodeContextMenu } from './ItemNodeContextMenu'
import { ContextMenu } from '@/components/ContextMenu'
import { setMultipleRefs } from '@/utils/helpers'
import { isDefined } from 'utils'
type Props = {
item: Item
@ -39,11 +40,12 @@ export const ItemNode = ({
const itemRef = useRef<HTMLDivElement | null>(null)
const isPreviewing = previewingEdge?.from.itemId === item.id
const isConnectable =
isDefined(typebot) &&
!connectionDisabled &&
!(
typebot?.groups[indices.groupIndex].blocks[
indices.blockIndex
] as ChoiceInputBlock
typebot.groups[indices.groupIndex].blocks[indices.blockIndex] as
| ChoiceInputBlock
| undefined
)?.options?.isMultipleChoice
const onDrag = (position: NodePosition) => {
if (!onMouseDown) return

View File

@ -26,6 +26,7 @@ import React, { useEffect, useRef, useState } from 'react'
import { ItemNode } from './ItemNode'
import { SourceEndpoint } from '../../Endpoints'
import { PlaceholderNode } from '../PlaceholderNode'
import { isDefined } from 'utils'
type Props = {
block: BlockWithItems
@ -46,7 +47,8 @@ export const ItemNodesList = ({
draggedItem !== undefined && block.items[0].type === draggedItem.type
const isLastBlock =
typebot?.groups[groupIndex].blocks[blockIndex + 1] === undefined
isDefined(typebot) &&
typebot.groups[groupIndex].blocks[blockIndex + 1] === undefined
const [position, setPosition] = useState({
x: 0,

View File

@ -18,6 +18,7 @@ const nextConfig = withTM({
const sentryWebpackPluginOptions = {
silent: true,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-viewer',
}
module.exports = process.env.NEXT_PUBLIC_SENTRY_DSN

View File

@ -13,7 +13,7 @@
"test:report": "pnpm playwright show-report"
},
"dependencies": {
"@sentry/nextjs": "7.34.0",
"@sentry/nextjs": "7.36.0",
"@trpc/server": "10.9.0",
"@typebot.io/js": "workspace:*",
"@typebot.io/react": "workspace:*",

View File

@ -4,13 +4,15 @@
import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
dsn: SENTRY_DSN,
ignoreErrors: [
'ResizeObserver loop limit exceeded',
'ResizeObserver loop completed with undelivered notifications.',
'ResizeObserver is not defined',
"Can't find variable: ResizeObserver",
],
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-viewer',
})

View File

@ -4,13 +4,9 @@
import * as Sentry from '@sentry/nextjs'
const SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
ignoreErrors: [
'ResizeObserver loop limit exceeded',
'ResizeObserver loop completed with undelivered notifications.',
'ResizeObserver is not defined',
"Can't find variable: ResizeObserver",
],
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
dsn: SENTRY_DSN,
release: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA + '-viewer',
})

116
pnpm-lock.yaml generated
View File

@ -41,7 +41,7 @@ importers:
'@googleapis/drive': 4.0.1
'@lezer/css': ^1.1.1
'@playwright/test': 1.30.0
'@sentry/nextjs': 7.34.0
'@sentry/nextjs': 7.36.0
'@stripe/stripe-js': 1.46.0
'@tanstack/react-query': ^4.23.0
'@tanstack/react-table': 8.7.8
@ -149,7 +149,7 @@ importers:
'@giphy/react-components': 6.5.2_57czaiyk6rdr5iy5tfs5pior4u
'@googleapis/drive': 4.0.1
'@lezer/css': 1.1.1
'@sentry/nextjs': 7.34.0_next@13.1.6+react@18.2.0
'@sentry/nextjs': 7.36.0_next@13.1.6+react@18.2.0
'@stripe/stripe-js': 1.46.0
'@tanstack/react-query': 4.24.4_biqbaboplfbrettd7655fr4n2y
'@tanstack/react-table': 8.7.8_biqbaboplfbrettd7655fr4n2y
@ -354,7 +354,7 @@ importers:
'@babel/preset-env': 7.20.2
'@faire/mjml-react': 3.1.0
'@playwright/test': 1.30.0
'@sentry/nextjs': 7.34.0
'@sentry/nextjs': 7.36.0
'@trpc/server': 10.9.0
'@typebot.io/js': workspace:*
'@typebot.io/react': workspace:*
@ -397,7 +397,7 @@ importers:
utils: workspace:*
zod: 3.20.2
dependencies:
'@sentry/nextjs': 7.34.0_next@13.1.6+react@18.2.0
'@sentry/nextjs': 7.36.0_next@13.1.6+react@18.2.0
'@trpc/server': 10.9.0
'@typebot.io/js': link:../../packages/js
'@typebot.io/react': link:../../packages/react
@ -5987,14 +5987,14 @@ packages:
resolution: {integrity: sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==}
dev: false
/@sentry/browser/7.34.0:
resolution: {integrity: sha512-5Jmjj0DLxx+31o12T+VH4U+gO7wz3L+ftjuTxcQaC8GeFVe5qCyXZoDmWKNV9NEyREiZ3azV62bJc5wojZrIIg==}
/@sentry/browser/7.36.0:
resolution: {integrity: sha512-Mu0OpisCZFICBGxVXdHWjUDgSvuQKjnO9acNcXR1+68IU08iX+cU6f2kq6VzI4mW/pNieI20FDFbx9KA0YZ4+A==}
engines: {node: '>=8'}
dependencies:
'@sentry/core': 7.34.0
'@sentry/replay': 7.34.0
'@sentry/types': 7.34.0
'@sentry/utils': 7.34.0
'@sentry/core': 7.36.0
'@sentry/replay': 7.36.0
'@sentry/types': 7.36.0
'@sentry/utils': 7.36.0
tslib: 1.14.1
dev: false
@ -6016,44 +6016,44 @@ packages:
- supports-color
dev: false
/@sentry/core/7.34.0:
resolution: {integrity: sha512-J1oxsYZX1N0tkEcaHt/uuDqk6zOnaivyampp+EvBsUMCdemjg7rwKvawlRB0ZtBEQu3HAhi8zecm03mlpWfCDw==}
/@sentry/core/7.36.0:
resolution: {integrity: sha512-lq1MlcMhvm7QIwUOknFeufkg4M6QREY3s61y6pm1o+o3vSqB7Hz0D19xlyEpP62qMn8OyuttVKOVK1UfGc2EyQ==}
engines: {node: '>=8'}
dependencies:
'@sentry/types': 7.34.0
'@sentry/utils': 7.34.0
'@sentry/types': 7.36.0
'@sentry/utils': 7.36.0
tslib: 1.14.1
dev: false
/@sentry/integrations/7.34.0:
resolution: {integrity: sha512-xbWnTvG4gkKeCVpmhhdPtMbQkPO0RAfEJ8VPO5TWmUMT23ZWy2kE0gTZHtnBopy7AXxg231XxTi4fxnwgQGxEQ==}
/@sentry/integrations/7.36.0:
resolution: {integrity: sha512-wrRoUqdeGi64NNimGVk8U8DBiXamxTYPBux0/faFDyau8EJyQFcv8zOyB78Za4W2Ss3ZXNaE/WtFF8UxalHzBQ==}
engines: {node: '>=8'}
dependencies:
'@sentry/types': 7.34.0
'@sentry/utils': 7.34.0
'@sentry/types': 7.36.0
'@sentry/utils': 7.36.0
localforage: 1.10.0
tslib: 1.14.1
dev: false
/@sentry/nextjs/7.34.0_next@13.1.6+react@18.2.0:
resolution: {integrity: sha512-vXtlpONIDU2kT2eA5STLBuGvw5njM7K/7IqjvvkwTwYUpKWs7xZvp7NeHAHpH6LkDSBljokS45fnvfMijEqN7A==}
/@sentry/nextjs/7.36.0_next@13.1.6+react@18.2.0:
resolution: {integrity: sha512-7IUwBjCjo3rWuvEG16D1wKb0D+aMyCU920VGCAQVZaqTZAgrgAKfpTa1Sk0fmDxYglW1EBI9QM+WEnOa9RleLw==}
engines: {node: '>=8'}
peerDependencies:
next: ^10.0.8 || ^11.0 || ^12.0 || ^13.0
react: 15.x || 16.x || 17.x || 18.x
react: 16.x || 17.x || 18.x
webpack: '>= 4.0.0'
peerDependenciesMeta:
webpack:
optional: true
dependencies:
'@rollup/plugin-commonjs': 24.0.0_rollup@2.78.0
'@sentry/core': 7.34.0
'@sentry/integrations': 7.34.0
'@sentry/node': 7.34.0
'@sentry/react': 7.34.0_react@18.2.0
'@sentry/tracing': 7.34.0
'@sentry/types': 7.34.0
'@sentry/utils': 7.34.0
'@sentry/core': 7.36.0
'@sentry/integrations': 7.36.0
'@sentry/node': 7.36.0
'@sentry/react': 7.36.0_react@18.2.0
'@sentry/tracing': 7.36.0
'@sentry/types': 7.36.0
'@sentry/utils': 7.36.0
'@sentry/webpack-plugin': 1.20.0
chalk: 3.0.0
next: 13.1.6_pjwopsidmaokadturxaafygjp4
@ -6065,13 +6065,13 @@ packages:
- supports-color
dev: false
/@sentry/node/7.34.0:
resolution: {integrity: sha512-VM4XeydRdgeaNTRe8kwqYg2oNPddVyY74PlCFEFnPEN1NccycNuwiFno68kNrApeqxxLlTTmzkJy0BWo16x2Yg==}
/@sentry/node/7.36.0:
resolution: {integrity: sha512-nAHAY+Rbn5OlTpNX/i6wYrmw3hT/BtwPZ/vNU52cKgw7CpeE1UrCeFjnPn18rQPB7lIh7x0vNvoaPrfemRzpSQ==}
engines: {node: '>=8'}
dependencies:
'@sentry/core': 7.34.0
'@sentry/types': 7.34.0
'@sentry/utils': 7.34.0
'@sentry/core': 7.36.0
'@sentry/types': 7.36.0
'@sentry/utils': 7.36.0
cookie: 0.4.2
https-proxy-agent: 5.0.1
lru_map: 0.3.3
@ -6080,49 +6080,49 @@ packages:
- supports-color
dev: false
/@sentry/react/7.34.0_react@18.2.0:
resolution: {integrity: sha512-vdonnZK9R8xyEBDaXNofHyoqy9biNRvlKrQXZp4x8WlYcBCwbU46qxZlSVsxa89pm7yUYS+KHq8cYL801+weqg==}
/@sentry/react/7.36.0_react@18.2.0:
resolution: {integrity: sha512-ttrRqbgeqvkV3DwkDRZC/V8OEnBKGpQf4dKpG8oMlfdVbMTINzrxYUgkhi9xAkxkH9O+vj3Md8L3Rdqw/SDwKQ==}
engines: {node: '>=8'}
peerDependencies:
react: 15.x || 16.x || 17.x || 18.x
dependencies:
'@sentry/browser': 7.34.0
'@sentry/types': 7.34.0
'@sentry/utils': 7.34.0
'@sentry/browser': 7.36.0
'@sentry/types': 7.36.0
'@sentry/utils': 7.36.0
hoist-non-react-statics: 3.3.2
react: 18.2.0
tslib: 1.14.1
dev: false
/@sentry/replay/7.34.0:
resolution: {integrity: sha512-4L4YZfWt8mcVNcI99RxHORPb308URI1R9xsFj97fagk0ATjexLKr5QCA2ApnKaSn8Q0q1Zdzd4XmFtW9anU45Q==}
/@sentry/replay/7.36.0:
resolution: {integrity: sha512-wNbME74/2GtkqdDXz7NaStyfPWVLjYmN9TFWvu6E9sNl9pkDDvii/Qc8F6ps1wa7bozkKcWRHgNvYiGCxUBHcg==}
engines: {node: '>=12'}
dependencies:
'@sentry/core': 7.34.0
'@sentry/types': 7.34.0
'@sentry/utils': 7.34.0
'@sentry/core': 7.36.0
'@sentry/types': 7.36.0
'@sentry/utils': 7.36.0
dev: false
/@sentry/tracing/7.34.0:
resolution: {integrity: sha512-JtfSWBfcWslfIujcpGEPF5oOiAOCd5shMoWYrdTvCfruHhYjp4w5kv/ndkvq2EpFkcQYhdmtQEytXEO8IJIqRw==}
/@sentry/tracing/7.36.0:
resolution: {integrity: sha512-5R5mfWMDncOcTMmmyYMjgus1vZJzIFw4LHaSbrX7e1IRNT/6vFyNeVxATa2ePXb9mI3XHo5f2p7YrnreAtaSXw==}
engines: {node: '>=8'}
dependencies:
'@sentry/core': 7.34.0
'@sentry/types': 7.34.0
'@sentry/utils': 7.34.0
'@sentry/core': 7.36.0
'@sentry/types': 7.36.0
'@sentry/utils': 7.36.0
tslib: 1.14.1
dev: false
/@sentry/types/7.34.0:
resolution: {integrity: sha512-K+OeHIrl35PSYn6Zwqe4b8WWyAJQoI5NeWxHVkM7oQTGJ1YLG4BvLsR+UiUXnKdR5krE4EDtEA5jLsDlBEyPvw==}
/@sentry/types/7.36.0:
resolution: {integrity: sha512-uvfwUn3okAWSZ948D/xqBrkc3Sn6TeHUgi3+p/dTTNGAXXskzavgfgQ4rSW7f3YD4LL+boZojpoIARVLodMGuA==}
engines: {node: '>=8'}
dev: false
/@sentry/utils/7.34.0:
resolution: {integrity: sha512-VIHHXEBw0htzqxnU8A7WkXKvmsG2pZVqHlAn0H9W/yyFQtXMuP1j1i0NsjADB/3JXUKK83kTNWGzScXvp0o+Jg==}
/@sentry/utils/7.36.0:
resolution: {integrity: sha512-mgDi5X5Bm0sydCzXpnyKD/sD98yc2qnKXyRdNX4HRRwruhC/P53LT0hGhZXsyqsB/l8OAMl0zWXJLg0xONQsEw==}
engines: {node: '>=8'}
dependencies:
'@sentry/types': 7.34.0
'@sentry/types': 7.36.0
tslib: 1.14.1
dev: false
@ -6658,7 +6658,7 @@ packages:
/@types/eslint/8.4.10:
resolution: {integrity: sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==}
dependencies:
'@types/estree': 0.0.51
'@types/estree': 1.0.0
'@types/json-schema': 7.0.11
/@types/estree/0.0.51:
@ -8973,7 +8973,6 @@ packages:
domelementtype: 2.3.0
domhandler: 5.0.3
domutils: 3.0.1
dev: false
/cheerio/1.0.0-rc.10:
resolution: {integrity: sha512-g0J0q/O6mW8z5zxQ3A8E8J1hUgp4SMOvEoW/x84OwyHKe/Zccz83PVT4y5Crcr530FV6NgmKI1qvGTKVl9XXVw==}
@ -8998,7 +8997,6 @@ packages:
htmlparser2: 8.0.1
parse5: 7.1.2
parse5-htmlparser2-tree-adapter: 7.0.0
dev: false
/chokidar/3.5.3:
resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
@ -9695,7 +9693,6 @@ packages:
domhandler: 5.0.3
domutils: 3.0.1
nth-check: 2.1.1
dev: false
/css-to-react-native/3.1.0:
resolution: {integrity: sha512-AryfkFA29b4I3vG7N4kxFboq15DxwSXzhXM37XNEjwJMgjYIc8BcqfiprpAqX0zadI5PMByEIwAMzXxk5Vcc4g==}
@ -14030,7 +14027,7 @@ packages:
engines: {node: '>=10.0.0'}
hasBin: true
dependencies:
cheerio: 1.0.0-rc.10
cheerio: 1.0.0-rc.12
commander: 5.1.0
mensch: 0.3.4
slick: 1.12.2
@ -15728,7 +15725,6 @@ packages:
dependencies:
domhandler: 5.0.3
parse5: 7.1.2
dev: false
/parse5/5.1.1:
resolution: {integrity: sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==}
@ -20142,7 +20138,7 @@ packages:
/wide-align/1.1.5:
resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==}
dependencies:
string-width: 1.0.2
string-width: 4.2.3
dev: false
/widest-line/3.1.0: