You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError('Either the extension or an NPM dependency is using the [unsupported "natives" node module](https://go.microsoft.com/fwlink/?linkid=871887).');
88
98
}
89
99
90
-
returnoriginalLoad.apply(this,arguments);
100
+
try{
101
+
returnoriginalLoad.apply(this,arguments);
102
+
}finally{
103
+
lastModuleLoadRequest=prevRequest;
104
+
lastModuleLoadParent=prevParent;
105
+
}
91
106
};
107
+
108
+
if(!args.supportGlobalNavigator){
109
+
Object.defineProperty(globalThis,'navigator',{
110
+
get: ()=>{
111
+
onUnexpectedExternalError(newPendingMigrationError('navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator for additional info on this error.'));
console.warn(`[pending-migration][navigator] additional accesses suppressed after ${maxNavigatorDiagLogs} logs`);
123
+
}
124
+
returnundefined;
125
+
}
126
+
});
127
+
}
92
128
})();
93
129
94
130
// custom process.exit logic...
@@ -139,14 +175,6 @@ function patchProcess(allowExit: boolean) {
139
175
140
176
// NodeJS since v21 defines navigator as a global object. This will likely surprise many extensions and potentially break them
141
177
// because `navigator` has historically often been used to check if running in a browser (vs running inside NodeJS)
142
-
if(!args.supportGlobalNavigator){
143
-
Object.defineProperty(globalThis,'navigator',{
144
-
get: ()=>{
145
-
onUnexpectedExternalError(newPendingMigrationError('navigator is now a global in nodejs, please see https://aka.ms/vscode-extensions/navigator for additional info on this error.'));
0 commit comments