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

@expo/xcpretty

Package Overview
Dependencies
Maintainers
24
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/xcpretty - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

29

build/Formatter.d.ts

@@ -70,6 +70,6 @@ import { Failure, Parser } from './Parser';

formatUndefinedSymbols(message: string, symbol: string, reference: string): string;
formatDuplicateSymbols(message: string, filePaths: string[]): string;
formatDuplicateSymbols(message: string, filePaths: string[], isWarning: boolean): string;
/**
* In: `The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'boost-for-react-native' from project 'Pods')`
* Out: ` ⚠️ iOS: Pods/boost-for-react-native@8.0 version mismatch. Expected >= 9.0 < 14.3.99`
* Out: `⚠️ Pods/boost-for-react-native: iOS@8.0 version mismatch. Expected >= 9.0 < 14.3.99`
*

@@ -85,2 +85,27 @@ * @param os iOS

formatVersionMismatchWarning(os: string, deploymentTarget: string, version: string, minVersion: string, maxVersion: string, target: string, project: string): string;
/**
* In: `Skipping duplicate build file in Compile Sources build phase: /Users/evanbacon/Documents/GitHub/expo/ios/Exponent/Kernel/ReactAppManager/EXReactAppManager.mm (in target 'Exponent' from project 'Exponent')`
* Out:
* `⚠️ Skipping duplicate file: Exponent/Kernel/ReactAppManager/EXReactAppManager.mm:
* Remove: Exponent » Exponent » Build Phases » Compile Sources » EXReactAppManager.mm`
*
* @param filePath
* @param buildPhase 'Compile Sources'
* @param target Exponent-watch-app
* @param project Exponent
*/
formatDuplicateFileCompilerWarning(filePath: string, buildPhase: string, target: string, project: string): string;
/**
* In: `The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/evanbacon/Documents/GitHub/expo/ios/Exponent/Supporting/Info.plist'. (in target 'Exponent' from project 'Exponent')`
* Out:
* `⚠️ Target's Info.plist file is incorrectly linked: Exponent/Supporting/Info.plist:
* Remove: Exponent » Exponent » Build Phases » Copy Bundle Resources » Info.plist`
*
* @param filePath
* @param reservedFileDescription 'entitlements'
* @param target Exponent-watch-app
* @param project Exponent
*/
formatReservedFileInCopyBundleResourcesCompilerWarning(filePath: string, reservedFileDescription: string, target: string, project: string): string;
formatMissingFileCompilerWarning(filePath: string): string;
formatGenericWarning(message: string): string;

@@ -87,0 +112,0 @@ formatWarning(message: string): string;

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

const INDENT = ' ';
const BREADCRUMB = '»';
function format(command, argumentText = '', success = true) {
const symbol = statusSymbol(success ? Status.Completion : Status.Fail);
return [chalk_1.default.bold(symbol), command, argumentText].join(' ').trim();
return [symbol, chalk_1.default.bold(command), argumentText].join(' ').trim();
}

