prettier 1.16.1 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin-prettier.js +680 -489
- package/doc.js +1935 -0
- package/index.js +668 -485
- package/package.json +1 -4
- package/parser-babylon.js +1 -1
- package/parser-flow.js +1 -1
- package/parser-graphql.js +1 -1
- package/parser-html.js +1 -1
- package/parser-typescript.js +1 -1
- package/standalone.js +296 -144
- package/third-party.js +353 -133
package/third-party.js
CHANGED
|
@@ -2,142 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
4
|
|
|
5
|
-
var stream = _interopDefault(require('stream'));
|
|
6
5
|
var os = _interopDefault(require('os'));
|
|
7
6
|
var path = _interopDefault(require('path'));
|
|
8
7
|
var util = _interopDefault(require('util'));
|
|
9
8
|
var module$1 = _interopDefault(require('module'));
|
|
10
9
|
var fs = _interopDefault(require('fs'));
|
|
11
|
-
|
|
12
|
-
function commonjsRequire () {
|
|
13
|
-
throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function createCommonjsModule(fn, module) {
|
|
19
|
-
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
var bufferStream = createCommonjsModule(function (module) {
|
|
23
|
-
'use strict';
|
|
24
|
-
|
|
25
|
-
var PassThrough = stream.PassThrough;
|
|
26
|
-
|
|
27
|
-
module.exports = function (opts) {
|
|
28
|
-
opts = Object.assign({}, opts);
|
|
29
|
-
var array = opts.array;
|
|
30
|
-
var encoding = opts.encoding;
|
|
31
|
-
var buffer = encoding === 'buffer';
|
|
32
|
-
var objectMode = false;
|
|
33
|
-
|
|
34
|
-
if (array) {
|
|
35
|
-
objectMode = !(encoding || buffer);
|
|
36
|
-
} else {
|
|
37
|
-
encoding = encoding || 'utf8';
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (buffer) {
|
|
41
|
-
encoding = null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
var len = 0;
|
|
45
|
-
var ret = [];
|
|
46
|
-
var stream$$1 = new PassThrough({
|
|
47
|
-
objectMode
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
if (encoding) {
|
|
51
|
-
stream$$1.setEncoding(encoding);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
stream$$1.on('data', function (chunk) {
|
|
55
|
-
ret.push(chunk);
|
|
56
|
-
|
|
57
|
-
if (objectMode) {
|
|
58
|
-
len = ret.length;
|
|
59
|
-
} else {
|
|
60
|
-
len += chunk.length;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
stream$$1.getBufferedValue = function () {
|
|
65
|
-
if (array) {
|
|
66
|
-
return ret;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return buffer ? Buffer.concat(ret, len) : ret.join('');
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
stream$$1.getBufferedLength = function () {
|
|
73
|
-
return len;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
return stream$$1;
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
function getStream(inputStream, opts) {
|
|
81
|
-
if (!inputStream) {
|
|
82
|
-
return Promise.reject(new Error('Expected a stream'));
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
opts = Object.assign({
|
|
86
|
-
maxBuffer: Infinity
|
|
87
|
-
}, opts);
|
|
88
|
-
var maxBuffer = opts.maxBuffer;
|
|
89
|
-
var stream$$1;
|
|
90
|
-
var clean;
|
|
91
|
-
var p = new Promise(function (resolve, reject) {
|
|
92
|
-
var error = function error(err) {
|
|
93
|
-
if (err) {
|
|
94
|
-
// null check
|
|
95
|
-
err.bufferedData = stream$$1.getBufferedValue();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
reject(err);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
stream$$1 = bufferStream(opts);
|
|
102
|
-
inputStream.once('error', error);
|
|
103
|
-
inputStream.pipe(stream$$1);
|
|
104
|
-
stream$$1.on('data', function () {
|
|
105
|
-
if (stream$$1.getBufferedLength() > maxBuffer) {
|
|
106
|
-
reject(new Error('maxBuffer exceeded'));
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
stream$$1.once('error', error);
|
|
110
|
-
stream$$1.on('end', resolve);
|
|
111
|
-
|
|
112
|
-
clean = function clean() {
|
|
113
|
-
// some streams doesn't implement the `stream.Readable` interface correctly
|
|
114
|
-
if (inputStream.unpipe) {
|
|
115
|
-
inputStream.unpipe(stream$$1);
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
});
|
|
119
|
-
p.then(clean, clean);
|
|
120
|
-
return p.then(function () {
|
|
121
|
-
return stream$$1.getBufferedValue();
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
var getStream_1 = getStream;
|
|
126
|
-
|
|
127
|
-
var buffer = function buffer(stream$$1, opts) {
|
|
128
|
-
return getStream(stream$$1, Object.assign({}, opts, {
|
|
129
|
-
encoding: 'buffer'
|
|
130
|
-
}));
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
var array = function array(stream$$1, opts) {
|
|
134
|
-
return getStream(stream$$1, Object.assign({}, opts, {
|
|
135
|
-
array: true
|
|
136
|
-
}));
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
getStream_1.buffer = buffer;
|
|
140
|
-
getStream_1.array = array;
|
|
10
|
+
var stream = _interopDefault(require('stream'));
|
|
141
11
|
|
|
142
12
|
function _classCallCheck(instance, Constructor) {
|
|
143
13
|
if (!(instance instanceof Constructor)) {
|
|
@@ -346,6 +216,16 @@ function _optionalCallableProperty(obj, name) {
|
|
|
346
216
|
return value;
|
|
347
217
|
}
|
|
348
218
|
|
|
219
|
+
function commonjsRequire () {
|
|
220
|
+
throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
function createCommonjsModule(fn, module) {
|
|
226
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
227
|
+
}
|
|
228
|
+
|
|
349
229
|
var isArrayish = function isArrayish(obj) {
|
|
350
230
|
if (!obj) {
|
|
351
231
|
return false;
|
|
@@ -5096,11 +4976,351 @@ var findParentDir$1 = createCommonjsModule(function (module, exports) {
|
|
|
5096
4976
|
};
|
|
5097
4977
|
});
|
|
5098
4978
|
|
|
4979
|
+
var bufferStream = createCommonjsModule(function (module) {
|
|
4980
|
+
'use strict';
|
|
4981
|
+
|
|
4982
|
+
var PassThrough = stream.PassThrough;
|
|
4983
|
+
|
|
4984
|
+
module.exports = function (opts) {
|
|
4985
|
+
opts = Object.assign({}, opts);
|
|
4986
|
+
var array = opts.array;
|
|
4987
|
+
var encoding = opts.encoding;
|
|
4988
|
+
var buffer = encoding === 'buffer';
|
|
4989
|
+
var objectMode = false;
|
|
4990
|
+
|
|
4991
|
+
if (array) {
|
|
4992
|
+
objectMode = !(encoding || buffer);
|
|
4993
|
+
} else {
|
|
4994
|
+
encoding = encoding || 'utf8';
|
|
4995
|
+
}
|
|
4996
|
+
|
|
4997
|
+
if (buffer) {
|
|
4998
|
+
encoding = null;
|
|
4999
|
+
}
|
|
5000
|
+
|
|
5001
|
+
var len = 0;
|
|
5002
|
+
var ret = [];
|
|
5003
|
+
var stream$$1 = new PassThrough({
|
|
5004
|
+
objectMode
|
|
5005
|
+
});
|
|
5006
|
+
|
|
5007
|
+
if (encoding) {
|
|
5008
|
+
stream$$1.setEncoding(encoding);
|
|
5009
|
+
}
|
|
5010
|
+
|
|
5011
|
+
stream$$1.on('data', function (chunk) {
|
|
5012
|
+
ret.push(chunk);
|
|
5013
|
+
|
|
5014
|
+
if (objectMode) {
|
|
5015
|
+
len = ret.length;
|
|
5016
|
+
} else {
|
|
5017
|
+
len += chunk.length;
|
|
5018
|
+
}
|
|
5019
|
+
});
|
|
5020
|
+
|
|
5021
|
+
stream$$1.getBufferedValue = function () {
|
|
5022
|
+
if (array) {
|
|
5023
|
+
return ret;
|
|
5024
|
+
}
|
|
5025
|
+
|
|
5026
|
+
return buffer ? Buffer.concat(ret, len) : ret.join('');
|
|
5027
|
+
};
|
|
5028
|
+
|
|
5029
|
+
stream$$1.getBufferedLength = function () {
|
|
5030
|
+
return len;
|
|
5031
|
+
};
|
|
5032
|
+
|
|
5033
|
+
return stream$$1;
|
|
5034
|
+
};
|
|
5035
|
+
});
|
|
5036
|
+
|
|
5037
|
+
function getStream(inputStream, opts) {
|
|
5038
|
+
if (!inputStream) {
|
|
5039
|
+
return Promise.reject(new Error('Expected a stream'));
|
|
5040
|
+
}
|
|
5041
|
+
|
|
5042
|
+
opts = Object.assign({
|
|
5043
|
+
maxBuffer: Infinity
|
|
5044
|
+
}, opts);
|
|
5045
|
+
var maxBuffer = opts.maxBuffer;
|
|
5046
|
+
var stream$$1;
|
|
5047
|
+
var clean;
|
|
5048
|
+
var p = new Promise(function (resolve, reject) {
|
|
5049
|
+
var error = function error(err) {
|
|
5050
|
+
if (err) {
|
|
5051
|
+
// null check
|
|
5052
|
+
err.bufferedData = stream$$1.getBufferedValue();
|
|
5053
|
+
}
|
|
5054
|
+
|
|
5055
|
+
reject(err);
|
|
5056
|
+
};
|
|
5057
|
+
|
|
5058
|
+
stream$$1 = bufferStream(opts);
|
|
5059
|
+
inputStream.once('error', error);
|
|
5060
|
+
inputStream.pipe(stream$$1);
|
|
5061
|
+
stream$$1.on('data', function () {
|
|
5062
|
+
if (stream$$1.getBufferedLength() > maxBuffer) {
|
|
5063
|
+
reject(new Error('maxBuffer exceeded'));
|
|
5064
|
+
}
|
|
5065
|
+
});
|
|
5066
|
+
stream$$1.once('error', error);
|
|
5067
|
+
stream$$1.on('end', resolve);
|
|
5068
|
+
|
|
5069
|
+
clean = function clean() {
|
|
5070
|
+
// some streams doesn't implement the `stream.Readable` interface correctly
|
|
5071
|
+
if (inputStream.unpipe) {
|
|
5072
|
+
inputStream.unpipe(stream$$1);
|
|
5073
|
+
}
|
|
5074
|
+
};
|
|
5075
|
+
});
|
|
5076
|
+
p.then(clean, clean);
|
|
5077
|
+
return p.then(function () {
|
|
5078
|
+
return stream$$1.getBufferedValue();
|
|
5079
|
+
});
|
|
5080
|
+
}
|
|
5081
|
+
|
|
5082
|
+
var getStream_1 = getStream;
|
|
5083
|
+
|
|
5084
|
+
var buffer = function buffer(stream$$1, opts) {
|
|
5085
|
+
return getStream(stream$$1, Object.assign({}, opts, {
|
|
5086
|
+
encoding: 'buffer'
|
|
5087
|
+
}));
|
|
5088
|
+
};
|
|
5089
|
+
|
|
5090
|
+
var array = function array(stream$$1, opts) {
|
|
5091
|
+
return getStream(stream$$1, Object.assign({}, opts, {
|
|
5092
|
+
array: true
|
|
5093
|
+
}));
|
|
5094
|
+
};
|
|
5095
|
+
|
|
5096
|
+
getStream_1.buffer = buffer;
|
|
5097
|
+
getStream_1.array = array;
|
|
5098
|
+
|
|
5099
|
+
var vendors = [{
|
|
5100
|
+
"name": "AppVeyor",
|
|
5101
|
+
"constant": "APPVEYOR",
|
|
5102
|
+
"env": "APPVEYOR",
|
|
5103
|
+
"pr": "APPVEYOR_PULL_REQUEST_NUMBER"
|
|
5104
|
+
}, {
|
|
5105
|
+
"name": "Azure Pipelines",
|
|
5106
|
+
"constant": "AZURE_PIPELINES",
|
|
5107
|
+
"env": "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",
|
|
5108
|
+
"pr": "SYSTEM_PULLREQUEST_PULLREQUESTID"
|
|
5109
|
+
}, {
|
|
5110
|
+
"name": "Bamboo",
|
|
5111
|
+
"constant": "BAMBOO",
|
|
5112
|
+
"env": "bamboo_planKey"
|
|
5113
|
+
}, {
|
|
5114
|
+
"name": "Bitbucket Pipelines",
|
|
5115
|
+
"constant": "BITBUCKET",
|
|
5116
|
+
"env": "BITBUCKET_COMMIT",
|
|
5117
|
+
"pr": "BITBUCKET_PR_ID"
|
|
5118
|
+
}, {
|
|
5119
|
+
"name": "Bitrise",
|
|
5120
|
+
"constant": "BITRISE",
|
|
5121
|
+
"env": "BITRISE_IO",
|
|
5122
|
+
"pr": "BITRISE_PULL_REQUEST"
|
|
5123
|
+
}, {
|
|
5124
|
+
"name": "Buddy",
|
|
5125
|
+
"constant": "BUDDY",
|
|
5126
|
+
"env": "BUDDY_WORKSPACE_ID",
|
|
5127
|
+
"pr": "BUDDY_EXECUTION_PULL_REQUEST_ID"
|
|
5128
|
+
}, {
|
|
5129
|
+
"name": "Buildkite",
|
|
5130
|
+
"constant": "BUILDKITE",
|
|
5131
|
+
"env": "BUILDKITE",
|
|
5132
|
+
"pr": {
|
|
5133
|
+
"env": "BUILDKITE_PULL_REQUEST",
|
|
5134
|
+
"ne": "false"
|
|
5135
|
+
}
|
|
5136
|
+
}, {
|
|
5137
|
+
"name": "CircleCI",
|
|
5138
|
+
"constant": "CIRCLE",
|
|
5139
|
+
"env": "CIRCLECI",
|
|
5140
|
+
"pr": "CIRCLE_PULL_REQUEST"
|
|
5141
|
+
}, {
|
|
5142
|
+
"name": "Cirrus CI",
|
|
5143
|
+
"constant": "CIRRUS",
|
|
5144
|
+
"env": "CIRRUS_CI",
|
|
5145
|
+
"pr": "CIRRUS_PR"
|
|
5146
|
+
}, {
|
|
5147
|
+
"name": "AWS CodeBuild",
|
|
5148
|
+
"constant": "CODEBUILD",
|
|
5149
|
+
"env": "CODEBUILD_BUILD_ARN"
|
|
5150
|
+
}, {
|
|
5151
|
+
"name": "Codeship",
|
|
5152
|
+
"constant": "CODESHIP",
|
|
5153
|
+
"env": {
|
|
5154
|
+
"CI_NAME": "codeship"
|
|
5155
|
+
}
|
|
5156
|
+
}, {
|
|
5157
|
+
"name": "Drone",
|
|
5158
|
+
"constant": "DRONE",
|
|
5159
|
+
"env": "DRONE",
|
|
5160
|
+
"pr": {
|
|
5161
|
+
"DRONE_BUILD_EVENT": "pull_request"
|
|
5162
|
+
}
|
|
5163
|
+
}, {
|
|
5164
|
+
"name": "dsari",
|
|
5165
|
+
"constant": "DSARI",
|
|
5166
|
+
"env": "DSARI"
|
|
5167
|
+
}, {
|
|
5168
|
+
"name": "GitLab CI",
|
|
5169
|
+
"constant": "GITLAB",
|
|
5170
|
+
"env": "GITLAB_CI"
|
|
5171
|
+
}, {
|
|
5172
|
+
"name": "GoCD",
|
|
5173
|
+
"constant": "GOCD",
|
|
5174
|
+
"env": "GO_PIPELINE_LABEL"
|
|
5175
|
+
}, {
|
|
5176
|
+
"name": "Hudson",
|
|
5177
|
+
"constant": "HUDSON",
|
|
5178
|
+
"env": "HUDSON_URL"
|
|
5179
|
+
}, {
|
|
5180
|
+
"name": "Jenkins",
|
|
5181
|
+
"constant": "JENKINS",
|
|
5182
|
+
"env": ["JENKINS_URL", "BUILD_ID"],
|
|
5183
|
+
"pr": {
|
|
5184
|
+
"any": ["ghprbPullId", "CHANGE_ID"]
|
|
5185
|
+
}
|
|
5186
|
+
}, {
|
|
5187
|
+
"name": "Magnum CI",
|
|
5188
|
+
"constant": "MAGNUM",
|
|
5189
|
+
"env": "MAGNUM"
|
|
5190
|
+
}, {
|
|
5191
|
+
"name": "Netlify CI",
|
|
5192
|
+
"constant": "NETLIFY",
|
|
5193
|
+
"env": "NETLIFY_BUILD_BASE",
|
|
5194
|
+
"pr": {
|
|
5195
|
+
"env": "PULL_REQUEST",
|
|
5196
|
+
"ne": "false"
|
|
5197
|
+
}
|
|
5198
|
+
}, {
|
|
5199
|
+
"name": "Sail CI",
|
|
5200
|
+
"constant": "SAIL",
|
|
5201
|
+
"env": "SAILCI",
|
|
5202
|
+
"pr": "SAIL_PULL_REQUEST_NUMBER"
|
|
5203
|
+
}, {
|
|
5204
|
+
"name": "Semaphore",
|
|
5205
|
+
"constant": "SEMAPHORE",
|
|
5206
|
+
"env": "SEMAPHORE",
|
|
5207
|
+
"pr": "PULL_REQUEST_NUMBER"
|
|
5208
|
+
}, {
|
|
5209
|
+
"name": "Shippable",
|
|
5210
|
+
"constant": "SHIPPABLE",
|
|
5211
|
+
"env": "SHIPPABLE",
|
|
5212
|
+
"pr": {
|
|
5213
|
+
"IS_PULL_REQUEST": "true"
|
|
5214
|
+
}
|
|
5215
|
+
}, {
|
|
5216
|
+
"name": "Solano CI",
|
|
5217
|
+
"constant": "SOLANO",
|
|
5218
|
+
"env": "TDDIUM",
|
|
5219
|
+
"pr": "TDDIUM_PR_ID"
|
|
5220
|
+
}, {
|
|
5221
|
+
"name": "Strider CD",
|
|
5222
|
+
"constant": "STRIDER",
|
|
5223
|
+
"env": "STRIDER"
|
|
5224
|
+
}, {
|
|
5225
|
+
"name": "TaskCluster",
|
|
5226
|
+
"constant": "TASKCLUSTER",
|
|
5227
|
+
"env": ["TASK_ID", "RUN_ID"]
|
|
5228
|
+
}, {
|
|
5229
|
+
"name": "TeamCity",
|
|
5230
|
+
"constant": "TEAMCITY",
|
|
5231
|
+
"env": "TEAMCITY_VERSION"
|
|
5232
|
+
}, {
|
|
5233
|
+
"name": "Travis CI",
|
|
5234
|
+
"constant": "TRAVIS",
|
|
5235
|
+
"env": "TRAVIS",
|
|
5236
|
+
"pr": {
|
|
5237
|
+
"env": "TRAVIS_PULL_REQUEST",
|
|
5238
|
+
"ne": "false"
|
|
5239
|
+
}
|
|
5240
|
+
}];
|
|
5241
|
+
|
|
5242
|
+
var vendors$1 = Object.freeze({
|
|
5243
|
+
default: vendors
|
|
5244
|
+
});
|
|
5245
|
+
|
|
5246
|
+
var vendors$2 = ( vendors$1 && vendors ) || vendors$1;
|
|
5247
|
+
|
|
5248
|
+
var ciInfo = createCommonjsModule(function (module, exports) {
|
|
5249
|
+
'use strict';
|
|
5250
|
+
|
|
5251
|
+
var env = process.env; // Used for testing only
|
|
5252
|
+
|
|
5253
|
+
Object.defineProperty(exports, '_vendors', {
|
|
5254
|
+
value: vendors$2.map(function (v) {
|
|
5255
|
+
return v.constant;
|
|
5256
|
+
})
|
|
5257
|
+
});
|
|
5258
|
+
exports.name = null;
|
|
5259
|
+
exports.isPR = null;
|
|
5260
|
+
vendors$2.forEach(function (vendor) {
|
|
5261
|
+
var envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env];
|
|
5262
|
+
var isCI = envs.every(function (obj) {
|
|
5263
|
+
return checkEnv(obj);
|
|
5264
|
+
});
|
|
5265
|
+
exports[vendor.constant] = isCI;
|
|
5266
|
+
|
|
5267
|
+
if (isCI) {
|
|
5268
|
+
exports.name = vendor.name;
|
|
5269
|
+
|
|
5270
|
+
switch (typeof vendor.pr) {
|
|
5271
|
+
case 'string':
|
|
5272
|
+
// "pr": "CIRRUS_PR"
|
|
5273
|
+
exports.isPR = !!env[vendor.pr];
|
|
5274
|
+
break;
|
|
5275
|
+
|
|
5276
|
+
case 'object':
|
|
5277
|
+
if ('env' in vendor.pr) {
|
|
5278
|
+
// "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
|
|
5279
|
+
exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
|
|
5280
|
+
} else if ('any' in vendor.pr) {
|
|
5281
|
+
// "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
|
|
5282
|
+
exports.isPR = vendor.pr.any.some(function (key) {
|
|
5283
|
+
return !!env[key];
|
|
5284
|
+
});
|
|
5285
|
+
} else {
|
|
5286
|
+
// "pr": { "DRONE_BUILD_EVENT": "pull_request" }
|
|
5287
|
+
exports.isPR = checkEnv(vendor.pr);
|
|
5288
|
+
}
|
|
5289
|
+
|
|
5290
|
+
break;
|
|
5291
|
+
|
|
5292
|
+
default:
|
|
5293
|
+
// PR detection not supported for this vendor
|
|
5294
|
+
exports.isPR = null;
|
|
5295
|
+
}
|
|
5296
|
+
}
|
|
5297
|
+
});
|
|
5298
|
+
exports.isCI = !!(env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
|
|
5299
|
+
env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
|
|
5300
|
+
env.BUILD_NUMBER || // Jenkins, TeamCity
|
|
5301
|
+
env.RUN_ID || // TaskCluster, dsari
|
|
5302
|
+
exports.name || false);
|
|
5303
|
+
|
|
5304
|
+
function checkEnv(obj) {
|
|
5305
|
+
if (typeof obj === 'string') return !!env[obj];
|
|
5306
|
+
return Object.keys(obj).every(function (k) {
|
|
5307
|
+
return env[k] === obj[k];
|
|
5308
|
+
});
|
|
5309
|
+
}
|
|
5310
|
+
});
|
|
5311
|
+
|
|
5312
|
+
var isCi = ciInfo.isCI;
|
|
5313
|
+
|
|
5099
5314
|
var findParentDir = findParentDir$1.sync;
|
|
5100
5315
|
var thirdParty = {
|
|
5101
|
-
getStream: getStream_1,
|
|
5102
5316
|
cosmiconfig: dist,
|
|
5103
|
-
findParentDir
|
|
5317
|
+
findParentDir,
|
|
5318
|
+
getStream: getStream_1,
|
|
5319
|
+
isCI:
|
|
5320
|
+
/* istanbul ignore next */
|
|
5321
|
+
function isCI() {
|
|
5322
|
+
return isCi;
|
|
5323
|
+
}
|
|
5104
5324
|
};
|
|
5105
5325
|
|
|
5106
5326
|
module.exports = thirdParty;
|