From 2fddc601deef94d219bf4152aaf17688c8b757c9 Mon Sep 17 00:00:00 2001 From: Markus Wolf Date: Fri, 27 Oct 2017 08:56:12 +0200 Subject: [PATCH] refactor: update chalk --- .vscode/tasks.json | 44 ++++++++++++++++++++++--------------------- package-lock.json | 18 ++++++------------ package.json | 4 ++-- src/types.ts | 2 +- tests/parsing-test.ts | 2 +- 5 files changed, 33 insertions(+), 37 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 711fa0f3..8b702b00 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,23 +1,25 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "0.1.0", - "command": "npm", - "isShellCommand": true, - "showOutput": "silent", - "suppressTaskName": true, - "tasks": [ - { - "taskName": "build", - "args": [ - "run", - "build", - "--", - "--watch" - ], - "echoCommand": true, - "isBuildCommand": true, - "isWatching": true - } - ] + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "build:watch", + "group": { + "kind": "build", + "isDefault": true + }, + "isBackground": true, + "presentation": { + "echo": true, + "reveal": "silent", + "focus": false, + "panel": "shared" + }, + "problemMatcher": [ + "$tsc-watch" + ] + } + ] } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f75248f8..a672a252 100644 --- a/package-lock.json +++ b/package-lock.json @@ -103,12 +103,6 @@ } } }, - "@types/chalk": { - "version": "0.4.31", - "resolved": "https://registry.npmjs.org/@types/chalk/-/chalk-0.4.31.tgz", - "integrity": "sha1-ox10JBprHtu5c8822XooloNKUfk=", - "dev": true - }, "@types/diff": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@types/diff/-/diff-3.2.0.tgz", @@ -370,7 +364,7 @@ "babel-core": "6.25.0", "bluebird": "3.5.1", "caching-transform": "1.0.1", - "chalk": "2.1.0", + "chalk": "2.3.0", "chokidar": "1.7.0", "clean-stack": "1.3.0", "clean-yaml-object": "0.1.0", @@ -5210,7 +5204,7 @@ "requires": { "ansi-align": "2.0.0", "camelcase": "4.1.0", - "chalk": "2.1.0", + "chalk": "2.3.0", "cli-boxes": "1.0.0", "string-width": "2.1.1", "term-size": "1.2.0", @@ -5344,9 +5338,9 @@ } }, "chalk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", - "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.0.tgz", + "integrity": "sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==", "requires": { "ansi-styles": "3.2.0", "escape-string-regexp": "1.0.5", @@ -12765,7 +12759,7 @@ "dev": true, "requires": { "boxen": "1.2.2", - "chalk": "2.1.0", + "chalk": "2.3.0", "configstore": "3.1.1", "import-lazy": "2.1.0", "is-installed-globally": "0.1.0", diff --git a/package.json b/package.json index ed9c021e..378f17e0 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "clean": "rimraf dist", "prebuild": "npm run clean", "build": "tsc --sourceMap", + "build:watch": "npm run build -- --watch", "build:inline": "tsc --inlineSourceMap", "pretest": "npm run clean && npm run build:inline", "test": "nyc ava", @@ -38,7 +39,6 @@ "devDependencies": { "@knisterpeter/standard-tslint": "^1.6.0", "@types/babel-generator": "^6.7.14", - "@types/chalk": "^0.4.31", "@types/diff": "^3.2.0", "@types/node": "^8.0.0", "@types/react": "^16.0.0", @@ -63,7 +63,7 @@ "astq": "^2.0.2", "babel-generator": "^6.24.1", "babylon": "7.0.0-beta.9", - "chalk": "2.1.0", + "chalk": "^2.3.0", "dts-dom": "^0.1.20", "get-stdin": "^5.0.1", "meow": "^3.7.0", diff --git a/src/types.ts b/src/types.ts index 6f2d6dba..e7825a00 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,5 @@ import astToCode from 'babel-generator'; -import * as chalk from 'chalk'; +import chalk from 'chalk'; import * as dom from 'dts-dom'; import { IOptions } from './index'; import { propTypeQueryExpression, AstQuery } from './typings'; diff --git a/tests/parsing-test.ts b/tests/parsing-test.ts index 2a1f8a6b..9582f338 100644 --- a/tests/parsing-test.ts +++ b/tests/parsing-test.ts @@ -1,6 +1,6 @@ import test, { TestContext } from 'ava'; -import * as chalk from 'chalk'; +import chalk from 'chalk'; import * as diff from 'diff'; import * as fs from 'fs'; import * as path from 'path';