Skip to content

Commit

Permalink
Upload sourcemaps to Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhobbs committed Oct 7, 2024
1 parent 26cb8de commit 7b85bd3
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
NEXT_VERSION: ${{ steps.next_version.outputs.version }}
SENTRY_RELEASE: ${{ steps.next_version.outputs.version }}
SENTRY_ORG: chromatic-lt
SENTRY_PROJECT: cli
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,17 @@
"build-storybook": "storybook build --stats-json",
"build-test-storybook": "cross-env SMOKE_TEST=true storybook build -o test-storybook --stats-json",
"build-subdir": "cd subdir ; yarn build ; cd ..",
"sentry": "yarn sentry:sourcemaps:cli && yarn sentry:sourcemaps:action",
"sentry:sourcemaps:cli": "sentry-cli sourcemaps inject dist && sentry-cli sourcemaps upload dist",
"sentry:sourcemaps:action": "sentry-cli sourcemaps inject action && sentry-cli sourcemaps upload action",
"chromatic": "./dist/bin.js",
"chromatic-prebuilt": "./dist/bin.js --storybook-build-dir=\"storybook-static\"",
"chromatic-staging": "CHROMATIC_INDEX_URL=https://www.staging-chromatic.com ./dist/bin.js",
"chromatic-verbose": "cross-env LOG_LEVEL=verbose ./dist/bin.js",
"lint": "yarn lint:js bin-src node-src test-stories ./isChromatic.js ./isChromatic.mjs",
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location=.cache/eslint --report-unused-disable-directives",
"lint:package": "sort-package-json",
"release": "./scripts/versionAndBuild.mjs && auto shipit",
"release": "./scripts/versionAndBuild.mjs && yarn sentry && yarn clean:sourcemaps && auto shipit",
"prepack": "clean-package",
"postpack": "clean-package restore",
"publish-action": "./scripts/publish-action.mjs",
Expand All @@ -90,7 +93,8 @@
"test": "vitest run --coverage && vitest run -c vitest.no-threads.config.ts",
"typescript:check": "tsc --project ./tsconfig.json --noEmit",
"prepare": "yarn run build",
"dev": "tsup --watch"
"dev": "tsup --watch",
"clean:sourcemaps": "rm -f dist/*.map && rm -f action/*.map"
},
"resolutions": {
"any-observable": "^0.5.1"
Expand All @@ -103,6 +107,7 @@
"@auto-it/slack": "^11.1.6",
"@discoveryjs/json-ext": "^0.5.7",
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
"@sentry/cli": "^2.37.0",
"@sentry/node": "^8.30.0",
"@storybook/addon-essentials": "^8.1.5",
"@storybook/addon-webpack5-compiler-swc": "^1.0.3",
Expand Down
103 changes: 102 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3655,6 +3655,92 @@ __metadata:
languageName: node
linkType: hard

"@sentry/cli-darwin@npm:2.37.0":
version: 2.37.0
resolution: "@sentry/cli-darwin@npm:2.37.0"
conditions: os=darwin
languageName: node
linkType: hard

"@sentry/cli-linux-arm64@npm:2.37.0":
version: 2.37.0
resolution: "@sentry/cli-linux-arm64@npm:2.37.0"
conditions: (os=linux | os=freebsd) & cpu=arm64
languageName: node
linkType: hard

"@sentry/cli-linux-arm@npm:2.37.0":
version: 2.37.0
resolution: "@sentry/cli-linux-arm@npm:2.37.0"
conditions: (os=linux | os=freebsd) & cpu=arm
languageName: node
linkType: hard

"@sentry/cli-linux-i686@npm:2.37.0":
version: 2.37.0
resolution: "@sentry/cli-linux-i686@npm:2.37.0"
conditions: (os=linux | os=freebsd) & (cpu=x86 | cpu=ia32)
languageName: node
linkType: hard

"@sentry/cli-linux-x64@npm:2.37.0":
version: 2.37.0
resolution: "@sentry/cli-linux-x64@npm:2.37.0"
conditions: (os=linux | os=freebsd) & cpu=x64
languageName: node
linkType: hard

"@sentry/cli-win32-i686@npm:2.37.0":
version: 2.37.0
resolution: "@sentry/cli-win32-i686@npm:2.37.0"
conditions: os=win32 & (cpu=x86 | cpu=ia32)
languageName: node
linkType: hard

"@sentry/cli-win32-x64@npm:2.37.0":
version: 2.37.0
resolution: "@sentry/cli-win32-x64@npm:2.37.0"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard

"@sentry/cli@npm:^2.37.0":
version: 2.37.0
resolution: "@sentry/cli@npm:2.37.0"
dependencies:
"@sentry/cli-darwin": "npm:2.37.0"
"@sentry/cli-linux-arm": "npm:2.37.0"
"@sentry/cli-linux-arm64": "npm:2.37.0"
"@sentry/cli-linux-i686": "npm:2.37.0"
"@sentry/cli-linux-x64": "npm:2.37.0"
"@sentry/cli-win32-i686": "npm:2.37.0"
"@sentry/cli-win32-x64": "npm:2.37.0"
https-proxy-agent: "npm:^5.0.0"
node-fetch: "npm:^2.6.7"
progress: "npm:^2.0.3"
proxy-from-env: "npm:^1.1.0"
which: "npm:^2.0.2"
dependenciesMeta:
"@sentry/cli-darwin":
optional: true
"@sentry/cli-linux-arm":
optional: true
"@sentry/cli-linux-arm64":
optional: true
"@sentry/cli-linux-i686":
optional: true
"@sentry/cli-linux-x64":
optional: true
"@sentry/cli-win32-i686":
optional: true
"@sentry/cli-win32-x64":
optional: true
bin:
sentry-cli: bin/sentry-cli
checksum: 10c0/a6e5e3510b7b6a5b3414a2b2bee3bd9c3066b05f70ff20ff65df1d7fb384458182d12a8a0f0319af02e8dbaf6f5e5d23da394eb6bdb8b9face3909699d0f9495
languageName: node
linkType: hard

"@sentry/core@npm:8.30.0":
version: 8.30.0
resolution: "@sentry/core@npm:8.30.0"
Expand Down Expand Up @@ -7457,6 +7543,7 @@ __metadata:
"@auto-it/slack": "npm:^11.1.6"
"@discoveryjs/json-ext": "npm:^0.5.7"
"@eslint-community/eslint-plugin-eslint-comments": "npm:^4.3.0"
"@sentry/cli": "npm:^2.37.0"
"@sentry/node": "npm:^8.30.0"
"@storybook/addon-essentials": "npm:^8.1.5"
"@storybook/addon-webpack5-compiler-swc": "npm:^1.0.3"
Expand Down Expand Up @@ -15780,6 +15867,13 @@ __metadata:
languageName: node
linkType: hard

"progress@npm:^2.0.3":
version: 2.0.3
resolution: "progress@npm:2.0.3"
checksum: 10c0/1697e07cb1068055dbe9fe858d242368ff5d2073639e652b75a7eb1f2a1a8d4afd404d719de23c7b48481a6aa0040686310e2dac2f53d776daa2176d3f96369c
languageName: node
linkType: hard

"promise-deferred@npm:^2.0.3":
version: 2.0.4
resolution: "promise-deferred@npm:2.0.4"
Expand Down Expand Up @@ -15849,6 +15943,13 @@ __metadata:
languageName: node
linkType: hard

"proxy-from-env@npm:^1.1.0":
version: 1.1.0
resolution: "proxy-from-env@npm:1.1.0"
checksum: 10c0/fe7dd8b1bdbbbea18d1459107729c3e4a2243ca870d26d34c2c1bcd3e4425b7bcc5112362df2d93cc7fb9746f6142b5e272fd1cc5c86ddf8580175186f6ad42b
languageName: node
linkType: hard

"pump@npm:^2.0.0":
version: 2.0.1
resolution: "pump@npm:2.0.1"
Expand Down Expand Up @@ -20026,7 +20127,7 @@ __metadata:
languageName: node
linkType: hard

"which@npm:^2.0.1":
"which@npm:^2.0.1, which@npm:^2.0.2":
version: 2.0.2
resolution: "which@npm:2.0.2"
dependencies:
Expand Down

0 comments on commit 7b85bd3

Please sign in to comment.