@@ -8,42 +8,3 @@ export function writeSentryPropertiesTo(filepath: string, sentryProperties: stri
88
99 fs . writeFileSync ( path . resolve ( filepath , 'sentry.properties' ) , sentryProperties ) ;
1010}
11-
12- const sdkPackage : {
13- name : string ;
14- version : string ;
15- // eslint-disable-next-line @typescript-eslint/no-var-requires
16- } = require ( '../../package.json' ) ;
17-
18- const SDK_PACKAGE_NAME = `${ sdkPackage . name } /expo` ;
19-
20- const warningMap = new Map < string , boolean > ( ) ;
21- export function warnOnce ( message : string ) : void {
22- if ( ! warningMap . has ( message ) ) {
23- warningMap . set ( message , true ) ;
24- // eslint-disable-next-line no-console
25- console . warn ( yellow ( `${ logPrefix ( ) } ${ message } ` ) ) ;
26- }
27- }
28-
29- export function logPrefix ( ) : string {
30- return `› ${ bold ( '[@sentry/react-native/expo]' ) } ` ;
31- }
32-
33- /**
34- * The same as `chalk.yellow`
35- * This code is part of the SDK, we don't want to introduce a dependency on `chalk` just for this.
36- */
37- export function yellow ( message : string ) : string {
38- return `\x1b[33m${ message } \x1b[0m` ;
39- }
40-
41- /**
42- * The same as `chalk.bold`
43- * This code is part of the SDK, we don't want to introduce a dependency on `chalk` just for this.
44- */
45- export function bold ( message : string ) : string {
46- return `\x1b[1m${ message } \x1b[22m` ;
47- }
48-
49- export { sdkPackage , SDK_PACKAGE_NAME } ;
0 commit comments