@@ -282,11 +283,24 @@ function formatTest(testCase, status) {

formatUndefinedSymbols(message, symbol, reference) {
const results = `\n${chalk_1.default.red(ERROR + ' ' + message)}\n> Symbol: ${symbol}\n> Referenced from: ${reference}\n`;
const symbols = chalk_1.default.gray(`┌─ Symbol: ${symbol}\n└─ Referenced from: ${reference}`);
const results = `${chalk_1.default.red(ERROR + ' ' + message)}\n${symbols}\n`;
this.errors.push(results);
return results;
}
formatDuplicateSymbols(message, filePaths) {
const results = `\n${chalk_1.default.red(ERROR + ' ' + message)}\n> ${filePaths
.map(p => path.basename(p))
.join('\n> ')}\n`;
this.errors.push(results);
formatDuplicateSymbols(message, filePaths, isWarning) {
const formattedMessage = isWarning
? chalk_1.default.yellow(WARNING + ' ' + message)
: chalk_1.default.red(ERROR + ' ' + message);
const symbols = chalk_1.default.gray(filePaths
.map((p, i) => {
const branch = i === filePaths.length - 1 ? '└─' : i === 0 ? '┌─' : '├─';
return `${branch} ${path.basename(p)}`;
})
.join('\n'));
const results = `${formattedMessage}\n${symbols}\n`;
if (isWarning) {
this.warnings.push(results);
}
else {
this.errors.push(results);
}
return results;

@@ -296,3 +310,3 @@ }

* In: `The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.3.99. (in target 'boost-for-react-native' from project 'Pods')`
* Out: ` ⚠️ iOS: Pods/boost-for-react-native@8.0 version mismatch. Expected >= 9.0 < 14.3.99`
* Out: `⚠️ Pods/boost-for-react-native: iOS@8.0 version mismatch. Expected >= 9.0 < 14.3.99`
*

@@ -308,8 +322,47 @@ * @param os iOS

formatVersionMismatchWarning(os, deploymentTarget, version, minVersion, maxVersion, target, project) {
const platform = chalk_1.default.bold(`${os}:`);
const packageName = [project, target].join('/');
const packageNameWithVersion = chalk_1.default.greenBright(packageName) + chalk_1.default.cyan `@` + chalk_1.default.magenta(version);
const platform = chalk_1.default.bold(`${packageName}:`);
const packageNameWithVersion = chalk_1.default.greenBright(os) + chalk_1.default.cyan `@` + chalk_1.default.magenta(version);
const expectedRange = `>= ${minVersion} <= ${maxVersion}`;
return `${WARNING} ${platform} ${packageNameWithVersion} deployment version mismatch, expected ${expectedRange}`;
}
/**
* In: `Skipping duplicate build file in Compile Sources build phase: /Users/evanbacon/Documents/GitHub/expo/ios/Exponent/Kernel/ReactAppManager/EXReactAppManager.mm (in target 'Exponent' from project 'Exponent')`
* Out:
* `⚠️ Skipping duplicate file: Exponent/Kernel/ReactAppManager/EXReactAppManager.mm:
* Remove: Exponent » Exponent » Build Phases » Compile Sources » EXReactAppManager.mm`
*
* @param filePath
* @param buildPhase 'Compile Sources'
* @param target Exponent-watch-app
* @param project Exponent
*/
formatDuplicateFileCompilerWarning(filePath, buildPhase, target, project) {
const message = `${chalk_1.default.yellow `Skipping duplicate file:`} ${relativePath(this.props.projectRoot, filePath)}`;
const fileName = path.basename(filePath);
const crumbs = chalk_1.default.gray('Remove: ' +
['Xcode', project, target, 'Build Phases', buildPhase, fileName].join(` ${BREADCRUMB} `));
return `${WARNING} ${message}\n ${crumbs}\n`;
}
/**
* In: `The Copy Bundle Resources build phase contains this target's Info.plist file '/Users/evanbacon/Documents/GitHub/expo/ios/Exponent/Supporting/Info.plist'. (in target 'Exponent' from project 'Exponent')`
* Out:
* `⚠️ Target's Info.plist file is incorrectly linked: Exponent/Supporting/Info.plist:
* Remove: Exponent » Exponent » Build Phases » Copy Bundle Resources » Info.plist`
*
* @param filePath
* @param reservedFileDescription 'entitlements'
* @param target Exponent-watch-app
* @param project Exponent
*/
formatReservedFileInCopyBundleResourcesCompilerWarning(filePath, reservedFileDescription, target, project) {
const message = `${chalk_1.default.yellow `Target's ${chalk_1.default.bold(reservedFileDescription)} file is incorrectly linked:`} ${relativePath(this.props.projectRoot, filePath)}`;
const fileName = path.basename(filePath);
const crumbs = chalk_1.default.gray('Remove: ' +
['Xcode', project, target, 'Build Phases', 'Copy Bundle Resources', fileName].join(` ${BREADCRUMB} `));
return `${WARNING} ${message}\n ${crumbs}\n`;
}
formatMissingFileCompilerWarning(filePath) {
return `${WARNING} ${chalk_1.default.yellow `No such file or directory:`} ${filePath}`;
}
formatGenericWarning(message) {

@@ -326,2 +379,20 @@ return INDENT + chalk_1.default.yellow(message);

],
[
Matchers_1.Matchers.Warnings.MISSING_FILE_COMPILER_WARNING_MATCHER,
([, $1]) => {
return this.formatMissingFileCompilerWarning($1);
},
],
[
Matchers_1.Matchers.Warnings.SKIPPING_DUPLICATE_FILE,
([, $1, $2, $3, $4]) => {
return this.formatDuplicateFileCompilerWarning($2, $1, $3, $4);
},
],
[
Matchers_1.Matchers.Warnings.TARGETS_FILE_INCLUDED,
([, $1, $2, $3, $4]) => {
return this.formatReservedFileInCopyBundleResourcesCompilerWarning($2, $1, $3, $4);
},
],
[null, () => this.formatGenericWarning(message)],

@@ -328,0 +399,0 @@ ]);

