Skip to content

Commit d2dc801

Browse files
authored
Merge pull request #6457 from Shopify/mark-project-root-for-bugsnag
Fix Bugsnag inProject detection by setting projectRoot to null
2 parents 7abbaa9 + 41c8c2d commit d2dc801

File tree

3 files changed

+30
-40
lines changed

3 files changed

+30
-40
lines changed

packages/cli-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
},
101101
"dependencies": {
102102
"@apidevtools/json-schema-ref-parser": "11.7.3",
103-
"@bugsnag/js": "7.25.0",
103+
"@bugsnag/js": "8.6.0",
104104
"@graphql-typed-document-node/core": "3.2.0",
105105
"@iarna/toml": "2.2.5",
106106
"@oclif/core": "4.5.3",

packages/cli-kit/src/public/node/error-handler.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,5 +283,10 @@ function initializeBugsnag() {
283283
notify: 'https://error-analytics-production.shopifysvc.com',
284284
sessions: 'https://error-analytics-sessions-production.shopifysvc.com',
285285
},
286+
// Set the project root to `null` to prevent the default behavior of
287+
// Bugsnag which is to set it to the cwd. That is unhelpful for us because
288+
// the cwd can be anywhere in the user's filesystem, not necessarily
289+
// related to the CLI codebase.
290+
projectRoot: null,
286291
})
287292
}

pnpm-lock.yaml

Lines changed: 24 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)