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

@expo/config

Package Overview
Dependencies
Maintainers
21
Versions
241
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/config - npm Package Compare versions

Comparing version 3.2.10 to 3.2.11

10

build/Config.d.ts

@@ -1,2 +0,2 @@

import { ConfigFilePaths, ExpRc, ExpoConfig, GetConfigOptions, PackageJSONConfig, ProjectConfig, ProjectTarget, WriteConfigOptions } from './Config.types';
import { AppJSONConfig, ConfigFilePaths, ExpRc, ExpoConfig, GetConfigOptions, PackageJSONConfig, ProjectConfig, ProjectTarget, WriteConfigOptions } from './Config.types';
/**

@@ -57,3 +57,3 @@ * Evaluate the config for an Expo project.

message?: string;
config: ExpoConfig | null;
config: ExpoConfig | AppJSONConfig | null;
}>;

@@ -64,5 +64,5 @@ export declare function writeConfigJsonAsync(projectRoot: string, options: Object): Promise<ProjectConfig>;

}): string;
export declare function getNameFromConfig(exp?: ExpoConfig): {
appName: string;
webName: string;
export declare function getNameFromConfig(exp?: Partial<ExpoConfig> | AppJSONConfig): {
appName?: string;
webName?: string;
};

@@ -69,0 +69,0 @@ export declare function getDefaultTarget(projectRoot: string): ProjectTarget;

@@ -294,30 +294,22 @@ "use strict";

function ensureConfigHasDefaultValues(projectRoot, exp, pkg, skipSDKVersionRequirement = false) {
if (!exp)
exp = {};
if (!exp.name) {
if (typeof pkg.name !== 'string') {
pkg.name = path_1.default.basename(projectRoot);
}
exp.name = pkg.name;
var _a, _b, _c;
// Defaults for package.json fields
const pkgName = typeof pkg.name === 'string' ? pkg.name : path_1.default.basename(projectRoot);
const pkgVersion = typeof pkg.version === 'string' ? pkg.version : '1.0.0';
const pkgWithDefaults = Object.assign(Object.assign({}, pkg), { name: pkgName, version: pkgVersion });
// Defaults for app.json/app.config.js fields
const name = (_a = exp.name) !== null && _a !== void 0 ? _a : pkgName;
const slug = (_b = exp.slug) !== null && _b !== void 0 ? _b : slugify_1.default(name.toLowerCase());
const version = (_c = exp.version) !== null && _c !== void 0 ? _c : pkgVersion;
const nodeModulesPath = exp.nodeModulesPath
? path_1.default.resolve(projectRoot, exp.nodeModulesPath)
: undefined;
let description = exp.description;
if (!description && typeof pkg.description === 'string') {
description = pkg.description;
}
if (!exp.description && typeof pkg.description === 'string') {
exp.description = pkg.description;
}
if (!exp.slug && typeof exp.name === 'string') {
exp.slug = slugify_1.default(exp.name.toLowerCase());
}
if (!exp.version) {
if (typeof pkg.version === 'string') {
exp.version = pkg.version;
}
else {
pkg.version = '1.0.0';
}
exp.version = pkg.version;
}
if (exp.nodeModulesPath) {
exp.nodeModulesPath = path_1.default.resolve(projectRoot, exp.nodeModulesPath);
}
const expWithDefaults = Object.assign(Object.assign({}, exp), { name, slug, version, nodeModulesPath, description });
let sdkVersion;
try {
exp.sdkVersion = Project_1.getExpoSDKVersion(projectRoot, exp);
sdkVersion = Project_1.getExpoSDKVersion(projectRoot, expWithDefaults);
}

@@ -328,6 +320,10 @@ catch (error) {

}
if (!exp.platforms) {
exp.platforms = getSupportedPlatforms(projectRoot, exp);
let platforms = exp.platforms;
if (!platforms) {
platforms = getSupportedPlatforms(projectRoot, expWithDefaults);
}
return { exp, pkg };
return {
exp: Object.assign(Object.assign({}, expWithDefaults), { sdkVersion, platforms }),
pkg: pkgWithDefaults,
};
}

@@ -334,0 +330,0 @@ async function writeConfigJsonAsync(projectRoot, options) {

@@ -661,3 +661,3 @@ export declare type PackageJSONConfig = {

*/
name?: string;
name: string;
/**

@@ -671,3 +671,3 @@ * A short description of what your app is and why it is great.

*/
slug?: string;
slug: string;
/**

@@ -693,7 +693,7 @@ * The background color for your app, behind any of your React views. This is also known as the root view background color. This value should be a 6 character long hex color string, eg: '#000000'. Default is white — '#ffffff'.

*/
version?: string;
version: string;
/**
* Platforms that your project explicitly supports. If not specified, it defaults to `[\"ios\", \"android\"]`.
*/
platforms?: Platform[];
platforms: Platform[];
/**

@@ -700,0 +700,0 @@ * If you would like to share the source code of your app on Github, enter the URL for the repository here and it will be linked to from your Expo project page.

import { InfoPlist } from './IosConfig.types';
import { ExpoConfig } from '../Config.types';
export declare function getScheme(config: ExpoConfig): string | null;
export declare function setScheme(config: ExpoConfig, infoPlist: InfoPlist): InfoPlist;
export declare function getScheme(config: Pick<ExpoConfig, 'scheme'>): string | null;
export declare function setScheme(config: Pick<ExpoConfig, 'scheme'>, infoPlist: InfoPlist): InfoPlist;
export declare function appendScheme(scheme: string | null, infoPlist: InfoPlist): InfoPlist;

@@ -6,0 +6,0 @@ export declare function removeScheme(scheme: string | null, infoPlist: InfoPlist): InfoPlist;

{
"name": "@expo/config",
"version": "3.2.10",
"version": "3.2.11",
"description": "A library for interacting with the app.json",

@@ -5,0 +5,0 @@ "main": "build/index.js",

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