Skip to content

Commit 9af59d6

Browse files
committed
Disable nodeHardenFlags in Sentry build
1 parent 3ed2d4f commit 9af59d6

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/constants.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,18 @@ const lazyZshRcPath = () =>
282282

283283
// Harden Node security.
284284
// https://nodejs.org/en/learn/getting-started/security-best-practices
285-
const nodeHardenFlags: string[] = [
286-
'--disable-proto',
287-
'delete',
288-
// TODO: We can try --frozen-intrinsics once
289-
// https://github.com/SBoudrias/Inquirer.js/pull/1683 is addressed.
290-
// '--frozen-intrinsics',
291-
'--no-deprecation'
292-
]
285+
const nodeHardenFlags: string[] =
286+
// The '@rollup/plugin-replace' will replace "process.env[SOCKET_CLI_SENTRY_BUILD]".
287+
process.env[SOCKET_CLI_SENTRY_BUILD]
288+
? []
289+
: [
290+
'--disable-proto',
291+
'delete',
292+
// TODO: We can try --frozen-intrinsics once
293+
// https://github.com/SBoudrias/Inquirer.js/pull/1683 is addressed.
294+
// '--frozen-intrinsics',
295+
'--no-deprecation'
296+
]
293297

294298
const constants = createConstantsObject(
295299
{

0 commit comments

Comments
 (0)