File tree Expand file tree Collapse file tree 13 files changed +20
-17
lines changed Expand file tree Collapse file tree 13 files changed +20
-17
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @unts/patch-package " : patch
3
+ ---
4
+
5
+ chore: migrate ` chalk ` to ` picocolors ` and ` NO_COLOR ` env
Original file line number Diff line number Diff line change 81
81
"dependencies" : {
82
82
"@nolyfill/json-stable-stringify" : " ^1.0.30" ,
83
83
"@yarnpkg/lockfile" : " ^1.1.0" ,
84
- "chalk" : " ^4.1.2" ,
85
84
"ci-info" : " ^3.7.0" ,
86
85
"cross-spawn" : " ^7.0.3" ,
87
86
"find-yarn-workspace-root" : " ^2.0.0" ,
88
87
"fs-extra" : " ^10.0.0" ,
89
88
"klaw-sync" : " ^6.0.0" ,
90
89
"minimist" : " ^1.2.6" ,
91
90
"open" : " ^7.4.2" ,
91
+ "picocolors" : " ^1.1.1" ,
92
92
"semver" : " ^7.5.3" ,
93
93
"slash" : " ^3.0.0" ,
94
94
"tmp" : " ^0.0.33" ,
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -e
3
3
4
- export CI=true
5
-
6
4
yarn clean
7
5
yarn build
8
6
version=$( node -e ' console.log(require("./package.json").version)' )
9
7
yarn version --new-version 0.0.0 --no-git-tag-version --no-commit-hooks
10
8
yarn pack --filename patch-package.test.$( date +%s) .tgz
11
9
yarn version --new-version $version --no-git-tag-version --no-commit-hooks
12
- yarn jest " $@ "
10
+ NO_COLOR=1 yarn jest " $@ "
Original file line number Diff line number Diff line change 1
- import colors from "chalk"
2
1
import { existsSync , writeFileSync } from "fs-extra"
3
2
import { posix } from "path"
3
+ import colors from "picocolors"
4
4
import semver from "semver"
5
5
import { hashFile } from "./hash"
6
6
import { logPatchSequenceError } from "./makePatch"
Original file line number Diff line number Diff line change 1
- import colors from "chalk"
2
1
import open from "open"
2
+ import colors from "picocolors"
3
3
import { stringify } from "querystring"
4
4
import { PackageManager } from "./detectPackageManager"
5
5
import { PackageDetails } from "./PackageDetails"
Original file line number Diff line number Diff line change 1
- import colors from "chalk"
2
1
import findWorkspaceRoot from "find-yarn-workspace-root"
3
2
import fs from "fs-extra"
3
+ import colors from "picocolors"
4
4
import { join } from "./path"
5
5
6
6
export type PackageManager = "yarn" | "npm" | "npm-shrinkwrap"
Original file line number Diff line number Diff line change 1
- import colors from "chalk"
2
1
import { isCI } from "ci-info"
3
2
import minimist from "minimist"
4
3
import { normalize , sep } from "path"
4
+ import colors from "picocolors"
5
5
import slash from "slash"
6
6
import { applyPatchesForApp } from "./applyPatches"
7
7
import { detectPackageManager } from "./detectPackageManager"
Original file line number Diff line number Diff line change 1
- import colors from "chalk"
2
1
import {
3
2
copySync ,
4
3
existsSync ,
9
8
renameSync ,
10
9
writeFileSync ,
11
10
} from "fs-extra"
11
+ import colors from "picocolors"
12
12
import { dirSync } from "tmp"
13
13
import { gzipSync } from "zlib"
14
14
import { applyPatch } from "./applyPatches"
Original file line number Diff line number Diff line change 1
- import colors from "chalk "
1
+ import colors from "picocolors "
2
2
3
3
export const makeRegExp = (
4
4
reString : string ,
Original file line number Diff line number Diff line change 1
- import colors from "chalk"
2
1
import { readFileSync } from "fs-extra"
3
2
import { normalize } from "path"
3
+ import colors from "picocolors"
4
4
import { PackageDetails } from "../PackageDetails"
5
5
import { relative , resolve } from "../path"
6
6
import { parsePatchFile , PatchFilePart } from "./parse"
You can’t perform that action at this time.
0 commit comments