1{"version":3,"file":"createMatcher.js","names":["createModuleMatcher","folders","moduleIds","modulePathsGroup","join","moduleMatchersGroup","moduleMatcherId","map","value","RegExp","createReactNativeMatcher","createExpoMatcher","createKnownCommunityMatcher"],"sources":["../../src/transformer/createMatcher.ts"],"sourcesContent":["// Copyright 2021-present 650 Industries (Expo). All rights reserved.\n\nexport function createModuleMatcher({\n folders = ['node_modules'],\n moduleIds,\n}: {\n folders?: string[];\n moduleIds: string[];\n}) {\n const modulePathsGroup = folders.join('|');\n\n const moduleMatchersGroup = moduleIds.join('|');\n\n const moduleMatcherId =\n '^' + [modulePathsGroup, moduleMatchersGroup].map((value) => `(?:${value})`).join('/');\n\n return new RegExp(moduleMatcherId);\n}\n\nexport const createReactNativeMatcher = ({ folders }: { folders?: string[] }) =>\n createModuleMatcher({\n folders,\n moduleIds: ['react-native/'],\n });\n\nexport const createExpoMatcher = ({ folders }: { folders?: string[] }) =>\n createModuleMatcher({\n folders,\n // We'll work to start reducing this.\n moduleIds: ['expo', '@expo', '@unimodules', '@use-expo'],\n });\n\n// TODO: Make this list as short as possible before releasing.\n// TODO: Add SDK version compat list.\nexport const createKnownCommunityMatcher = ({\n folders,\n moduleIds = [],\n}: {\n folders?: string[];\n moduleIds?: string[];\n} = {}) =>\n createModuleMatcher({\n folders,\n moduleIds: [\n ...moduleIds,\n // The more complex, the longer the entire project takes...\n // react-native-community, react-native-masked-view, react-native-picker, react-native-segmented-control, react-native\n '@react-',\n // @sentry/react-native\n '@(?:[\\\\w|-]+)/react-native',\n 'react-native-',\n 'victory-',\n 'native-base',\n 'styled-components',\n // three.js\n 'three/build/three.module.js',\n 'three/examples/jsm',\n // Special case for testing expo/expo repo\n 'html-elements/',\n // shared-element\n 'react-navigation-',\n ],\n });\n"],"mappings":";;;;;;;;;AAAA;AAEO,SAASA,mBAAT,CAA6B;EAClCC,OAAO,GAAG,CAAC,cAAD,CADwB;EAElCC;AAFkC,CAA7B,EAMJ;EACD,MAAMC,gBAAgB,GAAGF,OAAO,CAACG,IAAR,CAAa,GAAb,CAAzB;EAEA,MAAMC,mBAAmB,GAAGH,SAAS,CAACE,IAAV,CAAe,GAAf,CAA5B;EAEA,MAAME,eAAe,GACnB,MAAM,CAACH,gBAAD,EAAmBE,mBAAnB,EAAwCE,GAAxC,CAA6CC,KAAD,IAAY,MAAKA,KAAM,GAAnE,EAAuEJ,IAAvE,CAA4E,GAA5E,CADR;EAGA,OAAO,IAAIK,MAAJ,CAAWH,eAAX,CAAP;AACD;;AAEM,MAAMI,wBAAwB,GAAG,CAAC;EAAET;AAAF,CAAD,KACtCD,mBAAmB,CAAC;EAClBC,OADkB;EAElBC,SAAS,EAAE,CAAC,eAAD;AAFO,CAAD,CADd;;;;AAMA,MAAMS,iBAAiB,GAAG,CAAC;EAAEV;AAAF,CAAD,KAC/BD,mBAAmB,CAAC;EAClBC,OADkB;EAElB;EACAC,SAAS,EAAE,CAAC,MAAD,EAAS,OAAT,EAAkB,aAAlB,EAAiC,WAAjC;AAHO,CAAD,CADd,C,CAOP;AACA;;;;;AACO,MAAMU,2BAA2B,GAAG,CAAC;EAC1CX,OAD0C;EAE1CC,SAAS,GAAG;AAF8B,IAMxC,EANuC,KAOzCF,mBAAmB,CAAC;EAClBC,OADkB;EAElBC,SAAS,EAAE,CACT,GAAGA,SADM,EAET;EACA;EACA,SAJS,EAKT;EACA,4BANS,EAOT,eAPS,EAQT,UARS,EAST,aATS,EAUT,mBAVS,EAWT;EACA,6BAZS,EAaT,oBAbS,EAcT;EACA,gBAfS,EAgBT;EACA,mBAjBS;AAFO,CAAD,CAPd"}