Skip to content

Commit 3f53fef

Browse files
authored
ref(gatsby): Default release to empty string (#3759)
To make gatsby work better out of the box, we set the default for the release value to be undefined instead of an empty string.
1 parent 01bb58d commit 3f53fef

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

packages/gatsby/gatsby-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const sentryRelease = JSON.stringify(
1111
process.env.ZEIT_GITHUB_COMMIT_SHA ||
1212
process.env.ZEIT_GITLAB_COMMIT_SHA ||
1313
process.env.ZEIT_BITBUCKET_COMMIT_SHA ||
14-
'',
14+
undefined,
1515
);
1616

1717
const sentryDsn = JSON.stringify(process.env.SENTRY_DSN || '');

packages/gatsby/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@
8686
"tsConfig": "./tsconfig.json",
8787
"diagnostics": false
8888
}
89-
}
89+
},
90+
"setupFiles": [
91+
"<rootDir>/test/setEnvVars.ts"
92+
]
9093
},
9194
"sideEffects": false
9295
}

packages/gatsby/test/gatsby-node.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-var-requires */
22
/* eslint-disable @typescript-eslint/no-explicit-any */
3-
43
const { onCreateWebpackConfig } = require('../gatsby-node');
54

65
describe('onCreateWebpackConfig', () => {

packages/gatsby/test/setEnvVars.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
2+
process.env.SENTRY_RELEASE = '14abbb1678a2eb59d1a171ea33d630dd6c6eee70';

0 commit comments

Comments
 (0)