@callstack/react-native-brownfield 4.3.0 → 5.0.0
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/lib/commonjs/expo-config-plugin/ios/podfileHelpers.js +2 -2
- package/lib/commonjs/expo-config-plugin/ios/podfileHelpers.js.map +1 -1
- package/lib/module/expo-config-plugin/ios/podfileHelpers.js +2 -2
- package/lib/module/expo-config-plugin/ios/podfileHelpers.js.map +1 -1
- package/lib/typescript/commonjs/src/expo-config-plugin/ios/podfileHelpers.d.ts.map +1 -1
- package/lib/typescript/module/src/expo-config-plugin/ios/podfileHelpers.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/expo-config-plugin/ios/podfileHelpers.ts +4 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.modifyPodfile=modifyPodfile;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _SourceModificationError=require("../errors/SourceModificationError");var _logging=require("../logging");var _engine=require("../template/engine");var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START='# >>> react-native-brownfield Expo SDK 55+ swift defines >>>';var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END='# <<< react-native-brownfield Expo SDK 55+ swift defines <<<';function ensureExpoDefinesForSDK55AndAbove(podfile,expoMajor){if(podfile.includes(BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START)){return podfile;}var defaultDeploymentTarget=expoMajor>=56?'16.4':'15.1';var hook=`
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.modifyPodfile=modifyPodfile;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _SourceModificationError=require("../errors/SourceModificationError");var _logging=require("../logging");var _engine=require("../template/engine");var MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION=56;var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START='# >>> react-native-brownfield Expo SDK 55+ swift defines >>>';var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END='# <<< react-native-brownfield Expo SDK 55+ swift defines <<<';function ensureExpoDefinesForSDK55AndAbove(podfile,expoMajor){if(podfile.includes(BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START)){return podfile;}var defaultDeploymentTarget=expoMajor>=56?'16.4':'15.1';var hook=`
|
|
2
2
|
${BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START}
|
|
3
3
|
brownfield_ios_deployment_target = podfile_properties['ios.deploymentTarget'] || '${defaultDeploymentTarget}'
|
|
4
4
|
installer.pods_project.targets.each do |target|
|
|
@@ -14,5 +14,5 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
${BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END}
|
|
17
|
-
`;var postInstallMatch=podfile.match(/(post_install\s+do\s+\|installer\|\s*\n)((?:(?!^\s*end\s*$)[\s\S])*)(^\s*end\s*$)/m);if(postInstallMatch){var _postInstallMatch=(0,_slicedToArray2.default)(postInstallMatch,4),whole=_postInstallMatch[0],start=_postInstallMatch[1],content=_postInstallMatch[2],end=_postInstallMatch[3];var updated=`${start}${content.trimEnd()}\n${hook}\n${end}`;return podfile.replace(whole,updated);}return`${podfile.trimEnd()}\n\npost_install do |installer|\n${hook}\nend\n`;}function modifyPodfile(podfile,frameworkName,expoMajor){if(podfile.includes(`target '${frameworkName}'`)){_logging.Logger.logDebug(`Framework target "${frameworkName}" already in Podfile, skipping modification`);return podfile;}_logging.Logger.logDebug(`Modifying Podfile for framework: ${frameworkName}`);var frameworkTargetBlock=(0,_engine.renderTemplate)('ios','PodfileTargetBlock.rb',{'{{FRAMEWORK_NAME}}':frameworkName});var mainTargetMatch=podfile.match(/(target\s+['"][^'"]+['"]\s+do\s*\n)([\s\S]*?)(^end\s*$)/m);if(!mainTargetMatch){throw new _SourceModificationError.SourceModificationError('Could not find main target in Podfile. Please manually add the framework target.');}var _mainTargetMatch=(0,_slicedToArray2.default)(mainTargetMatch,3),targetStart=_mainTargetMatch[1],targetContent=_mainTargetMatch[2];var insertIndex=podfile.indexOf(mainTargetMatch[0])+targetStart.length+targetContent.length;var modifiedPodfile=podfile.slice(0,insertIndex)+frameworkTargetBlock+podfile.slice(insertIndex);_logging.Logger.logDebug(`Added framework target "${frameworkName}" to Podfile`);if(expoMajor<
|
|
17
|
+
`;var postInstallMatch=podfile.match(/(post_install\s+do\s+\|installer\|\s*\n)((?:(?!^\s*end\s*$)[\s\S])*)(^\s*end\s*$)/m);if(postInstallMatch){var _postInstallMatch=(0,_slicedToArray2.default)(postInstallMatch,4),whole=_postInstallMatch[0],start=_postInstallMatch[1],content=_postInstallMatch[2],end=_postInstallMatch[3];var updated=`${start}${content.trimEnd()}\n${hook}\n${end}`;return podfile.replace(whole,updated);}return`${podfile.trimEnd()}\n\npost_install do |installer|\n${hook}\nend\n`;}function modifyPodfile(podfile,frameworkName,expoMajor){if(podfile.includes(`target '${frameworkName}'`)){_logging.Logger.logDebug(`Framework target "${frameworkName}" already in Podfile, skipping modification`);return podfile;}_logging.Logger.logDebug(`Modifying Podfile for framework: ${frameworkName}`);var frameworkTargetBlock=(0,_engine.renderTemplate)('ios','PodfileTargetBlock.rb',{'{{FRAMEWORK_NAME}}':frameworkName});var mainTargetMatch=podfile.match(/(target\s+['"][^'"]+['"]\s+do\s*\n)([\s\S]*?)(^end\s*$)/m);if(!mainTargetMatch){throw new _SourceModificationError.SourceModificationError('Could not find main target in Podfile. Please manually add the framework target.');}var _mainTargetMatch=(0,_slicedToArray2.default)(mainTargetMatch,3),targetStart=_mainTargetMatch[1],targetContent=_mainTargetMatch[2];var insertIndex=podfile.indexOf(mainTargetMatch[0])+targetStart.length+targetContent.length;var modifiedPodfile=podfile.slice(0,insertIndex)+frameworkTargetBlock+podfile.slice(insertIndex);_logging.Logger.logDebug(`Added framework target "${frameworkName}" to Podfile`);if(expoMajor<MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION){var versionLabel=expoMajor<0?'unknown':expoMajor.toString();throw new _SourceModificationError.SourceModificationError(`Expo SDK ${versionLabel} is not supported. Please use Expo SDK ${MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION} or newer. For older versions, please see the matrix of supported versions: https://oss.callstack.com/react-native-brownfield/docs/getting-started/introduction#expo-version-compatibility`);}modifiedPodfile=ensureExpoDefinesForSDK55AndAbove(modifiedPodfile,expoMajor);return modifiedPodfile;}
|
|
18
18
|
//# sourceMappingURL=podfileHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_SourceModificationError","require","_logging","_engine","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END","ensureExpoDefinesForSDK55AndAbove","podfile","expoMajor","includes","defaultDeploymentTarget","hook","postInstallMatch","match","_postInstallMatch","_slicedToArray2","default","whole","start","content","end","updated","trimEnd","replace","modifyPodfile","frameworkName","Logger","logDebug","frameworkTargetBlock","renderTemplate","mainTargetMatch","SourceModificationError","_mainTargetMatch","targetStart","targetContent","insertIndex","indexOf","length","modifiedPodfile","slice","versionLabel","toString"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/ios/podfileHelpers.ts"],"mappings":"4QAAA,IAAAA,wBAAA,CAAAC,OAAA,sCACA,IAAAC,QAAA,CAAAD,OAAA,eACA,IAAAE,OAAA,CAAAF,OAAA,uBAEA,GAAM,CAAAG,iDAAiD,CACrD,8DAA8D,CAChE,GAAM,CAAAC,+CAA+C,CACnD,8DAA8D,CAEhE,QAAS,CAAAC,iCAAiCA,CACxCC,OAAe,CACfC,SAAiB,CACT,CACR,GA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,uBAAuB,CAAE,CAC1E,oBAAoB,CAAEJ,aACxB,CAAC,CAAC,CAGF,GAAM,CAAAK,eAAe,CAAGvB,OAAO,CAACM,KAAK,CACnC,0DACF,CAAC,CAED,GAAI,CAACiB,eAAe,CAAE,CACpB,KAAM,IAAI,CAAAC,gDAAuB,CAC/B,kFACF,CAAC,CACH,CAEA,IAAAC,gBAAA,IAAAjB,eAAA,CAAAC,OAAA,EAAuCc,eAAe,IAA7CG,WAAW,CAAAD,gBAAA,IAAEE,aAAa,CAAAF,gBAAA,IACnC,GAAM,CAAAG,WAAW,CACf5B,OAAO,CAAC6B,OAAO,CAACN,eAAe,CAAC,CAAC,CAAC,CAAC,CACnCG,WAAW,CAACI,MAAM,CAClBH,aAAa,CAACG,MAAM,CAEtB,GAAI,CAAAC,eAAe,CACjB/B,OAAO,CAACgC,KAAK,CAAC,CAAC,CAAEJ,WAAW,CAAC,CAC7BP,oBAAoB,CACpBrB,OAAO,CAACgC,KAAK,CAACJ,WAAW,CAAC,CAE5BT,eAAM,CAACC,QAAQ,CAAC,2BAA2BF,aAAa,cAAc,CAAC,CAEvE,GAAIjB,SAAS,
|
|
1
|
+
{"version":3,"names":["_SourceModificationError","require","_logging","_engine","MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END","ensureExpoDefinesForSDK55AndAbove","podfile","expoMajor","includes","defaultDeploymentTarget","hook","postInstallMatch","match","_postInstallMatch","_slicedToArray2","default","whole","start","content","end","updated","trimEnd","replace","modifyPodfile","frameworkName","Logger","logDebug","frameworkTargetBlock","renderTemplate","mainTargetMatch","SourceModificationError","_mainTargetMatch","targetStart","targetContent","insertIndex","indexOf","length","modifiedPodfile","slice","versionLabel","toString"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/ios/podfileHelpers.ts"],"mappings":"4QAAA,IAAAA,wBAAA,CAAAC,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Ae,CACf9B,SACF,CAAC,CAED,MAAO,CAAA8B,eAAe,CACxB","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.modifyPodfile=modifyPodfile;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _SourceModificationError=require("../errors/SourceModificationError");var _logging=require("../logging");var _engine=require("../template/engine");var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START='# >>> react-native-brownfield Expo SDK 55+ swift defines >>>';var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END='# <<< react-native-brownfield Expo SDK 55+ swift defines <<<';function ensureExpoDefinesForSDK55AndAbove(podfile,expoMajor){if(podfile.includes(BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START)){return podfile;}var defaultDeploymentTarget=expoMajor>=56?'16.4':'15.1';var hook=`
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.modifyPodfile=modifyPodfile;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _SourceModificationError=require("../errors/SourceModificationError");var _logging=require("../logging");var _engine=require("../template/engine");var MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION=56;var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START='# >>> react-native-brownfield Expo SDK 55+ swift defines >>>';var BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END='# <<< react-native-brownfield Expo SDK 55+ swift defines <<<';function ensureExpoDefinesForSDK55AndAbove(podfile,expoMajor){if(podfile.includes(BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START)){return podfile;}var defaultDeploymentTarget=expoMajor>=56?'16.4':'15.1';var hook=`
|
|
2
2
|
${BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START}
|
|
3
3
|
brownfield_ios_deployment_target = podfile_properties['ios.deploymentTarget'] || '${defaultDeploymentTarget}'
|
|
4
4
|
installer.pods_project.targets.each do |target|
|
|
@@ -14,5 +14,5 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
14
14
|
end
|
|
15
15
|
end
|
|
16
16
|
${BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END}
|
|
17
|
-
`;var postInstallMatch=podfile.match(/(post_install\s+do\s+\|installer\|\s*\n)((?:(?!^\s*end\s*$)[\s\S])*)(^\s*end\s*$)/m);if(postInstallMatch){var _postInstallMatch=(0,_slicedToArray2.default)(postInstallMatch,4),whole=_postInstallMatch[0],start=_postInstallMatch[1],content=_postInstallMatch[2],end=_postInstallMatch[3];var updated=`${start}${content.trimEnd()}\n${hook}\n${end}`;return podfile.replace(whole,updated);}return`${podfile.trimEnd()}\n\npost_install do |installer|\n${hook}\nend\n`;}function modifyPodfile(podfile,frameworkName,expoMajor){if(podfile.includes(`target '${frameworkName}'`)){_logging.Logger.logDebug(`Framework target "${frameworkName}" already in Podfile, skipping modification`);return podfile;}_logging.Logger.logDebug(`Modifying Podfile for framework: ${frameworkName}`);var frameworkTargetBlock=(0,_engine.renderTemplate)('ios','PodfileTargetBlock.rb',{'{{FRAMEWORK_NAME}}':frameworkName});var mainTargetMatch=podfile.match(/(target\s+['"][^'"]+['"]\s+do\s*\n)([\s\S]*?)(^end\s*$)/m);if(!mainTargetMatch){throw new _SourceModificationError.SourceModificationError('Could not find main target in Podfile. Please manually add the framework target.');}var _mainTargetMatch=(0,_slicedToArray2.default)(mainTargetMatch,3),targetStart=_mainTargetMatch[1],targetContent=_mainTargetMatch[2];var insertIndex=podfile.indexOf(mainTargetMatch[0])+targetStart.length+targetContent.length;var modifiedPodfile=podfile.slice(0,insertIndex)+frameworkTargetBlock+podfile.slice(insertIndex);_logging.Logger.logDebug(`Added framework target "${frameworkName}" to Podfile`);if(expoMajor<
|
|
17
|
+
`;var postInstallMatch=podfile.match(/(post_install\s+do\s+\|installer\|\s*\n)((?:(?!^\s*end\s*$)[\s\S])*)(^\s*end\s*$)/m);if(postInstallMatch){var _postInstallMatch=(0,_slicedToArray2.default)(postInstallMatch,4),whole=_postInstallMatch[0],start=_postInstallMatch[1],content=_postInstallMatch[2],end=_postInstallMatch[3];var updated=`${start}${content.trimEnd()}\n${hook}\n${end}`;return podfile.replace(whole,updated);}return`${podfile.trimEnd()}\n\npost_install do |installer|\n${hook}\nend\n`;}function modifyPodfile(podfile,frameworkName,expoMajor){if(podfile.includes(`target '${frameworkName}'`)){_logging.Logger.logDebug(`Framework target "${frameworkName}" already in Podfile, skipping modification`);return podfile;}_logging.Logger.logDebug(`Modifying Podfile for framework: ${frameworkName}`);var frameworkTargetBlock=(0,_engine.renderTemplate)('ios','PodfileTargetBlock.rb',{'{{FRAMEWORK_NAME}}':frameworkName});var mainTargetMatch=podfile.match(/(target\s+['"][^'"]+['"]\s+do\s*\n)([\s\S]*?)(^end\s*$)/m);if(!mainTargetMatch){throw new _SourceModificationError.SourceModificationError('Could not find main target in Podfile. Please manually add the framework target.');}var _mainTargetMatch=(0,_slicedToArray2.default)(mainTargetMatch,3),targetStart=_mainTargetMatch[1],targetContent=_mainTargetMatch[2];var insertIndex=podfile.indexOf(mainTargetMatch[0])+targetStart.length+targetContent.length;var modifiedPodfile=podfile.slice(0,insertIndex)+frameworkTargetBlock+podfile.slice(insertIndex);_logging.Logger.logDebug(`Added framework target "${frameworkName}" to Podfile`);if(expoMajor<MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION){var versionLabel=expoMajor<0?'unknown':expoMajor.toString();throw new _SourceModificationError.SourceModificationError(`Expo SDK ${versionLabel} is not supported. Please use Expo SDK ${MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION} or newer. For older versions, please see the matrix of supported versions: https://oss.callstack.com/react-native-brownfield/docs/getting-started/introduction#expo-version-compatibility`);}modifiedPodfile=ensureExpoDefinesForSDK55AndAbove(modifiedPodfile,expoMajor);return modifiedPodfile;}
|
|
18
18
|
//# sourceMappingURL=podfileHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_SourceModificationError","require","_logging","_engine","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END","ensureExpoDefinesForSDK55AndAbove","podfile","expoMajor","includes","defaultDeploymentTarget","hook","postInstallMatch","match","_postInstallMatch","_slicedToArray2","default","whole","start","content","end","updated","trimEnd","replace","modifyPodfile","frameworkName","Logger","logDebug","frameworkTargetBlock","renderTemplate","mainTargetMatch","SourceModificationError","_mainTargetMatch","targetStart","targetContent","insertIndex","indexOf","length","modifiedPodfile","slice","versionLabel","toString"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/ios/podfileHelpers.ts"],"mappings":"4QAAA,IAAAA,wBAAA,CAAAC,OAAA,sCACA,IAAAC,QAAA,CAAAD,OAAA,eACA,IAAAE,OAAA,CAAAF,OAAA,uBAEA,GAAM,CAAAG,iDAAiD,CACrD,8DAA8D,CAChE,GAAM,CAAAC,+CAA+C,CACnD,8DAA8D,CAEhE,QAAS,CAAAC,iCAAiCA,CACxCC,OAAe,CACfC,SAAiB,CACT,CACR,GAAID,OAAO,CAACE,QAAQ,CAACL,iDAAiD,CAAC,CAAE,CACvE,MAAO,CAAAG,OAAO,CAChB,CAEA,GAAM,CAAAG,uBAAuB,CAAGF,SAAS,EAAI,EAAE,CAAG,MAAM,CAAG,MAAM,CACjE,GAAM,CAAAG,IAAI,CAAG;AACf,MAAMP,iDAAiD;AACvD,wFAAwFM,uBAAuB;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAML,+CAA+C;AACrD,CAAC,CAEC,GAAM,CAAAO,gBAAgB,CAAGL,OAAO,CAACM,KAAK,CACpC,oFACF,CAAC,CA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,CAAC,CAAC,CAAC,CAAC,CACnCG,WAAW,CAACI,MAAM,CAClBH,aAAa,CAACG,MAAM,CAEtB,GAAI,CAAAC,eAAe,CACjB/B,OAAO,CAACgC,KAAK,CAAC,CAAC,CAAEJ,WAAW,CAAC,CAC7BP,oBAAoB,CACpBrB,OAAO,CAACgC,KAAK,CAACJ,WAAW,CAAC,CAE5BT,eAAM,CAACC,QAAQ,CAAC,2BAA2BF,aAAa,cAAc,CAAC,CAEvE,GAAIjB,SAAS,
|
|
1
|
+
{"version":3,"names":["_SourceModificationError","require","_logging","_engine","MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START","BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END","ensureExpoDefinesForSDK55AndAbove","podfile","expoMajor","includes","defaultDeploymentTarget","hook","postInstallMatch","match","_postInstallMatch","_slicedToArray2","default","whole","start","content","end","updated","trimEnd","replace","modifyPodfile","frameworkName","Logger","logDebug","frameworkTargetBlock","renderTemplate","mainTargetMatch","SourceModificationError","_mainTargetMatch","targetStart","targetContent","insertIndex","indexOf","length","modifiedPodfile","slice","versionLabel","toString"],"sourceRoot":"../../../../src","sources":["expo-config-plugin/ios/podfileHelpers.ts"],"mappings":"4QAAA,IAAAA,wBAAA,CAAAC,OAAA,sCACA,IAAAC,QAAA,CAAAD,OAAA,eACA,IAAAE,OAAA,CAAAF,OAAA,uBAEA,GAAM,CAAAG,oCAAoC,CAAG,EAAE,CAE/C,GAAM,CAAAC,iDAAiD,CACrD,8DAA8D,CAChE,GAAM,CAAAC,+CAA+C,CACnD,8DAA8D,CAEhE,QAAS,CAAAC,iCAAiCA,CACxCC,OAAe,CACfC,SAAiB,CACT,CACR,GAAID,OAAO,CAACE,QAAQ,CAACL,iDAAiD,CAAC,CAAE,CACvE,MAAO,CAAAG,OAAO,CAChB,CAEA,GAAM,CAAAG,uBAAuB,CAAGF,SAAS,EAAI,EAAE,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AAI,CAACiB,eAAe,CAAE,CACpB,KAAM,IAAI,CAAAC,gDAAuB,CAC/B,kFACF,CAAC,CACH,CAEA,IAAAC,gBAAA,IAAAjB,eAAA,CAAAC,OAAA,EAAuCc,eAAe,IAA7CG,WAAW,CAAAD,gBAAA,IAAEE,aAAa,CAAAF,gBAAA,IACnC,GAAM,CAAAG,WAAW,CACf5B,OAAO,CAAC6B,OAAO,CAACN,eAAe,CAAC,CAAC,CAAC,CAAC,CACnCG,WAAW,CAACI,MAAM,CAClBH,aAAa,CAACG,MAAM,CAEtB,GAAI,CAAAC,eAAe,CACjB/B,OAAO,CAACgC,KAAK,CAAC,CAAC,CAAEJ,WAAW,CAAC,CAC7BP,oBAAoB,CACpBrB,OAAO,CAACgC,KAAK,CAACJ,WAAW,CAAC,CAE5BT,eAAM,CAACC,QAAQ,CAAC,2BAA2BF,aAAa,cAAc,CAAC,CAEvE,GAAIjB,SAAS,CAAGL,oCAAoC,CAAE,CACpD,GAAM,CAAAqC,YAAY,CAAGhC,SAAS,CAAG,CAAC,CAAG,SAAS,CAAGA,SAAS,CAACiC,QAAQ,CAAC,CAAC,CACrE,KAAM,IAAI,CAAAV,gDAAuB,CAC/B,YAAYS,YAAY,0CAA0CrC,oCAAoC,4LACxG,CAAC,CACH,CAEAmC,eAAe,CAAGhC,iCAAiC,CACjDgC,eAAe,CACf9B,SACF,CAAC,CAED,MAAO,CAAA8B,eAAe,CACxB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"podfileHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/podfileHelpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"podfileHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/podfileHelpers.ts"],"names":[],"mappings":"AAoDA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,MAAM,CAqDR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"podfileHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/podfileHelpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"podfileHelpers.d.ts","sourceRoot":"","sources":["../../../../../../src/expo-config-plugin/ios/podfileHelpers.ts"],"names":[],"mappings":"AAoDA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,GAChB,MAAM,CAqDR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@callstack/react-native-brownfield",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Michal Chudziak <mike.chudziak@callstack.com>",
|
|
6
6
|
"bin": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@callstack/brownfield-cli": "workspace:^"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@babel/core": "^7.
|
|
95
|
+
"@babel/core": "^7.29.6",
|
|
96
96
|
"@babel/preset-env": "^7.25.3",
|
|
97
97
|
"@babel/runtime": "^7.25.0",
|
|
98
98
|
"@expo/config-plugins": "^56.0.8",
|
|
@@ -2,6 +2,8 @@ import { SourceModificationError } from '../errors/SourceModificationError';
|
|
|
2
2
|
import { Logger } from '../logging';
|
|
3
3
|
import { renderTemplate } from '../template/engine';
|
|
4
4
|
|
|
5
|
+
const MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION = 56;
|
|
6
|
+
|
|
5
7
|
const BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_START =
|
|
6
8
|
'# >>> react-native-brownfield Expo SDK 55+ swift defines >>>';
|
|
7
9
|
const BROWNFIELD_EXPO_GTE_55_SWIFT_DEFINES_MARKER_END =
|
|
@@ -99,10 +101,10 @@ export function modifyPodfile(
|
|
|
99
101
|
|
|
100
102
|
Logger.logDebug(`Added framework target "${frameworkName}" to Podfile`);
|
|
101
103
|
|
|
102
|
-
if (expoMajor <
|
|
104
|
+
if (expoMajor < MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION) {
|
|
103
105
|
const versionLabel = expoMajor < 0 ? 'unknown' : expoMajor.toString();
|
|
104
106
|
throw new SourceModificationError(
|
|
105
|
-
`Expo SDK ${versionLabel} is not supported. Please use Expo SDK
|
|
107
|
+
`Expo SDK ${versionLabel} is not supported. Please use Expo SDK ${MIN_SUPPORTED_EXPO_SDK_MAJOR_VERSION} or newer. For older versions, please see the matrix of supported versions: https://oss.callstack.com/react-native-brownfield/docs/getting-started/introduction#expo-version-compatibility`
|
|
106
108
|
);
|
|
107
109
|
}
|
|
108
110
|
|