File tree Expand file tree Collapse file tree 5 files changed +10
-20
lines changed Expand file tree Collapse file tree 5 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -111,22 +111,22 @@ module.exports = {
111
111
{
112
112
name : 'window' ,
113
113
message :
114
- 'Some global variables are not available in environments like WebWorker or Node.js. Use getGlobalObject() instead.' ,
114
+ 'Some global variables are not available in environments like WebWorker or Node.js. Use GLOBAL_OBJ instead.' ,
115
115
} ,
116
116
{
117
117
name : 'document' ,
118
118
message :
119
- 'Some global variables are not available in environments like WebWorker or Node.js. Use getGlobalObject() instead.' ,
119
+ 'Some global variables are not available in environments like WebWorker or Node.js. Use GLOBAL_OBJ instead.' ,
120
120
} ,
121
121
{
122
122
name : 'location' ,
123
123
message :
124
- 'Some global variables are not available in environments like WebWorker or Node.js. Use getGlobalObject() instead.' ,
124
+ 'Some global variables are not available in environments like WebWorker or Node.js. Use GLOBAL_OBJ instead.' ,
125
125
} ,
126
126
{
127
127
name : 'navigator' ,
128
128
message :
129
- 'Some global variables are not available in environments like WebWorker or Node.js. Use getGlobalObject() instead.' ,
129
+ 'Some global variables are not available in environments like WebWorker or Node.js. Use GLOBAL_OBJ instead.' ,
130
130
} ,
131
131
] ,
132
132
Original file line number Diff line number Diff line change 1
1
import { isString } from './is' ;
2
- import { getGlobalObject } from './worldwide' ;
2
+ import { GLOBAL_OBJ } from './worldwide' ;
3
3
4
- // eslint-disable-next-line deprecation/deprecation
5
- const WINDOW = getGlobalObject < Window > ( ) ;
4
+ const WINDOW = GLOBAL_OBJ as unknown as Window ;
6
5
7
6
const DEFAULT_MAX_STRING_LENGTH = 80 ;
8
7
Original file line number Diff line number Diff line change 1
1
import { DEBUG_BUILD } from './debug-build' ;
2
2
import { logger } from './logger' ;
3
- import { getGlobalObject } from './worldwide' ;
3
+ import { GLOBAL_OBJ } from './worldwide' ;
4
4
5
- // eslint-disable-next-line deprecation/deprecation
6
- const WINDOW = getGlobalObject < Window > ( ) ;
5
+ const WINDOW = GLOBAL_OBJ as unknown as Window ;
7
6
8
7
declare const EdgeRuntime : string | undefined ;
9
8
Original file line number Diff line number Diff line change 21
21
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
// THE SOFTWARE.
23
23
24
- import { getGlobalObject } from '../worldwide' ;
24
+ import { GLOBAL_OBJ } from '../worldwide' ;
25
25
26
- // eslint-disable-next-line deprecation/deprecation
27
- const WINDOW = getGlobalObject < Window > ( ) ;
26
+ const WINDOW = GLOBAL_OBJ as unknown as Window ;
28
27
29
28
/**
30
29
* Tells whether current environment supports History API
Original file line number Diff line number Diff line change @@ -111,13 +111,6 @@ export const GLOBAL_OBJ: InternalGlobal =
111
111
} ) ( ) ||
112
112
{ } ;
113
113
114
- /**
115
- * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8
116
- */
117
- export function getGlobalObject < T > ( ) : T & InternalGlobal {
118
- return GLOBAL_OBJ as T & InternalGlobal ;
119
- }
120
-
121
114
/**
122
115
* Returns a global singleton contained in the global `__SENTRY__` object.
123
116
*
You can’t perform that action at this time.
0 commit comments