@@ -18,9 +18,11 @@ type Constants = {
18
18
}
19
19
readonly DIST_TYPE : 'module-sync' | 'require'
20
20
readonly LOCK_EXT : '.lock'
21
+ readonly MODULE_SYNC : 'module-sync'
21
22
readonly NPM_REGISTRY_URL : 'https://registry.npmjs.org'
22
23
readonly NPX : 'npx'
23
24
readonly PNPM : 'pnpm'
25
+ readonly REQUIRE : 'require'
24
26
readonly SOCKET_CLI_DEBUG : 'SOCKET_CLI_DEBUG'
25
27
readonly SOCKET_CLI_FIX_PACKAGE_LOCK_FILE : 'SOCKET_CLI_FIX_PACKAGE_LOCK_FILE'
26
28
readonly SOCKET_CLI_ISSUES_URL : 'https://github.com/SocketDev/socket-cli/issues'
@@ -52,9 +54,11 @@ const BABEL_RUNTIME = '@babel/runtime'
52
54
const BINARY_LOCK_EXT = '.lockb'
53
55
const BUN = 'bun'
54
56
const LOCK_EXT = '.lock'
57
+ const MODULE_SYNC = 'module-sync'
55
58
const NPM_REGISTRY_URL = 'https://registry.npmjs.org'
56
59
const NPX = 'npx'
57
60
const PNPM = 'pnpm'
61
+ const REQUIRE = 'require'
58
62
const SOCKET_CLI_DEBUG = 'SOCKET_CLI_DEBUG'
59
63
const SOCKET_CLI_FIX_PACKAGE_LOCK_FILE = 'SOCKET_CLI_FIX_PACKAGE_LOCK_FILE'
60
64
const SOCKET_CLI_ISSUES_URL = 'https://github.com/SocketDev/socket-cli/issues'
@@ -65,7 +69,7 @@ const YARN_BERRY = 'yarn/berry'
65
69
const YARN_CLASSIC = 'yarn/classic'
66
70
67
71
const LAZY_DIST_TYPE = ( ) =>
68
- registryConstants . SUPPORTS_NODE_REQUIRE_MODULE ? 'module-sync' : 'require'
72
+ registryConstants . SUPPORTS_NODE_REQUIRE_MODULE ? MODULE_SYNC : REQUIRE
69
73
70
74
const LAZY_ENV = ( ) =>
71
75
Object . freeze ( {
@@ -132,9 +136,11 @@ const constants = <Constants>createConstantsObject(
132
136
// Lazily defined values are initialized as `undefined` to keep their key order.
133
137
DIST_TYPE : undefined ,
134
138
LOCK_EXT ,
139
+ MODULE_SYNC ,
135
140
NPM_REGISTRY_URL ,
136
141
NPX ,
137
142
PNPM ,
143
+ REQUIRE ,
138
144
SOCKET_CLI_DEBUG ,
139
145
SOCKET_CLI_FIX_PACKAGE_LOCK_FILE ,
140
146
SOCKET_CLI_ISSUES_URL ,
0 commit comments