Skip to content

Commit 3fe9c77

Browse files
committed
Whitespace and comment nits
1 parent abbc241 commit 3fe9c77

File tree

7 files changed

+7
-0
lines changed

7 files changed

+7
-0
lines changed

scripts/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const lazyDistPath = () => path.join(rootDistPath, constants.DIST_TYPE)
3030

3131
const constants = createConstantsObject(
3232
{
33+
// Lazily defined values are initialized as `undefined` to keep their key order.
3334
DIST_TYPE: undefined,
3435
ROLLUP_ENTRY_SUFFIX,
3536
ROLLUP_EXTERNAL_SUFFIX,

scripts/rollup/socket-modify-plugin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function socketModifyPlugin({
2727
? Reflect.apply(replace, match, match)
2828
: String(replace)
2929
)
30+
// Exit early if not a global regexp.
3031
if (!global) {
3132
break
3233
}

src/commands/cdxgen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import constants from '../constants'
1111
import type { CliSubcommand } from '../utils/meow-with-subcommands'
1212

1313
const { cdxgenBinPath, synpBinPath } = constants
14+
1415
const { execPath } = process
1516

1617
const {

src/commands/optimize.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import type { Spinner } from '@socketregistry/yocto-spinner'
4343
type PackageJson = Awaited<ReturnType<typeof readPackageJson>>
4444

4545
const { UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE, distPath } = constants
46+
4647
const COMMAND_TITLE = 'Socket Optimize'
4748
const OVERRIDES_FIELD_NAME = 'overrides'
4849
const NPM_OVERRIDE_PR_URL = 'https://github.com/npm/cli/pull/7025'

src/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ const constants = <
9292
{
9393
API_V0_URL,
9494
ENV,
95+
// Lazily defined values are initialized as `undefined` to keep their key order.
9596
DIST_TYPE: undefined,
9697
NPM_REGISTRY_URL,
9798
SOCKET_CLI_ISSUES_URL,

src/shadow/arborist.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ const {
224224
UPDATE_SOCKET_OVERRIDES_IN_PACKAGE_LOCK_FILE,
225225
rootPath
226226
} = constants
227+
227228
const POTENTIAL_BUG_ERROR_MESSAGE = `This is may be a bug with socket-npm related to changes to the npm CLI.\nPlease report to ${SOCKET_CLI_ISSUES_URL}.`
228229

229230
const npmEntrypoint = realpathSync(process.argv[1]!)

src/shadow/npx-cli.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import constants from '../constants'
88
import { installLinks } from './link'
99

1010
const { distPath, shadowBinPath } = constants
11+
1112
const npxPath = installLinks(shadowBinPath, 'npx')
1213
const injectionPath = path.join(distPath, 'npm-injection.js')
1314

0 commit comments

Comments
 (0)