File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -73,14 +73,8 @@ if (util.inspect && util.inspect['defaultOptions']) {
73
73
}
74
74
75
75
// VSCODE_GLOBALS: node_modules
76
- globalThis . _VSCODE_NODE_MODULES = new Proxy ( Object . create ( null ) , {
77
- get ( target , mod ) {
78
- if ( ! target [ mod ] && typeof mod === 'string' ) {
79
- target [ mod ] = ( require . __$__nodeRequire ?? require ) ( mod ) ;
80
- }
81
- return target [ mod ] ;
82
- }
83
- } ) ;
76
+ globalThis . _VSCODE_NODE_MODULES = new Proxy ( Object . create ( null ) , { get : ( _target , mod ) => ( require . __$__nodeRequire ?? require ) ( String ( mod ) ) } ) ;
77
+
84
78
// VSCODE_GLOBALS: package/product.json
85
79
globalThis . _VSCODE_PRODUCT_JSON = ( require . __$__nodeRequire ?? require ) ( '../../../product.json' ) ;
86
80
globalThis . _VSCODE_PACKAGE_JSON = ( require . __$__nodeRequire ?? require ) ( '../../../package.json' ) ;
Original file line number Diff line number Diff line change @@ -58,14 +58,7 @@ if (majorRequiredNodeVersion !== currentMajorNodeVersion) {
58
58
function main ( ) {
59
59
60
60
// VSCODE_GLOBALS: node_modules
61
- globalThis . _VSCODE_NODE_MODULES = new Proxy ( Object . create ( null ) , {
62
- get ( target , mod ) {
63
- if ( ! target [ mod ] && typeof mod === 'string' ) {
64
- target [ mod ] = require ( mod ) ;
65
- }
66
- return target [ mod ] ;
67
- }
68
- } ) ;
61
+ globalThis . _VSCODE_NODE_MODULES = new Proxy ( Object . create ( null ) , { get : ( _target , mod ) => require ( String ( mod ) ) } ) ;
69
62
70
63
// VSCODE_GLOBALS: package/product.json
71
64
globalThis . _VSCODE_PRODUCT_JSON = require ( `${ REPO_ROOT } /product.json` ) ;
You can’t perform that action at this time.
0 commit comments