Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"access": "public"
},
"dependencies": {
"ora": "^3.4.0"
"ora": "^6.0.0"
},
"files": [
"build",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
AndroidDependencyConfig,
AndroidDependencyParams,
} from './android';
import {Ora} from 'ora';
import type {Ora} from 'ora';

export type Prompt = any;

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"lodash": "^4.17.15",
"minimist": "^1.2.0",
"node-stream-zip": "^1.9.1",
"ora": "^3.4.0",
"ora": "^6.0.0",
"pretty-format": "^26.6.2",
"prompts": "^2.4.0",
"semver": "^6.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/doctor/healthchecks/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import chalk from 'chalk';
import readline from 'readline';
import wcwidth from 'wcwidth';
import stripAnsi from 'strip-ansi';
import {Ora} from 'ora';
import type {Ora} from 'ora';
import {logger} from '@react-native-community/cli-tools';

// Space is necessary to keep correct ordering on screen
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/doctor/healthchecks/iosDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {isSoftwareNotInstalled, PACKAGE_MANAGERS} from '../checkInstallation';
import {packageManager} from './packageManagers';
import {logError, removeMessage} from './common';
import {HealthCheckInterface} from '@react-native-community/cli-types';
import {Ora} from 'ora';
import type {Ora} from 'ora';

const label = 'ios-deploy';

Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/commands/doctor/runAutomaticFix.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import chalk from 'chalk';
import ora, {Ora} from 'ora';
import ora from 'ora';
import type {Ora} from 'ora';
import {logger} from '@react-native-community/cli-tools';
import {HEALTHCHECK_TYPES} from './healthchecks';
import {EnvironmentInfo} from '@react-native-community/cli-types';
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import os from 'os';
import path from 'path';
import fs from 'fs-extra';
import minimist from 'minimist';
import ora from 'ora';
import type {Ora} from 'ora';
import {validateProjectName} from './validate';
import DirectoryAlreadyExistsError from './errors/DirectoryAlreadyExistsError';
import printRunInstructions from './printRunInstructions';
Expand Down Expand Up @@ -156,7 +156,7 @@ async function installDependencies({
}: {
directory: string;
npm?: boolean;
loader: ora.Ora;
loader: Ora;
root: string;
}) {
loader.start('Installing dependencies');
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/tools/brewInstall.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import execa from 'execa';
import ora from 'ora';
import type {Ora} from 'ora';
import {logError} from '../commands/doctor/healthchecks/common';

type InstallArgs = {
pkg: string;
label?: string;
loader: ora.Ora;
loader: Ora;
onSuccess?: () => void;
onFail?: () => void;
};
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/tools/install.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import ora from 'ora';
import type {Ora} from 'ora';
import {brewInstall} from './brewInstall';
import {logManualInstallation} from '../commands/doctor/healthchecks/common';

type InstallArgs = {
pkg: string;
label: string;
url: string;
loader: ora.Ora;
loader: Ora;
};

async function install({pkg, label, url, loader}: InstallArgs) {
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/src/tools/installPods.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'fs';
import execa from 'execa';
import chalk from 'chalk';
import ora from 'ora';
import type {Ora} from 'ora';
import prompts from 'prompts';
import {logger} from '@react-native-community/cli-tools';
import {NoopLoader} from './loader';
Expand All @@ -15,7 +15,7 @@ type PromptCocoaPodsInstallation = {
};

async function runPodInstall(
loader: ora.Ora,
loader: Ora,
directory: string,
shouldHandleRepoUpdate: boolean = true,
) {
Expand Down Expand Up @@ -51,7 +51,7 @@ async function runPodInstall(
}
}

async function runPodUpdate(loader: ora.Ora) {
async function runPodUpdate(loader: Ora) {
try {
loader.start(
`Updating CocoaPods repositories ${chalk.dim(
Expand Down Expand Up @@ -128,7 +128,7 @@ async function installCocoaPodsWithGem() {
}
}

async function installCocoaPods(loader: ora.Ora) {
async function installCocoaPods(loader: Ora) {
loader.stop();

const {installMethod} = await promptCocoaPodsInstallationQuestion();
Expand Down Expand Up @@ -166,7 +166,7 @@ async function installPods({
loader,
}: {
directory: string;
loader?: ora.Ora;
loader?: Ora;
}) {
loader = loader || new NoopLoader();
try {
Expand Down
27 changes: 14 additions & 13 deletions packages/cli/src/tools/loader.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
import ora from 'ora';
import type {Ora, Spinner, Color} from 'ora';
import {logger} from '@react-native-community/cli-tools';

class OraNoop implements ora.Ora {
spinner: ora.Spinner = {interval: 1, frames: []};
class OraNoop implements Ora {
spinner: Spinner = {interval: 1, frames: []};
indent: number = 0;
isSpinning: boolean = false;
text: string = '';
prefixText: string = '';
color: ora.Color = 'blue';
color: Color = 'blue';

succeed(_text?: string | undefined) {
return ora();
return this;
}
fail(_text?: string) {
return ora();
return this;
}
start(_text?: string) {
return ora();
return this;
}
stop() {
return ora();
return this;
}
warn(_text?: string) {
return ora();
return this;
}
info(_text?: string) {
return ora();
return this;
}
stopAndPersist() {
return ora();
return this;
}
clear() {
return ora();
return this;
}
render() {
return ora();
return this;
}
frame() {
return ora();
return this.text;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/platform-ios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"glob": "^7.1.3",
"js-yaml": "^3.13.1",
"lodash": "^4.17.15",
"ora": "^3.4.0",
"ora": "^6.0.0",
"plist": "^3.0.2",
"xcode": "^2.0.0"
},
Expand Down
Loading