File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change 48
48
"@commitlint/load" : " ^12.1.1" ,
49
49
"@commitlint/read" : " ^12.1.1" ,
50
50
"@commitlint/types" : " ^12.1.1" ,
51
- "get-stdin" : " 8.0.0" ,
52
51
"lodash" : " ^4.17.19" ,
53
52
"resolve-from" : " 5.0.0" ,
54
53
"resolve-global" : " 1.0.0" ,
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import load from '@commitlint/load';
2
2
import lint from '@commitlint/lint' ;
3
3
import read from '@commitlint/read' ;
4
4
import isFunction from 'lodash/isFunction' ;
5
- import stdin from 'get-stdin' ;
6
5
import resolveFrom from 'resolve-from' ;
7
6
import resolveGlobal from 'resolve-global' ;
8
7
import yargs from 'yargs' ;
@@ -126,6 +125,22 @@ main({edit: false, ...cli.argv}).catch((err) => {
126
125
} , 0 ) ;
127
126
} ) ;
128
127
128
+ async function stdin ( ) {
129
+ let result = '' ;
130
+
131
+ if ( process . stdin . isTTY ) {
132
+ return result ;
133
+ }
134
+
135
+ process . stdin . setEncoding ( 'utf8' ) ;
136
+
137
+ for await ( const chunk of process . stdin ) {
138
+ result += chunk ;
139
+ }
140
+
141
+ return result ;
142
+ }
143
+
129
144
async function main ( options : CliFlags ) {
130
145
const raw = options . _ ;
131
146
const flags = normalizeFlags ( options ) ;
Original file line number Diff line number Diff line change @@ -4991,11 +4991,6 @@ get-port@^5.0.0, get-port@^5.1.1:
4991
4991
resolved "https://registry.npmjs.org/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193"
4992
4992
integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==
4993
4993
4994
- get-stdin@8.0.0 :
4995
- version "8.0.0"
4996
- resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53"
4997
- integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==
4998
-
4999
4994
get-stdin@^4.0.1 :
5000
4995
version "4.0.1"
5001
4996
resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
You can’t perform that action at this time.
0 commit comments