Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@expo/config-plugins

Package Overview
Dependencies
Maintainers
22
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/config-plugins - npm Package Compare versions

Comparing version 6.0.1 to 7.0.0

1

build/android/Package.js

@@ -243,2 +243,3 @@ "use strict";

if (type === 'main') {
// NOTE(EvanBacon): We dropped this file in SDK 48 but other templates may still use it.
filesToUpdate.push(_path().default.join(projectRoot, 'android', 'app', 'BUCK'));

@@ -245,0 +246,0 @@ }

2

build/android/Scheme.js

@@ -41,3 +41,3 @@ "use strict";

// This plugin used to remove the unused schemes but this is unpredictable because other plugins could add schemes.
// The only way to reliably remove schemes from the project is to nuke the file and regenerate the code (`expo prebuild --clean`).
// The only way to reliably remove schemes from the project is to nuke the file and regenerate the code (`npx expo prebuild --clean`).
// Regardless, having extra schemes isn't a fatal issue and therefore a tolerable compromise is to just add new schemes that aren't currently present.

@@ -44,0 +44,0 @@ function setScheme(config, androidManifest) {

@@ -120,3 +120,3 @@ "use strict";

const mainApplication = (0, _Manifest().getMainApplicationOrThrow)(androidManifest);
(0, _Manifest().addMetaDataItemToMainApplication)(mainApplication, Config.ENABLED, String((0, _Updates().getUpdatesEnabled)(config)));
(0, _Manifest().addMetaDataItemToMainApplication)(mainApplication, Config.ENABLED, String((0, _Updates().getUpdatesEnabled)(config, username)));
(0, _Manifest().addMetaDataItemToMainApplication)(mainApplication, Config.CHECK_ON_LAUNCH, (0, _Updates().getUpdatesCheckOnLaunch)(config, expoUpdatesPackageVersion));

@@ -210,3 +210,3 @@ (0, _Manifest().addMetaDataItemToMainApplication)(mainApplication, Config.LAUNCH_WAIT_MS, String((0, _Updates().getUpdatesTimeout)(config)));

function isMainApplicationMetaDataSynced(projectRoot, config, androidManifest, username) {
return (0, _Updates().getUpdateUrl)(config, username) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.UPDATE_URL) && String((0, _Updates().getUpdatesEnabled)(config)) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.ENABLED) && String((0, _Updates().getUpdatesTimeout)(config)) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.LAUNCH_WAIT_MS) && (0, _Updates().getUpdatesCheckOnLaunch)(config) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.CHECK_ON_LAUNCH) && (0, _Updates().getUpdatesCodeSigningCertificate)(projectRoot, config) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.CODE_SIGNING_CERTIFICATE) && (0, _Updates().getUpdatesCodeSigningMetadataStringified)(config) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.CODE_SIGNING_METADATA) && areVersionsSynced(config, androidManifest);
return (0, _Updates().getUpdateUrl)(config, username) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.UPDATE_URL) && String((0, _Updates().getUpdatesEnabled)(config, username)) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.ENABLED) && String((0, _Updates().getUpdatesTimeout)(config)) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.LAUNCH_WAIT_MS) && (0, _Updates().getUpdatesCheckOnLaunch)(config) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.CHECK_ON_LAUNCH) && (0, _Updates().getUpdatesCodeSigningCertificate)(projectRoot, config) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.CODE_SIGNING_CERTIFICATE) && (0, _Updates().getUpdatesCodeSigningMetadataStringified)(config) === (0, _Manifest().getMainApplicationMetaDataValue)(androidManifest, Config.CODE_SIGNING_METADATA) && areVersionsSynced(config, androidManifest);
}