61

build/Matchers.d.ts
export declare const Matchers: {
/**
* @regex Captured groups
* `$1` file_path
* `$2` file_name
* `$1` filePath
* `$2` fileName
*/

@@ -59,4 +59,4 @@ ANALYZE_MATCHER: RegExp;

* @regex Captured groups
* `$1` file_path
* `$2` file_name (e.g. KWNull.m)
* `$1` filePath
* `$2` fileName (e.g. KWNull.m)
*/

@@ -67,3 +67,3 @@ COMPILE_MATCHER: RegExp;

* `$1` compiler_command
* `$2` file_path
* `$2` filePath
*/

@@ -73,4 +73,4 @@ COMPILE_COMMAND_MATCHER: RegExp;

* @regex Captured groups
* `$1` file_path
* `$2` file_name (e.g. MainMenu.xib)
* `$1` filePath
* `$2` fileName (e.g. MainMenu.xib)
*/

@@ -80,4 +80,4 @@ COMPILE_XIB_MATCHER: RegExp;

* @regex Captured groups
* `$1` file_path
* `$2` file_name (e.g. Main.storyboard)
* `$1` filePath
* `$2` fileName (e.g. Main.storyboard)
*/

@@ -182,3 +182,3 @@ COMPILE_STORYBOARD_MATCHER: RegExp;

* @regex Captured groups
* `$1` file_path
* `$1` filePath
*/

@@ -220,3 +220,3 @@ PROCESS_PCH_COMMAND_MATCHER: RegExp;

* @regex Captured groups
* `$1` file_name
* `$1` fileName
*/

@@ -226,4 +226,4 @@ TIFFUTIL_MATCHER: RegExp;

* @regex Captured groups
* `$1` file_path
* `$2` file_name
* `$1` filePath
* `$2` fileName
*/

@@ -233,3 +233,3 @@ TOUCH_MATCHER: RegExp;

* @regex Captured groups
* `$1` file_path
* `$1` filePath
*/

@@ -241,4 +241,4 @@ WRITE_FILE_MATCHER: RegExp;

* @regex Captured groups
* `$1` = file_path
* `$2` = file_name
* `$1` = filePath
* `$2` = fileName
* `$3` = reason

@@ -260,8 +260,29 @@ */

* @regex Captured groups
* `$1` file_path
* `$2` file_name
* `$1` = filePath
*/
MISSING_FILE_COMPILER_WARNING_MATCHER: RegExp;
/**
* @regex Captured groups
* `$1` filePath
* `$2` fileName
*/
VERSION_MISMATCH: RegExp;
/**
* @regex Captured groups
* `$1` buildPhase
* `$2` filePath
* `$3` target
* `$4` project
*/
SKIPPING_DUPLICATE_FILE: RegExp;
/**
* @regex Captured groups
* `$1` reservedFileDescription (Info.plist or entitlements)
* `$2` filePath
* `$3` target
* `$4` project
*/
TARGETS_FILE_INCLUDED: RegExp;
/**
* @regex Captured groups
* `$1` = whole warning

@@ -294,4 +315,4 @@ */

* @regex Captured groups
* `$1` = file_path
* `$2` = file_name
* `$1` = filePath
* `$2` = fileName
* `$3` = reason

@@ -298,0 +319,0 @@ */

@@ -7,4 +7,4 @@ "use strict";

* @regex Captured groups
* `$1` file_path
* `$2` file_name
* `$1` filePath
* `$2` fileName
*/

@@ -63,4 +63,4 @@ ANALYZE_MATCHER: /^Analyze(?:Shallow)?\s(.*\/(.*\.(?:m|mm|cc|cpp|c|cxx)))\s*/m,

* @regex Captured groups
* `$1` file_path
* `$2` file_name (e.g. KWNull.m)
* `$1` filePath
* `$2` fileName (e.g. KWNull.m)
*/

@@ -71,3 +71,3 @@ COMPILE_MATCHER: /^Compile[\w]+\s.+?\s((?:\\.|[^ ])+\/((?:\\.|[^ ])+\.(?:m|mm|c|cc|cpp|cxx|swift)))\s.*/m,

* `$1` compiler_command
* `$2` file_path
* `$2` filePath
*/

@@ -77,4 +77,4 @@ COMPILE_COMMAND_MATCHER: /^\s*(.*clang\s.*\s-c\s(.*\.(?:m|mm|c|cc|cpp|cxx))\s.*\.o)$/m,

* @regex Captured groups
* `$1` file_path
* `$2` file_name (e.g. MainMenu.xib)
* `$1` filePath
* `$2` fileName (e.g. MainMenu.xib)
*/

@@ -84,4 +84,4 @@ COMPILE_XIB_MATCHER: /^CompileXIB\s(.*\/(.*\.xib))/m,

* @regex Captured groups
* `$1` file_path
* `$2` file_name (e.g. Main.storyboard)
* `$1` filePath
* `$2` fileName (e.g. Main.storyboard)
*/

@@ -186,3 +186,3 @@ COMPILE_STORYBOARD_MATCHER: /^CompileStoryboard\s(.*\/([^/].*\.storyboard))/m,

* @regex Captured groups
* `$1` file_path
* `$1` filePath
*/

@@ -224,3 +224,3 @@ PROCESS_PCH_COMMAND_MATCHER: /^\s*.*\/usr\/bin\/clang\s.*\s-c\s(.*)\s-o\s.*/m,

* @regex Captured groups
* `$1` file_name
* `$1` fileName
*/

@@ -230,4 +230,4 @@ TIFFUTIL_MATCHER: /^TiffUtil\s(.*)/m,

* @regex Captured groups
* `$1` file_path
* `$2` file_name
* `$1` filePath
* `$2` fileName
*/

@@ -237,3 +237,3 @@ TOUCH_MATCHER: /^Touch\s(.*\/(.+))/m,

* @regex Captured groups
* `$1` file_path
* `$1` filePath
*/

@@ -245,4 +245,4 @@ WRITE_FILE_MATCHER: /^write-file\s(.*)/m,

* @regex Captured groups
* `$1` = file_path
* `$2` = file_name
* `$1` = filePath
* `$2` = fileName
* `$3` = reason

@@ -264,8 +264,29 @@ */

* @regex Captured groups
* `$1` file_path
* `$2` file_name
* `$1` = filePath
*/
MISSING_FILE_COMPILER_WARNING_MATCHER: /(.*): No such file or directory$/m,
/**
* @regex Captured groups
* `$1` filePath
* `$2` fileName
*/
VERSION_MISMATCH: /^The\s(\w*)\s.*'([^']*)'.*to (\d+\.?\d+\.?\d*),.*(\d+\.?\d+\.?\d*) to (\d+\.?\d+\.?\d*).\s.*target '([^']*)'.*project '([^']*)'/m,
/**
* @regex Captured groups
* `$1` buildPhase
* `$2` filePath
* `$3` target
* `$4` project
*/
SKIPPING_DUPLICATE_FILE: /^Skipping duplicate build file in (Compile Sources) build phase: (.*) \(in\s.*target '([^']*)'.*project '([^']*)'/m,
/**
* @regex Captured groups
* `$1` reservedFileDescription (Info.plist or entitlements)
* `$2` filePath
* `$3` target
* `$4` project
*/
TARGETS_FILE_INCLUDED: /^The Copy Bundle Resources build phase contains this target's (.*) file\s?'(.*)'. \(in\s.*target '([^']*)'.*project '([^']*)'/m,
/**
* @regex Captured groups
* `$1` = whole warning

@@ -298,4 +319,4 @@ */

* @regex Captured groups
* `$1` = file_path
* `$2` = file_name
* `$1` = filePath
* `$2` = fileName
* `$3` = reason

@@ -335,3 +356,3 @@ */

*/
LINKER_DUPLICATE_SYMBOLS_MATCHER: /^(duplicate symbol .*):$/m,
LINKER_DUPLICATE_SYMBOLS_MATCHER: /^((duplicate symbol|ld: warning: duplicate symbol) .*):$/m,
/**

@@ -341,3 +362,3 @@ * @regex Captured groups

*/
LINKER_UNDEFINED_SYMBOL_LOCATION_MATCHER: /^(.* in .*\.(o|o\)))$/m,
LINKER_UNDEFINED_SYMBOL_LOCATION_MATCHER: /^(.* in .*\.o[)]?)$/m,
/**

@@ -344,0 +365,0 @@ * @regex Captured groups

@@ -19,2 +19,3 @@ import { Formatter } from './Formatter';

files: string[];
isWarning?: boolean;
}

@@ -21,0 +22,0 @@ export declare class Parser {

@@ -89,3 +89,12 @@ "use strict";

[Matchers_1.Matchers.GENERATE_DSYM_MATCHER, ([, $1]) => formatter.formatGenerateDsym($1)],
[Matchers_1.Matchers.Warnings.LD_WARNING_MATCHER, ([, $1, $2]) => formatter.formatLdWarning($1 + $2)],
[
Matchers_1.Matchers.Warnings.LD_WARNING_MATCHER,
([, $1, $2]) => {
// Skip printing ld warnings when we're collecting multiline ld duplicate symbol warnings.
if (this.linkerFailure.isWarning) {
return '';
}
return formatter.formatLdWarning($1 + $2);
},
],
[Matchers_1.Matchers.Errors.LD_ERROR_MATCHER, ([, $1]) => formatter.formatError($1)],

@@ -227,2 +236,9 @@ [Matchers_1.Matchers.LIBTOOL_MATCHER, ([, $1]) => formatter.formatLibtool($1)],

this.linkerFailure.message = $1;
// Some linker failures can be warnings...
const messageMatch = this.linkerFailure.message.match(/^(ld: )warning: (.*)/m);
if (messageMatch && messageMatch[2]) {
// Format like: `ld: duplicate symbol` to match other ld warnings.
this.linkerFailure.message = messageMatch[1] + messageMatch[2];
this.linkerFailure.isWarning = true;
}
this.formattingLinkerFailure = true;

@@ -297,3 +313,3 @@ };

formatDuplicateSymbols() {
const result = this.formatter.formatDuplicateSymbols(this.linkerFailure.message, this.linkerFailure.files);
const result = this.formatter.formatDuplicateSymbols(this.linkerFailure.message, this.linkerFailure.files, !!this.linkerFailure.isWarning);
this.resetLinkerFormatState();

@@ -300,0 +316,0 @@ return result;

{
"name": "@expo/xcpretty",
"description": "Parse and format xcodebuild logs",
"version": "1.0.3",
"version": "1.0.4",
"main": "build/index.js",

@@ -6,0 +6,0 @@ "types": "build/index.d.ts",

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