@@ -18,9 +18,11 @@ type Constants = {
1818 }
1919 readonly DIST_TYPE : 'module-sync' | 'require'
2020 readonly LOCK_EXT : '.lock'
21+ readonly MODULE_SYNC : 'module-sync'
2122 readonly NPM_REGISTRY_URL : 'https://registry.npmjs.org'
2223 readonly NPX : 'npx'
2324 readonly PNPM : 'pnpm'
25+ readonly REQUIRE : 'require'
2426 readonly SOCKET_CLI_DEBUG : 'SOCKET_CLI_DEBUG'
2527 readonly SOCKET_CLI_FIX_PACKAGE_LOCK_FILE : 'SOCKET_CLI_FIX_PACKAGE_LOCK_FILE'
2628 readonly SOCKET_CLI_ISSUES_URL : 'https://github.com/SocketDev/socket-cli/issues'
@@ -52,9 +54,11 @@ const BABEL_RUNTIME = '@babel/runtime'
5254const BINARY_LOCK_EXT = '.lockb'
5355const BUN = 'bun'
5456const LOCK_EXT = '.lock'
57+ const MODULE_SYNC = 'module-sync'
5558const NPM_REGISTRY_URL = 'https://registry.npmjs.org'
5659const NPX = 'npx'
5760const PNPM = 'pnpm'
61+ const REQUIRE = 'require'
5862const SOCKET_CLI_DEBUG = 'SOCKET_CLI_DEBUG'
5963const SOCKET_CLI_FIX_PACKAGE_LOCK_FILE = 'SOCKET_CLI_FIX_PACKAGE_LOCK_FILE'
6064const SOCKET_CLI_ISSUES_URL = 'https://github.com/SocketDev/socket-cli/issues'
@@ -65,7 +69,7 @@ const YARN_BERRY = 'yarn/berry'
6569const YARN_CLASSIC = 'yarn/classic'
6670
6771const LAZY_DIST_TYPE = ( ) =>
68- registryConstants . SUPPORTS_NODE_REQUIRE_MODULE ? 'module-sync' : 'require'
72+ registryConstants . SUPPORTS_NODE_REQUIRE_MODULE ? MODULE_SYNC : REQUIRE
6973
7074const LAZY_ENV = ( ) =>
7175 Object . freeze ( {
@@ -132,9 +136,11 @@ const constants = <Constants>createConstantsObject(
132136 // Lazily defined values are initialized as `undefined` to keep their key order.
133137 DIST_TYPE : undefined ,
134138 LOCK_EXT ,
139+ MODULE_SYNC ,
135140 NPM_REGISTRY_URL ,
136141 NPX ,
137142 PNPM ,
143+ REQUIRE ,
138144 SOCKET_CLI_DEBUG ,
139145 SOCKET_CLI_FIX_PACKAGE_LOCK_FILE ,
140146 SOCKET_CLI_ISSUES_URL ,
0 commit comments