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 ac9aced commit 4c9ce75
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 30 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 }}
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,21 @@
"isChromatic.d.ts"
],
"scripts": {
"build": "clean-package && tsup && ./scripts/moveSourceMaps.mjs && clean-package restore",
"build": "clean-package && tsup && clean-package restore",
"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 sourcemaps:clean && 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 Expand Up @@ -185,6 +190,7 @@
"react-dom": "^17.0.2",
"read-pkg-up": "^7.0.1",
"semver": "^7.3.5",
"sentry-cli": "^0.0.0",
"slash": "^3.0.0",
"snyk-nodejs-lockfile-parser": "^1.52.1",
"sort-package-json": "1.50.0",
Expand Down
26 changes: 0 additions & 26 deletions scripts/moveSourceMaps.mjs

This file was deleted.

111 changes: 110 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 @@ -7539,6 +7626,7 @@ __metadata:
react-dom: "npm:^17.0.2"
read-pkg-up: "npm:^7.0.1"
semver: "npm:^7.3.5"
sentry-cli: "npm:^0.0.0"
slash: "npm:^3.0.0"
snyk-nodejs-lockfile-parser: "npm:^1.52.1"
sort-package-json: "npm:1.50.0"
Expand Down Expand Up @@ -15780,6 +15868,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 +15944,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 @@ -17237,6 +17339,13 @@ __metadata:
languageName: node
linkType: hard

"sentry-cli@npm:^0.0.0":
version: 0.0.0
resolution: "sentry-cli@npm:0.0.0"
checksum: 10c0/e660a09982d6c38940e1e9fac9c86a2213000938d042406b6964081349ed88f53036b1d3bd3651cdc814c42f68ec27953c3790b1e0103de4ce5b12e5780ea012
languageName: node
linkType: hard

"serialize-javascript@npm:^6.0.1":
version: 6.0.2
resolution: "serialize-javascript@npm:6.0.2"
Expand Down Expand Up @@ -20026,7 +20135,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 4c9ce75

Please sign in to comment.