@@ -70,14 +70,12 @@ const UTILS = 'utils'
7070const VENDOR = 'vendor'
7171
7272async function copyInitGradle ( ) {
73- // Lazily access constants path properties.
7473 const filepath = path . join ( constants . srcPath , 'commands/manifest/init.gradle' )
7574 const destPath = path . join ( constants . distPath , 'init.gradle' )
7675 await fs . copyFile ( filepath , destPath )
7776}
7877
7978async function copyBashCompletion ( ) {
80- // Lazily access constants path properties.
8179 const filepath = path . join (
8280 constants . srcPath ,
8381 'commands/install/socket-completion.bash' ,
@@ -87,7 +85,6 @@ async function copyBashCompletion() {
8785}
8886
8987async function copyExternalPackages ( ) {
90- // Lazily access constants path properties.
9188 const { blessedContribPath, blessedPath, socketRegistryPath } = constants
9289 const nmPath = path . join ( constants . rootPath , NODE_MODULES )
9390 const blessedContribNmPath = path . join ( nmPath , BLESSED_CONTRIB )
@@ -160,7 +157,6 @@ async function copyExternalPackages() {
160157
161158async function copyPackage ( pkgName , options ) {
162159 const { strict = true } = { __proto__ : null , ...options }
163- // Lazily access constants path properties.
164160 const nmPath = path . join ( constants . rootPath , NODE_MODULES )
165161 const pkgDestPath = path . join ( constants . externalPath , pkgName )
166162 const pkgNmPath = path . join ( nmPath , pkgName )
@@ -200,7 +196,6 @@ async function getSentryManifest() {
200196}
201197
202198async function updatePackageJson ( ) {
203- // Lazily access constants.rootPath.
204199 const editablePkgJson = await readPackageJson ( constants . rootPath , {
205200 editable : true ,
206201 normalize : true ,
@@ -213,7 +208,6 @@ async function updatePackageJson() {
213208 bin,
214209 dependencies : hasKeys ( dependencies ) ? dependencies : undefined ,
215210 } )
216- // Lazily access constants.ENV[INLINED_SOCKET_CLI_LEGACY_BUILD].
217211 if ( constants . ENV [ INLINED_SOCKET_CLI_LEGACY_BUILD ] ) {
218212 editablePkgJson . update ( {
219213 name : SOCKET_CLI_LEGACY_PACKAGE_NAME ,
@@ -222,9 +216,7 @@ async function updatePackageJson() {
222216 ...bin ,
223217 } ,
224218 } )
225- }
226- // Lazily access constants.ENV[INLINED_SOCKET_CLI_SENTRY_BUILD].
227- else if ( constants . ENV [ INLINED_SOCKET_CLI_SENTRY_BUILD ] ) {
219+ } else if ( constants . ENV [ INLINED_SOCKET_CLI_SENTRY_BUILD ] ) {
228220 editablePkgJson . update ( {
229221 name : SOCKET_CLI_SENTRY_PACKAGE_NAME ,
230222 description : SOCKET_DESCRIPTION_WITH_SENTRY ,
@@ -244,7 +236,6 @@ async function updatePackageJson() {
244236}
245237
246238async function updatePackageLockFile ( ) {
247- // Lazily access constants.rootPackageLockPath.
248239 const { rootPackageLockPath } = constants
249240 if ( ! existsSync ( rootPackageLockPath ) ) {
250241 return
@@ -262,17 +253,14 @@ async function updatePackageLockFile() {
262253 } else {
263254 delete rootPkg . dependencies
264255 }
265- // Lazily access constants.ENV[INLINED_SOCKET_CLI_LEGACY_BUILD].
266256 if ( constants . ENV [ INLINED_SOCKET_CLI_LEGACY_BUILD ] ) {
267257 lockJson . name = SOCKET_CLI_LEGACY_PACKAGE_NAME
268258 rootPkg . name = SOCKET_CLI_LEGACY_PACKAGE_NAME
269259 rootPkg . bin = toSortedObject ( {
270260 [ SOCKET_CLI_BIN_NAME_ALIAS ] : bin [ SOCKET_CLI_BIN_NAME ] ,
271261 ...bin ,
272262 } )
273- }
274- // Lazily access constants.ENV[INLINED_SOCKET_CLI_SENTRY_BUILD].
275- else if ( constants . ENV [ INLINED_SOCKET_CLI_SENTRY_BUILD ] ) {
263+ } else if ( constants . ENV [ INLINED_SOCKET_CLI_SENTRY_BUILD ] ) {
276264 lockJson . name = SOCKET_CLI_SENTRY_PACKAGE_NAME
277265 rootPkg . name = SOCKET_CLI_SENTRY_PACKAGE_NAME
278266 rootPkg . bin = {
@@ -356,7 +344,6 @@ function resetDependencies(deps) {
356344}
357345
358346export default async ( ) => {
359- // Lazily access constants path properties.
360347 const { configPath, distPath, rootPath, srcPath } = constants
361348 const nmPath = normalizePath ( path . join ( rootPath , NODE_MODULES ) )
362349 const constantsSrcPath = normalizePath ( path . join ( srcPath , 'constants.mts' ) )
@@ -381,7 +368,6 @@ export default async () => {
381368 [ CONSTANTS ] : `${ srcPath } /constants.mts` ,
382369 [ SHADOW_NPM_BIN ] : `${ srcPath } /shadow/npm/bin.mts` ,
383370 [ SHADOW_NPM_INJECT ] : `${ srcPath } /shadow/npm/inject.mts` ,
384- // Lazily access constants.ENV[INLINED_SOCKET_CLI_SENTRY_BUILD].
385371 ...( constants . ENV [ INLINED_SOCKET_CLI_SENTRY_BUILD ]
386372 ? {
387373 [ INSTRUMENT_WITH_SENTRY ] : `${ srcPath } /${ INSTRUMENT_WITH_SENTRY } .mts` ,
0 commit comments