Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentry: add sentry to the project #157

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ jobs:
with:
node-version: 18
- run: npm install
- run: npm run vscode:prepublish
- name: Build
run: npm run vscode:prepublish
env:
NODE_ENV: 'production'
- name: Runs on Pre-Release
if: 'github.event.prerelease'
if: 'github.event.release.prerelease'
run: npm run deploy-pre-release
env:
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
- name: Runs on Release
if: '!github.event.prerelease'
if: '!github.event.release.prerelease'
run: npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
test-resources
test-resources
# Sentry Config File
.env.sentry-build-plugin
8 changes: 6 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
"preLaunchTask": "${defaultBuildTask}",
"env": {
"NODE_ENV": "development"
}
},
{
"name": "Extension Tests",
Expand All @@ -30,7 +33,8 @@
],
"preLaunchTask": "${defaultBuildTask}",
"env": {
"MZ_CONFIG_PATH": "${env:HOME}/.config/materialize/test"
"MZ_CONFIG_PATH": "${env:HOME}/.config/materialize/test",
"NODE_ENV": "development"
}
}
]
Expand Down
11 changes: 10 additions & 1 deletion esbuild.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
// file: esbuild.js

const { build } = require("esbuild");
const { sentryEsbuildPlugin } = require("@sentry/esbuild-plugin");

const baseConfig = {
bundle: true,
minify: process.env.NODE_ENV === "production",
sourcemap: process.env.NODE_ENV !== "production",
// Turned on to capture sourcemap for Sentry
sourcemap: true,
format: "cjs",
platform: "node",
plugins: process.env.NODE_ENV === "production" ? [
sentryEsbuildPlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "materializeinc",
project: "vscode-extension",
}),
] : []
};

const extensionConfig = {
Expand Down
Loading
Loading