🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@config-plugins/ffmpeg-kit-react-native

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@config-plugins/ffmpeg-kit-react-native - npm Package Compare versions

Comparing version

to
2.0.0

1

build/withIosDeploymentTarget.d.ts

@@ -6,4 +6,3 @@ import { ConfigPlugin, XcodeProject } from "@expo/config-plugins";

export declare const withIosDeploymentTarget: IosDeploymentTargetConfigPlugin;
export declare function updateDeploymentTargetPodfile(contents: string, deploymentTarget: string): string;
export declare function updateDeploymentTargetXcodeProject(project: XcodeProject, deploymentTarget: string): XcodeProject;
export {};

29

build/withIosDeploymentTarget.js

@@ -6,7 +6,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.updateDeploymentTargetXcodeProject = exports.updateDeploymentTargetPodfile = exports.withIosDeploymentTarget = void 0;
exports.updateDeploymentTargetXcodeProject = exports.withIosDeploymentTarget = void 0;
// Copied from https://github.com/expo/expo-cli/blob/main/packages/install-expo-modules/src/plugins/ios/withIosDeploymentTarget.ts
const config_plugins_1 = require("@expo/config-plugins");
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
const semver_1 = __importDefault(require("semver"));

@@ -20,22 +18,11 @@ const withIosDeploymentTarget = (config, props) => {

const withIosDeploymentTargetPodfile = (config, props) => {
return config_plugins_1.withDangerousMod(config, [
"ios",
async (config) => {
const podfile = path_1.default.join(config.modRequest.platformProjectRoot, "Podfile");
let contents = await fs_1.default.promises.readFile(podfile, "utf8");
contents = updateDeploymentTargetPodfile(contents, props.deploymentTarget);
await fs_1.default.promises.writeFile(podfile, contents);
return config;
},
]);
};
function updateDeploymentTargetPodfile(contents, deploymentTarget) {
return contents.replace(/^(\s*platform :ios, ['"])([\d.]+)(['"])/gm, (match, prefix, version, suffix) => {
if (semver_1.default.lt(toSemVer(version), toSemVer(deploymentTarget))) {
return `${prefix}${deploymentTarget}${suffix}`;
return config_plugins_1.withPodfileProperties(config, async (config) => {
const existing = config.modResults["ios.deploymentTarget"];
if (typeof existing !== "string" ||
semver_1.default.lt(toSemVer(existing), toSemVer(props.deploymentTarget))) {
config.modResults["ios.deploymentTarget"] = props.deploymentTarget;
}
return match;
return config;
});
}
exports.updateDeploymentTargetPodfile = updateDeploymentTargetPodfile;
};
const withIosDeploymentTargetXcodeProject = (config, props) => {

@@ -42,0 +29,0 @@ return config_plugins_1.withXcodeProject(config, (config) => {

{
"name": "@config-plugins/ffmpeg-kit-react-native",
"version": "1.0.3",
"version": "2.0.0",
"description": "Config plugin to auto configure FFMPEG on prebuild",

@@ -35,3 +35,3 @@ "main": "build/withFFMPEG.js",

"dependencies": {
"@expo/config-plugins": "^4.1.0",
"@expo/config-plugins": "~4.1.4",
"semver": "^7.3.5"

@@ -38,0 +38,0 @@ },

@@ -7,3 +7,3 @@ # config-plugins/ffmpeg-kit-react-native

> Tested against Expo SDK 44. Most packages worked on iOS. Not all packages have been tested on Android.
> Tested against Expo SDK 45. Most packages worked on iOS. Not all packages have been tested on Android.

@@ -10,0 +10,0 @@ > This package cannot be used in the "Expo Go" app because [it requires custom native code](https://docs.expo.io/workflow/customizing/).