@datadog/mobile-react-native 2.12.0 → 2.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/kotlin/com/datadog/reactnative/SdkVersion.kt +1 -1
- package/ios/Sources/SdkVersion.swift +1 -1
- package/lib/commonjs/DdSdkReactNative.js +1 -0
- package/lib/commonjs/DdSdkReactNative.js.map +1 -1
- package/lib/commonjs/metro/plugin/debugIdHelper.js +4 -5
- package/lib/commonjs/metro/plugin/debugIdHelper.js.map +1 -1
- package/lib/commonjs/metro/plugin/metroSerializer.js +7 -11
- package/lib/commonjs/metro/plugin/metroSerializer.js.map +1 -1
- package/lib/commonjs/metro/plugin/utils.js +145 -66
- package/lib/commonjs/metro/plugin/utils.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +22 -11
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +2 -2
- package/lib/commonjs/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/DdSdkReactNative.js +1 -0
- package/lib/module/DdSdkReactNative.js.map +1 -1
- package/lib/module/metro/plugin/debugIdHelper.js +3 -3
- package/lib/module/metro/plugin/debugIdHelper.js.map +1 -1
- package/lib/module/metro/plugin/metroSerializer.js +6 -8
- package/lib/module/metro/plugin/metroSerializer.js.map +1 -1
- package/lib/module/metro/plugin/utils.js +134 -60
- package/lib/module/metro/plugin/utils.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js +22 -11
- package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map +1 -1
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js +2 -2
- package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/DdSdkReactNative.d.ts.map +1 -1
- package/lib/typescript/metro/plugin/debugIdHelper.d.ts.map +1 -1
- package/lib/typescript/metro/plugin/metroSerializer.d.ts.map +1 -1
- package/lib/typescript/metro/plugin/utils.d.ts +62 -11
- package/lib/typescript/metro/plugin/utils.d.ts.map +1 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts +9 -1
- package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/DdSdkReactNative.tsx +2 -0
- package/src/metro/__tests__/__utils__/serializerUtils.ts +6 -4
- package/src/metro/__tests__/metro.test.ts +254 -0
- package/src/metro/metro.d.ts +4 -4
- package/src/metro/plugin/debugIdHelper.ts +3 -3
- package/src/metro/plugin/metroSerializer.ts +8 -9
- package/src/metro/plugin/utils.ts +189 -86
- package/src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts +39 -19
- package/src/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx +2 -2
- package/src/version.ts +1 -1
- package/lib/commonjs/utils/telemetry.js +0 -23
- package/lib/commonjs/utils/telemetry.js.map +0 -1
- package/lib/module/utils/telemetry.js +0 -16
- package/lib/module/utils/telemetry.js.map +0 -1
- package/lib/typescript/utils/telemetry.d.ts +0 -7
- package/lib/typescript/utils/telemetry.d.ts.map +0 -1
- package/src/utils/telemetry.ts +0 -17
package/lib/module/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["DdSdk","DefaultTimeProvider","BABEL_PLUGIN_TELEMETRY","ActionSource","StateErrors","ALREADY_INITIALIZED","DdBabelInteractionTracking","instance","config","trackInteractions","useAccessibilityLabel","timeProvider","telemetrySent","ddRum","isInitialized","constructor","Error","getInstance","getTelemetryConfig","babel_plugin","enabled","globalThis","__DD_RN_BABEL_PLUGIN_ENABLED__","track_interactions","getTargetName","targetObject","getContent","options","handlerArgs","componentName","actionName","accessibilityLabel","attrs","tryContent","content","length","getAccessibilityLabel","index","find","x","selectedContent","Object","values","output","useNamePrefix","wrapRumAction","func","action","args","result","sendTelemetryLog","onlyOnce","targetName","addAction","BABEL","now","catch","e","telemetryError","message","stack"],"sourceRoot":"../../../../../src","sources":["rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,4BAA4B;AAC9C,SAASC,mBAAmB,QAAQ,kDAAkD;AAGtF,SAASC,sBAAsB,QAAQ,iBAAiB;AAExD,SAASC,YAAY,QAAQ,aAAa;AAE1C,MAAMC,WAAW,GAAG;EAChBC,mBAAmB,EACf;AACR,CAAU;AAiBV,OAAO,MAAMC,0BAA0B,CAAC;EACpC,OAAeC,QAAQ,GAAsC,IAAI;EAEjE,OAAOC,MAAM,GAAgB;IACzBC,iBAAiB,EAAE,KAAK;IACxBC,qBAAqB,EAAE;EAC3B,CAAC;EAEOC,YAAY,GAAiB,IAAIV,mBAAmB,CAAC,CAAC;EAEtDW,aAAa,GAAY,KAAK;EAE9BC,KAAK,GAAwB,IAAI;EAEzCC,aAAa,GAAY,KAAK;EAEtBC,WAAWA,CAACF,KAAoB,EAAE;IACtC,IAAIP,0BAA0B,CAACC,QAAQ,EAAE;MACrC,MAAM,IAAIS,KAAK,CAACZ,WAAW,CAACC,mBAAmB,CAAC;IACpD;IAEA,IAAIQ,KAAK,EAAE;MACP,IAAI,CAACA,KAAK,GAAGA,KAAK;IACtB;IAEAP,0BAA0B,CAACC,QAAQ,GAAG,IAAI;EAC9C;EAEA,OAAOU,WAAWA,CAACJ,KAAoB,EAAE;IACrC,IAAI,CAACP,0BAA0B,CAACC,QAAQ,EAAE;MACtCD,0BAA0B,CAACC,QAAQ,GAAG,IAAID,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E,KAAK,GAAG,CAAC,GACzCG,eAAe,CAAC,CAAC,CAAC,GAClBA,eAAe,CAACH,KAAK,CAAC;IAEhC,OAAOV,OAAO,CAACiB,aAAa,GACtB,GAAGf,aAAa,MAAMc,MAAM,IAAI,GAChCA,MAAM;EAChB;EAEAE,aAAaA,CACTC,IAA6B,EAC7BC,MAAqB,EACrBtB,YAA0B,EACH;IACvB,OAAO,CAAC,GAAGuB,IAAW,KAAK;MACvB,MAAMC,MAAM,GAAGH,IAAI,CAAC,GAAGE,IAAI,CAAC;MAE5B,IAAI,CAAC,IAAI,CAACpC,aAAa,EAAE;QACrBZ,KAAK,EAAEkD,gBAAgB,CACnBhD,sBAAsB,EACtBI,0BAA0B,CAACY,kBAAkB,CAAC,CAAC,EAC/C;UAAEiC,QAAQ,EAAE;QAAK,CACrB,CAAC;QAED,IAAI,CAACvC,aAAa,GAAG,IAAI;MAC7B;MAEA,MAAMwC,UAAU,GAAG,IAAI,CAAC5B,aAAa,CAACC,YAAY,CAAC;MAEnD,MAAM;QAAEhB;MAAkB,CAAC,GAAGH,0BAA0B,CAACE,MAAM;MAE/D,IAAIC,iBAAiB,EAAE;QACnB,IAAI,CAACI,KAAK,EACJwC,SAAS,CACPN,MAAM,EACNK,UAAU,EACV;UAAE,oBAAoB,EAAEjD,YAAY,CAACmD;QAAM,CAAC,EAC5C,IAAI,CAAC3C,YAAY,CAAC4C,GAAG,CAAC,CAC1B,CAAC,CACAC,KAAK,CAACC,CAAC,IAAI;UACR,IAAIA,CAAC,YAAYzC,KAAK,EAAE;YACpBhB,KAAK,EAAE0D,cAAc,CACjBD,CAAC,CAACE,OAAO,EACTF,CAAC,CAACG,KAAK,IAAI,EAAE,EACb,kBACJ,CAAC;UACL;QACJ,CAAC,CAAC;MACV;MAEA,OAAOX,MAAM;IACjB,CAAC;EACL;AACJ","ignoreList":[]}
|
|
@@ -9,8 +9,8 @@ import { InternalLog } from '../../../InternalLog';
|
|
|
9
9
|
import { SdkVerbosity } from '../../../SdkVerbosity';
|
|
10
10
|
import { DdSdk } from '../../../sdk/DdSdk';
|
|
11
11
|
import { getErrorMessage } from '../../../utils/errorUtils';
|
|
12
|
-
import { getBabelTelemetryConfig } from '../../../utils/telemetry';
|
|
13
12
|
import { BABEL_PLUGIN_TELEMETRY } from '../../constants';
|
|
13
|
+
import { DdBabelInteractionTracking } from './DdBabelInteractionTracking';
|
|
14
14
|
import { DdEventsInterceptor } from './DdEventsInterceptor';
|
|
15
15
|
import { NoOpEventsInterceptor } from './NoOpEventsInterceptor';
|
|
16
16
|
import { areObjectShallowEqual } from './ShallowObjectEqualityChecker';
|
|
@@ -52,7 +52,7 @@ export class DdRumUserInteractionTracking {
|
|
|
52
52
|
InternalLog.log('Datadog SDK is already tracking interactions', SdkVerbosity.WARN);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
DdSdk?.sendTelemetryLog(BABEL_PLUGIN_TELEMETRY,
|
|
55
|
+
DdSdk?.sendTelemetryLog(BABEL_PLUGIN_TELEMETRY, DdBabelInteractionTracking.getTelemetryConfig(), {
|
|
56
56
|
onlyOnce: true
|
|
57
57
|
});
|
|
58
58
|
DdRumUserInteractionTracking.eventsInterceptor = new DdEventsInterceptor(options);
|
package/lib/module/rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","InternalLog","SdkVerbosity","DdSdk","getErrorMessage","
|
|
1
|
+
{"version":3,"names":["React","InternalLog","SdkVerbosity","DdSdk","getErrorMessage","BABEL_PLUGIN_TELEMETRY","DdBabelInteractionTracking","DdEventsInterceptor","NoOpEventsInterceptor","areObjectShallowEqual","getJsxRuntimes","DdRumUserInteractionTracking","isTracking","eventsInterceptor","originalCreateElement","createElement","originalMemo","memo","originalJsx","originalDevJsx","patchCreateElementFunction","originalFunction","element","props","rest","onPress","originalOnPress","args","interceptOnPress","__DATADOG_INTERNAL_ORIGINAL_ON_PRESS__","startTracking","options","log","WARN","sendTelemetryLog","getTelemetryConfig","onlyOnce","original","jsxRuntime","jsxDevRuntime","jsx","jsxDEV","e","telemetryDebug","component","propsAreEqual","prev","next","_prevOnPress","partialPrevProps","prevProps","_nextOnPress","partialNextProps","nextProps","INFO","stopTracking"],"sourceRoot":"../../../../../src","sources":["rum/instrumentation/interactionTracking/DdRumUserInteractionTracking.tsx"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,WAAW,QAAQ,sBAAsB;AAClD,SAASC,YAAY,QAAQ,uBAAuB;AACpD,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,eAAe,QAAQ,2BAA2B;AAC3D,SAASC,sBAAsB,QAAQ,iBAAiB;AAExD,SAASC,0BAA0B,QAAQ,8BAA8B;AAEzE,SAASC,mBAAmB,QAAQ,uBAAuB;AAE3D,SAASC,qBAAqB,QAAQ,yBAAyB;AAC/D,SAASC,qBAAqB,QAAQ,gCAAgC;AACtE,SAASC,cAAc,QAAQ,iBAAiB;;AAEhD;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,CAAC;EACtC,OAAeC,UAAU,GAAG,KAAK;EACjC,OAAeC,iBAAiB,GAAsB,IAAIL,qBAAqB,CAAC,CAAC;EACjF,OAAeM,qBAAqB,GAAGd,KAAK,CAACe,aAAa;EAC1D,OAAeC,YAAY,GAAGhB,KAAK,CAACiB,IAAI;EACxC,OAAeC,WAAW,GAAG,IAAI;EACjC,OAAeC,cAAc,GAAG,IAAI;EAEpC,OAAeC,0BAA0B,GAAGA,CACxCC,gBAA4C,EAC5C,CAACC,OAAO,EAAEC,KAAK,EAAE,GAAGC,IAAI,CAAyC,KACxB;IACzC,IACID,KAAK,IACL,OAAQA,KAAK,CAA6BE,OAAO,KAAK,UAAU,EAClE;MACE,MAAMC,eAAe,GAAIH,KAAK,CAA6B;MAAA,CACtDE,OAAmB;MACvBF,KAAK,CAA6BE,OAAO,GAAG,CAAC,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4B,CAACC,UAAU,GAAG,IAAI;IAC9CX,WAAW,CAAC+B,GAAG,CACX,sCAAsC,EACtC9B,YAAY,CAACoD,IACjB,CAAC;EACL;EAEA,OAAOC,YAAYA,CAAA,EAAG;IAClBvD,KAAK,CAACe,aAAa,GAAG,IAAI,CAACD,qBAAqB;IAChDd,KAAK,CAACiB,IAAI,GAAG,IAAI,CAACD,YAAY;IAC9BL,4BAA4B,CAACC,UAAU,GAAG,KAAK;IAC/C,IAAI,IAAI,CAACM,WAAW,IAAI,IAAI,CAACC,cAAc,EAAE;MACzC,MAAM,CAACmB,UAAU,EAAEC,aAAa,CAAC,GAAG7B,cAAc,CAAC,CAAC;MAEpD4B,UAAU,CAACE,GAAG,GAAG,IAAI,CAACtB,WAAW;MACjCqB,aAAa,CAACE,MAAM,GAAG,IAAI,CAACtB,cAAc;MAE1C,IAAI,CAACD,WAAW,GAAG,IAAI;MACvB,IAAI,CAACC,cAAc,GAAG,IAAI;IAC9B;EACJ;AACJ","ignoreList":[]}
|
package/lib/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DdSdkReactNative.d.ts","sourceRoot":"","sources":["../../src/DdSdkReactNative.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EACR,gCAAgC,EAEhC,4BAA4B,EAE5B,kCAAkC,EACrC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,6BAA6B,EAKhC,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAQzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAOlE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAK9D;;GAEG;AACH,qBAAa,gBAAgB;IACzB,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAgB;IACrD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAqB;IAC3D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,MAAM,EAAE,KAC3B,OACyE,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,uBAAuB,YACvB,MAAM,cACH,MAAM,KACnB,MAKF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,YAC7B,MAAM,cACH,MAAM,KACnB,MASF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metroSerializer.d.ts","sourceRoot":"","sources":["../../../../src/metro/plugin/metroSerializer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"metroSerializer.d.ts","sourceRoot":"","sources":["../../../../src/metro/plugin/metroSerializer.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACR,MAAM,EACN,oBAAoB,EACpB,sBAAsB,EACtB,eAAe,EACf,WAAW,EACX,MAAM,EACN,aAAa,EAChB,MAAM,oBAAoB,CAAC;AAS5B;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,sBAClB,eAAe,KACnC,sBAmDF,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,QAAO,eAoC/C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,kBACrB,oBAAoB,cAEnB,MAAM,WAOzB,CAAC;AAEF;;GAEG;AACH,wBAAgB,uCAAuC,CAAC,EACpD,UAAU,EACV,OAAO,EACV,EAAE;IACC,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAClC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,EAAE,CAKX"}
|
|
@@ -1,30 +1,49 @@
|
|
|
1
|
+
import type baseJSBundle from 'metro/private/DeltaBundler/Serializers/baseJSBundle';
|
|
2
|
+
import type sourceMapString from 'metro/private/DeltaBundler/Serializers/sourceMapString';
|
|
3
|
+
import type bundleToString from 'metro/private/lib/bundleToString';
|
|
4
|
+
import type countLines from 'metro/private/lib/countLines';
|
|
1
5
|
import type CountingSet from 'metro/src/lib/CountingSet';
|
|
2
6
|
import type { ReadOnlyGraph, Module, MixedOutput } from 'metro';
|
|
3
7
|
import type { DefaultConfigOptions } from './types/expoTypes';
|
|
4
|
-
import type { MetroSerializerOutput, MetroBundleWithMap
|
|
8
|
+
import type { MetroSerializerOutput, MetroBundleWithMap } from './types/metroTypes';
|
|
5
9
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* https://github.com/facebook/metro/blob/76413561abb3757285e0cb0305f1f9f616fa2b6c/packages/metro/src/Server.js#L1086C1-L1095C7
|
|
10
|
+
* Safely loads and returns the `baseJSBundle` function from Metro's internal modules.
|
|
11
|
+
* Supports multiple Metro versions with different internal paths.
|
|
10
12
|
*/
|
|
11
|
-
export declare
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
export declare const getBaseJSBundleFunction: () => typeof baseJSBundle;
|
|
14
|
+
/**
|
|
15
|
+
* Safely loads and returns the `countLines` function from Metro's internal modules.
|
|
16
|
+
* Supports multiple Metro versions with different internal paths.
|
|
17
|
+
*/
|
|
18
|
+
export declare const getCountLinesFunction: () => typeof countLines;
|
|
19
|
+
/**
|
|
20
|
+
* Safely loads and returns the `bundleToString` function from Metro's internal modules.
|
|
21
|
+
* Supports multiple Metro versions with different internal paths.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getBundleToStringFunction: () => typeof bundleToString;
|
|
14
24
|
/**
|
|
15
25
|
* CountingSet was added in Metro 0.71.2 - a modified `Set` that only deletes items when the
|
|
16
26
|
* number of `delete(item)` calls matches the number of `add(item)` calls.
|
|
17
27
|
*
|
|
18
28
|
* https://github.com/facebook/metro/commit/fc29a1177f883144674cf85a813b58567f69d545
|
|
19
29
|
*/
|
|
20
|
-
export declare const
|
|
30
|
+
export declare const getCreateCountingSetFunction: () => () => CountingSet<string>;
|
|
21
31
|
/**
|
|
22
32
|
* In Metro versions prior to v0.80.10, `sourceMapString` was exported as a default export.
|
|
23
33
|
* Starting with v0.80.10, it became a named export.
|
|
24
34
|
*
|
|
25
|
-
* @returns The resolved `sourceMapString` function, of type {@link
|
|
35
|
+
* @returns The resolved `sourceMapString` function, of type {@link sourceMapString}
|
|
36
|
+
*/
|
|
37
|
+
export declare const getSourceMapStringFunction: () => typeof sourceMapString;
|
|
38
|
+
/**
|
|
39
|
+
* This function ensures that modules in source maps are sorted in the same
|
|
40
|
+
* order as in a plain JS bundle.
|
|
41
|
+
*
|
|
42
|
+
* https://github.com/facebook/metro/blob/76413561abb3757285e0cb0305f1f9f616fa2b6c/packages/metro/src/Server.js#L1086C1-L1095C7
|
|
26
43
|
*/
|
|
27
|
-
export declare
|
|
44
|
+
export declare function getSortedModules(graph: ReadOnlyGraph, { createModuleId }: {
|
|
45
|
+
createModuleId: (file: string) => number;
|
|
46
|
+
}): readonly Module<MixedOutput>[];
|
|
28
47
|
/**
|
|
29
48
|
* Converts the serializer result of type {@link MetroSerializerOutput} to {@link MetroBundleWithMap}.
|
|
30
49
|
*/
|
|
@@ -33,4 +52,36 @@ export declare const convertSerializerOutput: (output: MetroSerializerOutput) =>
|
|
|
33
52
|
* Gets the default Expo configuration options.
|
|
34
53
|
*/
|
|
35
54
|
export declare const getDefaultExpoConfig: (projectRoot: string, options: DefaultConfigOptions) => DefaultConfigOptions;
|
|
55
|
+
/**
|
|
56
|
+
* Safely requires a module from multiple possible paths, returning its default export if found.
|
|
57
|
+
* Caches the result to avoid redundant requires.
|
|
58
|
+
* Useful for supporting multiple Metro versions with different internal paths.
|
|
59
|
+
* @param modulePaths The list of possible module paths to try.
|
|
60
|
+
* @returns the default export of the first successfully required module.
|
|
61
|
+
* @throws if none of the module paths could be resolved.
|
|
62
|
+
*/
|
|
63
|
+
export declare const lazyRequireDefaultExport: <T>(modulePaths: string[]) => T;
|
|
64
|
+
/**
|
|
65
|
+
* Safely requires a module from multiple possible paths, returning its default export if found.
|
|
66
|
+
* Caches the result to avoid redundant requires.
|
|
67
|
+
* Useful for supporting multiple Metro versions with different internal paths.
|
|
68
|
+
* @param modulePaths The list of possible module paths to try.
|
|
69
|
+
* @returns the default export of the first successfully required module, or `undefined` if none could be resolved.
|
|
70
|
+
*/
|
|
71
|
+
export declare const safeLazyRequireDefaultExport: <T>(modulePaths: string[]) => T | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Safely requires a module from multiple possible paths, returning its default export if found.
|
|
74
|
+
* Useful for supporting multiple Metro versions with different internal paths.
|
|
75
|
+
* @param modulePaths The list of possible module paths to try.
|
|
76
|
+
* @returns the default export of the first successfully required module, or `undefined` if none could be resolved.
|
|
77
|
+
*/
|
|
78
|
+
export declare function safeRequireDefaultExport<T>(modulePaths: string[]): T | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Safely extracts the default export from a module, if it exists.
|
|
81
|
+
* Useful for supporting both CommonJS and ESM-syntax exports.
|
|
82
|
+
* Supports upcoming Metro v0.83.2 https://github.com/facebook/metro/commit/5d301d7177af455fc6a94a0ba464639677cdf4b4.
|
|
83
|
+
*/
|
|
84
|
+
export declare function getDefaultExport<T>(module: {
|
|
85
|
+
default: T;
|
|
86
|
+
} | T): T | undefined;
|
|
36
87
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/metro/plugin/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/metro/plugin/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,YAAY,MAAM,qDAAqD,CAAC;AACpF,OAAO,KAAK,eAAe,MAAM,wDAAwD,CAAC;AAC1F,OAAO,KAAK,cAAc,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,UAAU,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AA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AAG,CAAC,GAAG,SAAS,CAU7E"}
|
package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DdRum } from '../../DdRum';
|
|
1
2
|
import type { RumActionType } from '../../types';
|
|
2
3
|
type BabelConfig = {
|
|
3
4
|
trackInteractions: boolean;
|
|
@@ -20,9 +21,16 @@ export declare class DdBabelInteractionTracking {
|
|
|
20
21
|
static config: BabelConfig;
|
|
21
22
|
private timeProvider;
|
|
22
23
|
private telemetrySent;
|
|
24
|
+
private ddRum;
|
|
23
25
|
isInitialized: boolean;
|
|
24
26
|
private constructor();
|
|
25
|
-
static getInstance(): DdBabelInteractionTracking;
|
|
27
|
+
static getInstance(ddRum?: typeof DdRum): DdBabelInteractionTracking;
|
|
28
|
+
static getTelemetryConfig(): {
|
|
29
|
+
babel_plugin: {
|
|
30
|
+
enabled: boolean;
|
|
31
|
+
track_interactions: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
26
34
|
private getTargetName;
|
|
27
35
|
wrapRumAction(func: (...args: any[]) => any, action: RumActionType, targetObject: TargetObject): (...args: any[]) => any;
|
|
28
36
|
}
|
package/lib/typescript/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DdBabelInteractionTracking.d.ts","sourceRoot":"","sources":["../../../../../src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DdBabelInteractionTracking.d.ts","sourceRoot":"","sources":["../../../../../src/rum/instrumentation/interactionTracking/DdBabelInteractionTracking.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQjD,KAAK,WAAW,GAAG;IACf,iBAAiB,EAAE,OAAO,CAAC;IAC3B,qBAAqB,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,KAAK,YAAY,GAAG;IAChB,UAAU,EAAE,CAAC,MAAM,MAAM,EAAE,CAAC,GAAG,SAAS,CAAC;IACzC,OAAO,EAAE;QAAE,UAAU,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC;IACzD,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB,CAAC;AAEF,qBAAa,0BAA0B;IACnC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA2C;IAElE,MAAM,CAAC,MAAM,EAAE,WAAW,CAGxB;IAEF,OAAO,CAAC,YAAY,CAA2C;IAE/D,OAAO,CAAC,aAAa,CAAkB;IAEvC,OAAO,CAAC,KAAK,CAA6B;IAE1C,aAAa,EAAE,OAAO,CAAS;IAE/B,OAAO;IAYP,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK;IAUvC,MAAM,CAAC,kBAAkB;;;;;;IAUzB,OAAO,CAAC,aAAa;IAqDrB,aAAa,CACT,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAC7B,MAAM,EAAE,aAAa,EACrB,YAAY,EAAE,YAAY,GAC3B,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG;CAwC7B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "2.12.
|
|
1
|
+
export declare const version = "2.12.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/mobile-react-native",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.2",
|
|
4
4
|
"description": "A client-side React Native module to interact with Datadog",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"datadog",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"dependencies": {
|
|
119
119
|
"big-integer": "^1.6.52"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "1b9a91b42b91eee7276d0cf066ff3e44ad9b7185"
|
|
122
122
|
}
|
package/src/DdSdkReactNative.tsx
CHANGED
|
@@ -367,6 +367,8 @@ export class DdSdkReactNative {
|
|
|
367
367
|
trackInteractions: configuration.trackInteractions,
|
|
368
368
|
useAccessibilityLabel: configuration.useAccessibilityLabel
|
|
369
369
|
};
|
|
370
|
+
|
|
371
|
+
DdBabelInteractionTracking.getInstance(DdRum);
|
|
370
372
|
}
|
|
371
373
|
|
|
372
374
|
if (DdSdkReactNative.wasAutoInstrumented) {
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* Copyright 2016-Present Datadog, Inc.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
8
|
-
import countLines from 'metro/src/lib/countLines';
|
|
9
|
-
|
|
10
7
|
import type {
|
|
11
8
|
MetroSerializer,
|
|
12
9
|
MixedOutput,
|
|
13
10
|
Module,
|
|
14
11
|
MetroVirtualModuleOutput
|
|
15
12
|
} from '../../plugin/types/metroTypes';
|
|
16
|
-
import {
|
|
13
|
+
import {
|
|
14
|
+
getCreateCountingSetFunction,
|
|
15
|
+
getCountLinesFunction
|
|
16
|
+
} from '../../plugin/utils';
|
|
17
17
|
|
|
18
18
|
export const mockSerializerArgsForEmptyModule = (): Parameters<MetroSerializer> => {
|
|
19
19
|
return [
|
|
@@ -48,6 +48,8 @@ export const mockSerializerArgsForEmptyModule = (): Parameters<MetroSerializer>
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
export const mockSerializerArgsForSourceMappingURLModule = (): Parameters<MetroSerializer> => {
|
|
51
|
+
const countLines = getCountLinesFunction();
|
|
52
|
+
const createCountingSet = getCreateCountingSetFunction();
|
|
51
53
|
const mockedCode = '//# sourceMappingURL=index.android.bundle.map';
|
|
52
54
|
return [
|
|
53
55
|
'index.js',
|
|
@@ -27,6 +27,10 @@ const DEBUG_ID_CODE_SNIPPET =
|
|
|
27
27
|
'var _datadogDebugIds,_datadogDebugIdMeta;void 0===_datadogDebugIds&&(_datadogDebugIds={});try{var stack=(new Error).stack;stack&&(_datadogDebugIds[stack]="__datadog_debug_id_placeholder__",_datadogDebugIdMeta="datadog-debug-id-__datadog_debug_id_placeholder__")}catch(e){}';
|
|
28
28
|
|
|
29
29
|
describe('Datadog Metro Plugin', () => {
|
|
30
|
+
afterEach(() => {
|
|
31
|
+
jest.resetModules();
|
|
32
|
+
});
|
|
33
|
+
|
|
30
34
|
describe('Datadog Metro Serializer', () => {
|
|
31
35
|
test('generates bundle and source map with UUID v5 Debug ID', async () => {
|
|
32
36
|
const codeSnippetHash = createHash('md5');
|
|
@@ -404,4 +408,254 @@ describe('Datadog Metro Plugin', () => {
|
|
|
404
408
|
expect(result.map).toBe('{"testMap":"test"}');
|
|
405
409
|
});
|
|
406
410
|
});
|
|
411
|
+
|
|
412
|
+
describe('Import Utils', () => {
|
|
413
|
+
test('M getDefaultExport extracts the default export if it exists', () => {
|
|
414
|
+
// GIVEN
|
|
415
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
416
|
+
const getDefaultExport = require('../plugin/utils')
|
|
417
|
+
.getDefaultExport;
|
|
418
|
+
|
|
419
|
+
const exampleModuleWithDefault = {
|
|
420
|
+
default: 'default export',
|
|
421
|
+
namedExport: 'named export'
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
// WHEN
|
|
425
|
+
const result = getDefaultExport(exampleModuleWithDefault);
|
|
426
|
+
|
|
427
|
+
// THEN
|
|
428
|
+
expect(result).toBe('default export');
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
test('M getDefaultExport returns the module as it is if default does not exist', () => {
|
|
432
|
+
// GIVEN
|
|
433
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
434
|
+
const getDefaultExport = require('../plugin/utils')
|
|
435
|
+
.getDefaultExport;
|
|
436
|
+
|
|
437
|
+
const exampleModule1 = {
|
|
438
|
+
namedExport: 'named export'
|
|
439
|
+
};
|
|
440
|
+
|
|
441
|
+
const exampleModule2 = 'just a string';
|
|
442
|
+
|
|
443
|
+
// WHEN
|
|
444
|
+
const result1 = getDefaultExport(exampleModule1);
|
|
445
|
+
const result2 = getDefaultExport(exampleModule2);
|
|
446
|
+
|
|
447
|
+
// THEN
|
|
448
|
+
expect(result1).toEqual({ namedExport: 'named export' });
|
|
449
|
+
expect(result2).toBe('just a string');
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
test('M getDefaultExport returns undefined if the module is null or undefined', () => {
|
|
453
|
+
// GIVEN
|
|
454
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
455
|
+
const getDefaultExport = require('../plugin/utils')
|
|
456
|
+
.getDefaultExport;
|
|
457
|
+
|
|
458
|
+
const exampleModule1 = null;
|
|
459
|
+
const exampleModule2 = undefined;
|
|
460
|
+
|
|
461
|
+
// WHEN
|
|
462
|
+
const result1 = getDefaultExport(exampleModule1);
|
|
463
|
+
const result2 = getDefaultExport(exampleModule2);
|
|
464
|
+
|
|
465
|
+
// THEN
|
|
466
|
+
expect(result1).toBeUndefined();
|
|
467
|
+
expect(result2).toBeUndefined();
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
test('M createCountingSet correctly imports function from metro/src when metro/private is not available', () => {
|
|
471
|
+
// GIVEN
|
|
472
|
+
jest.isolateModules(() => {
|
|
473
|
+
// GIVEN
|
|
474
|
+
jest.doMock('metro/private/lib/CountingSet', () => {
|
|
475
|
+
throw new Error('Module not found');
|
|
476
|
+
});
|
|
477
|
+
|
|
478
|
+
jest.doMock(
|
|
479
|
+
'metro/src/lib/CountingSet',
|
|
480
|
+
() => ({
|
|
481
|
+
default: class CountingSetMock {
|
|
482
|
+
test: string = 'constructor_not_called';
|
|
483
|
+
constructor() {
|
|
484
|
+
this.test = 'constructor_called';
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}),
|
|
488
|
+
{ virtual: true }
|
|
489
|
+
);
|
|
490
|
+
|
|
491
|
+
// WHEN
|
|
492
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
493
|
+
const utils = require('../plugin/utils');
|
|
494
|
+
const createCountingSet = utils.getCreateCountingSetFunction();
|
|
495
|
+
const result = createCountingSet();
|
|
496
|
+
|
|
497
|
+
// THEN
|
|
498
|
+
expect(result).toHaveProperty('test');
|
|
499
|
+
expect(result.test).toBe('constructor_called');
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
test('M sourcemapString correctly imports function from metro/src when metro/private is not available', () => {
|
|
504
|
+
// GIVEN
|
|
505
|
+
jest.isolateModules(() => {
|
|
506
|
+
// GIVEN
|
|
507
|
+
jest.doMock(
|
|
508
|
+
'metro/private/DeltaBundler/Serializers/sourceMapString',
|
|
509
|
+
() => {
|
|
510
|
+
throw new Error('Module not found');
|
|
511
|
+
}
|
|
512
|
+
);
|
|
513
|
+
|
|
514
|
+
jest.doMock(
|
|
515
|
+
'metro/src/DeltaBundler/Serializers/sourceMapString',
|
|
516
|
+
() => ({
|
|
517
|
+
default: (
|
|
518
|
+
modules: unknown[],
|
|
519
|
+
options: object
|
|
520
|
+
): string =>
|
|
521
|
+
`test-modules_length:${
|
|
522
|
+
modules.length
|
|
523
|
+
},options_keys:${Object.keys(options).length}`
|
|
524
|
+
}),
|
|
525
|
+
{ virtual: true }
|
|
526
|
+
);
|
|
527
|
+
|
|
528
|
+
// WHEN
|
|
529
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
530
|
+
const utils = require('../plugin/utils');
|
|
531
|
+
const metroSourceMapString = utils.getSourceMapStringFunction();
|
|
532
|
+
const result = metroSourceMapString([{}, {}, {}], {
|
|
533
|
+
excludeSource: true,
|
|
534
|
+
shouldAddToIgnoreList: () => true
|
|
535
|
+
});
|
|
536
|
+
|
|
537
|
+
// THEN
|
|
538
|
+
expect(result).toBe('test-modules_length:3,options_keys:2');
|
|
539
|
+
});
|
|
540
|
+
});
|
|
541
|
+
|
|
542
|
+
test('M sourcemapString returns the correct function when retrieved as named export', () => {
|
|
543
|
+
// GIVEN
|
|
544
|
+
jest.isolateModules(() => {
|
|
545
|
+
// GIVEN
|
|
546
|
+
jest.doMock(
|
|
547
|
+
'metro/private/DeltaBundler/Serializers/sourceMapString',
|
|
548
|
+
() => ({
|
|
549
|
+
sourceMapString: (
|
|
550
|
+
modules: unknown[],
|
|
551
|
+
options: object
|
|
552
|
+
): string =>
|
|
553
|
+
`test-modules_length:${
|
|
554
|
+
modules.length
|
|
555
|
+
},options_keys:${Object.keys(options).length}`
|
|
556
|
+
})
|
|
557
|
+
);
|
|
558
|
+
|
|
559
|
+
// WHEN
|
|
560
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
561
|
+
const utils = require('../plugin/utils');
|
|
562
|
+
const metroSourceMapString = utils.getSourceMapStringFunction();
|
|
563
|
+
const result = metroSourceMapString([{}, {}, {}], {
|
|
564
|
+
excludeSource: true,
|
|
565
|
+
shouldAddToIgnoreList: () => true
|
|
566
|
+
});
|
|
567
|
+
// THEN
|
|
568
|
+
expect(result).toBe('test-modules_length:3,options_keys:2');
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
test('M sourcemapString returns the correct function when retrieved as default export', () => {
|
|
573
|
+
// GIVEN
|
|
574
|
+
jest.isolateModules(() => {
|
|
575
|
+
// GIVEN
|
|
576
|
+
jest.doMock(
|
|
577
|
+
'metro/private/DeltaBundler/Serializers/sourceMapString',
|
|
578
|
+
() => ({
|
|
579
|
+
default: (
|
|
580
|
+
modules: unknown[],
|
|
581
|
+
options: object
|
|
582
|
+
): string =>
|
|
583
|
+
`test-modules_length:${
|
|
584
|
+
modules.length
|
|
585
|
+
},options_keys:${Object.keys(options).length}`
|
|
586
|
+
})
|
|
587
|
+
);
|
|
588
|
+
|
|
589
|
+
// WHEN
|
|
590
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
591
|
+
const utils = require('../plugin/utils');
|
|
592
|
+
const metroSourceMapString = utils.getSourceMapStringFunction();
|
|
593
|
+
const result = metroSourceMapString([{}, {}, {}], {
|
|
594
|
+
excludeSource: true,
|
|
595
|
+
shouldAddToIgnoreList: () => true
|
|
596
|
+
});
|
|
597
|
+
// THEN
|
|
598
|
+
expect(result).toBe('test-modules_length:3,options_keys:2');
|
|
599
|
+
});
|
|
600
|
+
});
|
|
601
|
+
|
|
602
|
+
test('M getBaseJSBundle correctly imports function from metro/src when metro/private is not available', () => {
|
|
603
|
+
// GIVEN
|
|
604
|
+
jest.isolateModules(() => {
|
|
605
|
+
// GIVEN
|
|
606
|
+
jest.doMock(
|
|
607
|
+
'metro/private/DeltaBundler/Serializers/baseJSBundle',
|
|
608
|
+
() => {
|
|
609
|
+
throw new Error('Module not found');
|
|
610
|
+
}
|
|
611
|
+
);
|
|
612
|
+
|
|
613
|
+
jest.doMock(
|
|
614
|
+
'metro/src/DeltaBundler/Serializers/baseJSBundle',
|
|
615
|
+
() => () => ({
|
|
616
|
+
test: 'ok'
|
|
617
|
+
}),
|
|
618
|
+
{ virtual: true }
|
|
619
|
+
);
|
|
620
|
+
|
|
621
|
+
// WHEN
|
|
622
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
623
|
+
const utils = require('../plugin/utils');
|
|
624
|
+
const baseJSBundle = utils.getBaseJSBundleFunction();
|
|
625
|
+
const result = baseJSBundle();
|
|
626
|
+
|
|
627
|
+
// THEN
|
|
628
|
+
expect(result).toHaveProperty('test');
|
|
629
|
+
expect(result.test).toBe('ok');
|
|
630
|
+
});
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
test('M getCountLines correctly imports function from metro/src when metro/private is not available', () => {
|
|
634
|
+
// GIVEN
|
|
635
|
+
jest.isolateModules(() => {
|
|
636
|
+
// GIVEN
|
|
637
|
+
jest.doMock('metro/private/lib/countLines', () => {
|
|
638
|
+
throw new Error('Module not found');
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
// Random int between 10 and 100 to ensure the mock is used
|
|
642
|
+
const randomInt = Math.floor(Math.random() * 90) + 10;
|
|
643
|
+
|
|
644
|
+
jest.doMock(
|
|
645
|
+
'metro/src/lib/countLines',
|
|
646
|
+
() => (str: string): number => str.length + randomInt,
|
|
647
|
+
{ virtual: true }
|
|
648
|
+
);
|
|
649
|
+
|
|
650
|
+
// WHEN
|
|
651
|
+
// eslint-disable-next-line global-require, @typescript-eslint/no-var-requires
|
|
652
|
+
const utils = require('../plugin/utils');
|
|
653
|
+
const getCountLines = utils.getCountLinesFunction();
|
|
654
|
+
const result = getCountLines('test-string');
|
|
655
|
+
|
|
656
|
+
// THEN
|
|
657
|
+
expect(result).toBe('test-string'.length + randomInt);
|
|
658
|
+
});
|
|
659
|
+
});
|
|
660
|
+
});
|
|
407
661
|
});
|
package/src/metro/metro.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ declare type Bundle = {
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
// https://github.com/facebook/metro/blob/a3d021a0d021b5706372059f472715c63019e044/packages/metro/src/DeltaBundler/Serializers/baseJSBundle.js#L25
|
|
31
|
-
declare module 'metro/
|
|
31
|
+
declare module 'metro/private/DeltaBundler/Serializers/baseJSBundle' {
|
|
32
32
|
const baseJSBundle: (
|
|
33
33
|
entryPoint: string,
|
|
34
34
|
preModules: ReadonlyArray<Module>,
|
|
@@ -39,7 +39,7 @@ declare module 'metro/src/DeltaBundler/Serializers/baseJSBundle' {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// https://github.com/facebook/metro/blob/a3d021a0d021b5706372059f472715c63019e044/packages/metro/src/lib/bundleToString.js#L22
|
|
42
|
-
declare module 'metro/
|
|
42
|
+
declare module 'metro/private/lib/bundleToString' {
|
|
43
43
|
const bundleToString: (
|
|
44
44
|
bundle: Bundle
|
|
45
45
|
) => {
|
|
@@ -51,7 +51,7 @@ declare module 'metro/src/lib/bundleToString' {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
// https://github.com/facebook/metro/blob/a3d021a0d021b5706372059f472715c63019e044/packages/metro/src/DeltaBundler/Serializers/sourceMapString.js#L22
|
|
54
|
-
declare module 'metro/
|
|
54
|
+
declare module 'metro/private/DeltaBundler/Serializers/sourceMapString' {
|
|
55
55
|
import type { MixedOutput, Module } from 'metro';
|
|
56
56
|
|
|
57
57
|
const sourceMapString: (
|
|
@@ -67,7 +67,7 @@ declare module 'metro/src/DeltaBundler/Serializers/sourceMapString' {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// https://github.com/facebook/metro/blob/a3d021a0d021b5706372059f472715c63019e044/packages/metro/src/lib/countLines.js#L16
|
|
70
|
-
declare module 'metro/
|
|
70
|
+
declare module 'metro/private/lib/countLines' {
|
|
71
71
|
const countLines: (code: string) => number;
|
|
72
72
|
export = countLines;
|
|
73
73
|
}
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
import { createHash } from 'crypto';
|
|
11
11
|
import { existsSync, mkdirSync, writeFileSync, unlinkSync } from 'fs';
|
|
12
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
13
|
-
import countLines from 'metro/src/lib/countLines';
|
|
14
12
|
import path from 'path';
|
|
15
13
|
|
|
16
14
|
import type {
|
|
@@ -20,7 +18,7 @@ import type {
|
|
|
20
18
|
MetroBundleWithMap,
|
|
21
19
|
DatadogDebugIdModule
|
|
22
20
|
} from './types/metroTypes';
|
|
23
|
-
import {
|
|
21
|
+
import { getCreateCountingSetFunction, getCountLinesFunction } from './utils';
|
|
24
22
|
|
|
25
23
|
/**
|
|
26
24
|
* Regex to match the Debug ID comment in the bundle.
|
|
@@ -63,6 +61,8 @@ const DEBUG_ID_METADATA_PREFIX = 'datadog-debug-id-';
|
|
|
63
61
|
*/
|
|
64
62
|
export const createDebugIdModule = (debugId: string): DatadogDebugIdModule => {
|
|
65
63
|
let debugIdCode = createDebugIdSnippet(debugId);
|
|
64
|
+
const countLines = getCountLinesFunction();
|
|
65
|
+
const createCountingSet = getCreateCountingSetFunction();
|
|
66
66
|
|
|
67
67
|
return {
|
|
68
68
|
setSource: (code: string) => {
|