@@ -213,0 +213,0 @@ function areVersionsSynced(config, androidManifest) {

@@ -91,3 +91,3 @@ "use strict";

// There currently exists no mechanism to safely undo this feature besides `expo prebuild --clear`,
// There currently exists no mechanism to safely undo this feature besides `npx expo prebuild --clear`,
// this seems ok though because anyone using `UISupportedInterfaceOrientations~ipad` probably

@@ -94,0 +94,0 @@ // wants them to be defined to this value anyways. This is also the default value used in the Xcode iOS template.

@@ -108,3 +108,3 @@ "use strict";

// Only create a bridging header if the project is using in Objective C (AppDelegate is written in Objc).
const isObjc = (0, _Paths().getAppDelegate)(projectRoot).language === 'objc';
const isObjc = (0, _Paths().getAppDelegate)(projectRoot).language !== 'swift';
return isObjc && !getDesignatedSwiftBridgingHeaderFileReference({

@@ -111,0 +111,0 @@ project

@@ -76,3 +76,3 @@ "use strict";

...expoPlist,
[Config.ENABLED]: (0, _Updates().getUpdatesEnabled)(config),
[Config.ENABLED]: (0, _Updates().getUpdatesEnabled)(config, username),
[Config.CHECK_ON_LAUNCH]: (0, _Updates().getUpdatesCheckOnLaunch)(config, expoUpdatesPackageVersion),

@@ -170,3 +170,3 @@ [Config.LAUNCH_WAIT_MS]: (0, _Updates().getUpdatesTimeout)(config)

function isPlistConfigurationSynced(projectRoot, config, expoPlist, username) {
return (0, _Updates().getUpdateUrl)(config, username) === expoPlist.EXUpdatesURL && (0, _Updates().getUpdatesEnabled)(config) === expoPlist.EXUpdatesEnabled && (0, _Updates().getUpdatesTimeout)(config) === expoPlist.EXUpdatesLaunchWaitMs && (0, _Updates().getUpdatesCheckOnLaunch)(config) === expoPlist.EXUpdatesCheckOnLaunch && (0, _Updates().getUpdatesCodeSigningCertificate)(projectRoot, config) === expoPlist.EXUpdatesCodeSigningCertificate && (0, _Updates().getUpdatesCodeSigningMetadata)(config) === expoPlist.EXUpdatesCodeSigningMetadata && isPlistVersionConfigurationSynced(config, expoPlist);
return (0, _Updates().getUpdateUrl)(config, username) === expoPlist.EXUpdatesURL && (0, _Updates().getUpdatesEnabled)(config, username) === expoPlist.EXUpdatesEnabled && (0, _Updates().getUpdatesTimeout)(config) === expoPlist.EXUpdatesLaunchWaitMs && (0, _Updates().getUpdatesCheckOnLaunch)(config) === expoPlist.EXUpdatesCheckOnLaunch && (0, _Updates().getUpdatesCodeSigningCertificate)(projectRoot, config) === expoPlist.EXUpdatesCodeSigningCertificate && (0, _Updates().getUpdatesCodeSigningMetadata)(config) === expoPlist.EXUpdatesCodeSigningMetadata && isPlistVersionConfigurationSynced(config, expoPlist);
}

@@ -173,0 +173,0 @@ function isPlistVersionConfigurationSynced(config, expoPlist) {

@@ -28,4 +28,5 @@ import { ConfigPlugin, ExportedConfig, ExportedConfigWithProps, ModPlatform } from '../Plugin.types';

export declare function withGeneratedBaseMods<ModName extends string>(config: ExportedConfig, { platform, providers, ...props }: ForwardedBaseModOptions & {
platform: ModPlatform;
/** Officially supports `'ios' | 'android'` (`ModPlatform`). Arbitrary strings are supported for adding out-of-tree platforms. */
platform: ModPlatform & string;
providers: Partial<Record<ModName, BaseModProviderMethods<any, any>>>;
}): ExportedConfig;

@@ -152,4 +152,3 @@ "use strict";

// run the XcodeProject mod second because many plugins attempt to read from it.
'xcodeproj'],
android: ['dangerous']
'xcodeproj']
};

@@ -180,4 +179,5 @@ /**

if (entries.length) {
var _orders$platformName;
// Move dangerous item to the first position if it exists, this ensures that all dangerous code runs first.
entries = sortMods(entries, orders[platformName]);
entries = sortMods(entries, (_orders$platformName = orders[platformName]) !== null && _orders$platformName !== void 0 ? _orders$platformName : ['dangerous']);
debug(`run in order: ${entries.map(([name]) => name).join(', ')}`);

@@ -184,0 +184,0 @@ const platformProjectRoot = _path().default.join(projectRoot, platformName);

import { ExportedConfig, Mod, ModPlatform } from '../Plugin.types';
export type BaseModOptions = {
platform: ModPlatform;
/** Officially supports `'ios' | 'android'` (`ModPlatform`). Arbitrary strings are supported for adding out-of-tree platforms. */
platform: ModPlatform & string;
mod: string;

@@ -5,0 +6,0 @@ isProvider?: boolean;

@@ -21,5 +21,5 @@ import { Android, ExpoConfig, IOS } from '@expo/config-types';

export declare function getSDKVersion(config: Pick<ExpoConfigUpdates, 'sdkVersion'>): string | null;
export declare function getUpdatesEnabled(config: Pick<ExpoConfigUpdates, 'updates'>): boolean;
export declare function getUpdatesEnabled(config: Pick<ExpoConfigUpdates, 'owner' | 'slug' | 'updates'>, username: string | null): boolean;
export declare function getUpdatesTimeout(config: Pick<ExpoConfigUpdates, 'updates'>): number;
export declare function getUpdatesCheckOnLaunch(config: Pick<ExpoConfigUpdates, 'updates'>, expoUpdatesPackageVersion?: string | null): 'NEVER' | 'ERROR_RECOVERY_ONLY' | 'ALWAYS';
export declare function getUpdatesCheckOnLaunch(config: Pick<ExpoConfigUpdates, 'updates'>, expoUpdatesPackageVersion?: string | null): 'NEVER' | 'ERROR_RECOVERY_ONLY' | 'ALWAYS' | 'WIFI_ONLY';
export declare function getUpdatesCodeSigningCertificate(projectRoot: string, config: Pick<ExpoConfigUpdates, 'updates'>): string | undefined;

@@ -26,0 +26,0 @@ export declare function getUpdatesCodeSigningMetadata(config: Pick<ExpoConfigUpdates, 'updates'>): NonNullable<ExpoConfigUpdates['updates']>['codeSigningMetadata'];

@@ -80,8 +80,15 @@ "use strict";

}
function shouldDefaultToClassicUpdates(config) {
var _config$updates;
return !!((_config$updates = config.updates) !== null && _config$updates !== void 0 && _config$updates.useClassicUpdates);
}
function getUpdateUrl(config, username) {
var _config$updates;
if ((_config$updates = config.updates) !== null && _config$updates !== void 0 && _config$updates.url) {
var _config$updates2;
return (_config$updates2 = config.updates) === null || _config$updates2 === void 0 ? void 0 : _config$updates2.url;
var _config$updates2;
if ((_config$updates2 = config.updates) !== null && _config$updates2 !== void 0 && _config$updates2.url) {
var _config$updates3;
return (_config$updates3 = config.updates) === null || _config$updates3 === void 0 ? void 0 : _config$updates3.url;
}
if (!shouldDefaultToClassicUpdates(config)) {
return null;
}
const user = typeof config.owner === 'string' ? config.owner : username;

@@ -178,13 +185,19 @@ if (!user) {

}
function getUpdatesEnabled(config) {
var _config$updates3;
return ((_config$updates3 = config.updates) === null || _config$updates3 === void 0 ? void 0 : _config$updates3.enabled) !== false;
function getUpdatesEnabled(config, username) {
var _config$updates4;
// allow override of enabled property
if (((_config$updates4 = config.updates) === null || _config$updates4 === void 0 ? void 0 : _config$updates4.enabled) !== undefined) {
return config.updates.enabled;
}
// enable if URL is set (which respects shouldDefaultToClassicUpdates)
return getUpdateUrl(config, username) !== null;
}
function getUpdatesTimeout(config) {
var _config$updates$fallb, _config$updates4;
return (_config$updates$fallb = (_config$updates4 = config.updates) === null || _config$updates4 === void 0 ? void 0 : _config$updates4.fallbackToCacheTimeout) !== null && _config$updates$fallb !== void 0 ? _config$updates$fallb : 0;
var _config$updates$fallb, _config$updates5;
return (_config$updates$fallb = (_config$updates5 = config.updates) === null || _config$updates5 === void 0 ? void 0 : _config$updates5.fallbackToCacheTimeout) !== null && _config$updates$fallb !== void 0 ? _config$updates$fallb : 0;
}
function getUpdatesCheckOnLaunch(config, expoUpdatesPackageVersion) {
var _config$updates5, _config$updates6;
if (((_config$updates5 = config.updates) === null || _config$updates5 === void 0 ? void 0 : _config$updates5.checkAutomatically) === 'ON_ERROR_RECOVERY') {
var _config$updates6, _config$updates7, _config$updates8, _config$updates9;
if (((_config$updates6 = config.updates) === null || _config$updates6 === void 0 ? void 0 : _config$updates6.checkAutomatically) === 'ON_ERROR_RECOVERY') {
// native 'ERROR_RECOVERY_ONLY' option was only introduced in 0.11.x

@@ -195,4 +208,8 @@ if (expoUpdatesPackageVersion && _semver().default.gte(expoUpdatesPackageVersion, '0.11.0')) {

return 'NEVER';
} else if (((_config$updates6 = config.updates) === null || _config$updates6 === void 0 ? void 0 : _config$updates6.checkAutomatically) === 'ON_LOAD') {
} else if (((_config$updates7 = config.updates) === null || _config$updates7 === void 0 ? void 0 : _config$updates7.checkAutomatically) === 'ON_LOAD') {
return 'ALWAYS';
} else if (((_config$updates8 = config.updates) === null || _config$updates8 === void 0 ? void 0 : _config$updates8.checkAutomatically) === 'WIFI_ONLY') {
return 'WIFI_ONLY';
} else if (((_config$updates9 = config.updates) === null || _config$updates9 === void 0 ? void 0 : _config$updates9.checkAutomatically) === 'NEVER') {
return 'NEVER';
}

@@ -202,4 +219,4 @@ return 'ALWAYS';

function getUpdatesCodeSigningCertificate(projectRoot, config) {
var _config$updates7;
const codeSigningCertificatePath = (_config$updates7 = config.updates) === null || _config$updates7 === void 0 ? void 0 : _config$updates7.codeSigningCertificate;
var _config$updates10;
const codeSigningCertificatePath = (_config$updates10 = config.updates) === null || _config$updates10 === void 0 ? void 0 : _config$updates10.codeSigningCertificate;
if (!codeSigningCertificatePath) {

@@ -215,4 +232,4 @@ return undefined;

function getUpdatesCodeSigningMetadata(config) {
var _config$updates8;
return (_config$updates8 = config.updates) === null || _config$updates8 === void 0 ? void 0 : _config$updates8.codeSigningMetadata;
var _config$updates11;
return (_config$updates11 = config.updates) === null || _config$updates11 === void 0 ? void 0 : _config$updates11.codeSigningMetadata;
}

@@ -227,4 +244,4 @@ function getUpdatesCodeSigningMetadataStringified(config) {

function getUpdatesRequestHeaders(config) {
var _config$updates9;
return (_config$updates9 = config.updates) === null || _config$updates9 === void 0 ? void 0 : _config$updates9.requestHeaders;
var _config$updates12;
return (_config$updates12 = config.updates) === null || _config$updates12 === void 0 ? void 0 : _config$updates12.requestHeaders;
}

@@ -231,0 +248,0 @@ function getUpdatesRequestHeadersStringified(config) {

@@ -26,2 +26,2 @@ import { ModPlatform } from '../Plugin.types';

export declare function addWarningIOS(property: string, text: string, link?: string): void;
export declare function addWarningForPlatform(platform: ModPlatform, property: string, text: string, link?: string): void;
export declare function addWarningForPlatform(platform: ModPlatform & string, property: string, text: string, link?: string): void;

@@ -15,2 +15,3 @@ export type XMLValue = boolean | number | string | null | XMLArray | XMLObject;

}): Promise<XMLObject>;
export declare function _processAndroidXML(manifest: any): XMLObject;
export declare function parseXMLAsync(contents: string): Promise<XMLObject>;

@@ -17,0 +18,0 @@ export declare function format(manifest: any, { indentLevel, newline }?: {

@@ -6,2 +6,3 @@ "use strict";

});
exports._processAndroidXML = _processAndroidXML;
exports.escapeAndroidString = escapeAndroidString;

@@ -50,3 +51,2 @@ exports.format = format;

async function readXMLAsync(options) {
var _manifest$resources;
let contents = '';

@@ -63,3 +63,6 @@ try {

const manifest = await parser.parseStringPromise(contents || options.fallback || '');
return _processAndroidXML(manifest);
}
function _processAndroidXML(manifest) {
var _manifest$resources;
// For strings.xml

@@ -66,0 +69,0 @@ if (Array.isArray(manifest === null || manifest === void 0 ? void 0 : (_manifest$resources = manifest.resources) === null || _manifest$resources === void 0 ? void 0 : _manifest$resources.string)) {

{
"name": "@expo/config-plugins",
"version": "6.0.1",
"version": "7.0.0",
"description": "A library for Expo config plugins",

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

"dependencies": {
"@expo/config-types": "^48.0.0",
"@expo/config-types": "^49.0.0-alpha.1",
"@expo/json-file": "~8.2.37",

@@ -60,3 +60,3 @@ "@expo/plist": "^0.0.20",

},
"gitHead": "d7ecf4eaf234d2f1100249a2c893a948d47376aa"
"gitHead": "b8be1f6c8dc273698908751db0555049866d899b"
}

@@ -18,5 +18,5 @@ <!-- Title -->

Most basic functionality can be controlled by using the the [static Expo config](https://docs.expo.dev/versions/latest/config/app/), but some features require manipulation of the native project files. To support complex behavior we've created config plugins, and mods (short for modifiers).
Most basic functionality can be controlled by using the [static Expo config](https://docs.expo.dev/versions/latest/config/app/), but some features require manipulation of the native project files. To support complex behavior we've created config plugins, and mods (short for modifiers).
For more info, please refer to the official docs: [Config Plugins](https://docs.expo.dev/guides/config-plugins/).
For more info, please refer to the official Expo docs: [Config Plugins](https://docs.expo.dev/home/config-plugins/introduction/).

@@ -23,0 +23,0 @@ ## Environment Variables

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc