Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
6 changes: 3 additions & 3 deletions 6 lib/color.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// using chalk as some of our other dependencies are already using it...
// exporting from here so we can easily refactor to a different color library if needed
import * as ansi from "ansi-colors";
import { ColorName, Chalk } from "chalk";
import * as chalk from "chalk";

export type Color = ColorName;
export type Color = typeof chalk.Color;

export function stripColors(formatStr: string) {
return ansi.stripColor(formatStr);
}

export const color = new Chalk();
export const color = chalk;
2 changes: 1 addition & 1 deletion 2 lib/common/file-system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as shelljs from "shelljs";
import { parseJson } from "./helpers";
import { PACKAGE_JSON_FILE_NAME } from "../constants";
import { EOL } from "os";
import { detectNewline } from "detect-newline";
import * as detectNewline from "detect-newline";
import { IFileSystem, IReadFileOptions, IFsStats } from "./declarations";
import { IInjector } from "./definitions/yok";
import { create as createArchiver } from "archiver";
Expand Down
4 changes: 2 additions & 2 deletions 4 lib/common/opener.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import open from "open";
import * as xopen from "open";
import { IOpener } from "../declarations";
import { injector } from "./yok";

export class Opener implements IOpener {
public open(target: string, appname?: string): any {
return open(target, {
return xopen(target, {
app: {
name: appname,
},
Expand Down
19 changes: 11 additions & 8 deletions 19 lib/common/verify-node-version.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This function must be separate to avoid dependencies on C++ modules - it must execute precisely when other functions cannot

import { color } from "../color";
import { ISystemWarning } from "./declarations";

// Use only ES5 code here - pure JavaScript can be executed with any Node.js version (even 0.10, 0.12).
Expand All @@ -11,7 +12,7 @@ var util = require("util");
// These versions cannot be used with CLI due to bugs in the node itself.
// We are absolutely sure we cannot work with them, so inform the user if he is trying to use any of them and exit the process.
var versionsCausingFailure = ["0.10.34", "4.0.0", "4.2.0", "5.0.0"];
var minimumRequiredVersion = "22.12.0";
var minimumRequiredVersion = "8.0.0";

interface INodeVersionOpts {
supportedVersionsRange: string;
Expand Down Expand Up @@ -45,13 +46,15 @@ export function verifyNodeVersion(): void {
semver.lt(nodeVer, minimumRequiredVersion)
) {
console.error(
util.format(
"%sNode.js '%s' is not supported. To be able to work with %s CLI, install any Node.js version in the following range: %s.%s",
os.EOL,
nodeVer,
cliName,
supportedVersionsRange,
os.EOL,
color.red.bold(
util.format(
"%sNode.js '%s' is not supported. To be able to work with %s CLI, install any Node.js version in the following range: %s.%s",
os.EOL,
nodeVer,
cliName,
supportedVersionsRange,
os.EOL,
),
),
);
process.exit(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Jimp, cssColorToHex, rgbaToInt, JimpInstance } from "jimp";
import Color from "color";
import * as Color from "color";
import { exported } from "../../common/decorators";
import { AssetConstants } from "../../constants";
import {
Expand Down
2 changes: 1 addition & 1 deletion 2 lib/services/terminal-spinner-service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ora from "ora";
import * as ora from "ora";
import { injector } from "../common/yok";
import {
ITerminalSpinner,
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.