prettier 4.0.0-alpha.5 → 4.0.0-alpha.7
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/LICENSE +39 -118
- package/index.cjs +1 -1
- package/index.mjs +1 -1
- package/internal/cli.mjs +50 -182
- package/package.json +2 -2
- package/plugins/estree.js +26 -25
- package/plugins/estree.mjs +26 -25
- package/plugins/flow.js +1 -1
- package/plugins/flow.mjs +1 -1
- package/plugins/html.js +15 -15
- package/plugins/html.mjs +15 -15
- package/plugins/postcss.js +35 -38
- package/plugins/postcss.mjs +35 -38
- package/plugins/typescript.js +3 -3
- package/plugins/typescript.mjs +3 -3
- package/standalone.js +1 -1
- package/standalone.mjs +1 -1
package/LICENSE
CHANGED
|
@@ -128,7 +128,7 @@ Author: The Babel Team (https://babel.dev/team)
|
|
|
128
128
|
|
|
129
129
|
----------------------------------------
|
|
130
130
|
|
|
131
|
-
### @babel/parser@v7.23.
|
|
131
|
+
### @babel/parser@v7.23.6
|
|
132
132
|
|
|
133
133
|
> A JavaScript parser
|
|
134
134
|
|
|
@@ -615,7 +615,7 @@ Author: Ika <ikatyang@gmail.com> (https://github.com/ikatyang)
|
|
|
615
615
|
|
|
616
616
|
----------------------------------------
|
|
617
617
|
|
|
618
|
-
### angular-html-parser@v5.0
|
|
618
|
+
### angular-html-parser@v5.2.0
|
|
619
619
|
|
|
620
620
|
> A HTML parser extracted from Angular with some modifications
|
|
621
621
|
|
|
@@ -623,26 +623,26 @@ License: MIT
|
|
|
623
623
|
Homepage: <https://github.com/prettier/angular-html-parser/blob/master/packages/angular-html-parser#readme>
|
|
624
624
|
Author: Ika <ikatyang@gmail.com> (https://github.com/ikatyang)
|
|
625
625
|
|
|
626
|
-
> MIT License
|
|
627
|
-
>
|
|
628
|
-
> Copyright (c) Ika <ikatyang@gmail.com> (https://github.com/ikatyang)
|
|
629
|
-
>
|
|
630
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
631
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
632
|
-
> in the Software without restriction, including without limitation the rights
|
|
633
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
634
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
635
|
-
> furnished to do so, subject to the following conditions:
|
|
636
|
-
>
|
|
637
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
638
|
-
> copies or substantial portions of the Software.
|
|
639
|
-
>
|
|
640
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
641
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
642
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
643
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
644
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
645
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
626
|
+
> MIT License
|
|
627
|
+
>
|
|
628
|
+
> Copyright (c) Ika <ikatyang@gmail.com> (https://github.com/ikatyang)
|
|
629
|
+
>
|
|
630
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
631
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
632
|
+
> in the Software without restriction, including without limitation the rights
|
|
633
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
634
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
635
|
+
> furnished to do so, subject to the following conditions:
|
|
636
|
+
>
|
|
637
|
+
> The above copyright notice and this permission notice shall be included in all
|
|
638
|
+
> copies or substantial portions of the Software.
|
|
639
|
+
>
|
|
640
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
641
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
642
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
643
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
644
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
645
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
646
646
|
> SOFTWARE.
|
|
647
647
|
|
|
648
648
|
----------------------------------------
|
|
@@ -1028,52 +1028,6 @@ Author: Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)
|
|
|
1028
1028
|
|
|
1029
1029
|
----------------------------------------
|
|
1030
1030
|
|
|
1031
|
-
### clone@v1.0.4
|
|
1032
|
-
|
|
1033
|
-
> deep cloning of objects and arrays
|
|
1034
|
-
|
|
1035
|
-
License: MIT
|
|
1036
|
-
Repository: <git://github.com/pvorb/node-clone.git>
|
|
1037
|
-
Author: Paul Vorbach <paul@vorba.ch> (http://paul.vorba.ch/)
|
|
1038
|
-
Contributors:
|
|
1039
|
-
- Blake Miner <miner.blake@gmail.com> (http://www.blakeminer.com/)
|
|
1040
|
-
- Tian You <axqd001@gmail.com> (http://blog.axqd.net/)
|
|
1041
|
-
- George Stagas <gstagas@gmail.com> (http://stagas.com/)
|
|
1042
|
-
- Tobiasz Cudnik <tobiasz.cudnik@gmail.com> (https://github.com/TobiaszCudnik)
|
|
1043
|
-
- Pavel Lang <langpavel@phpskelet.org> (https://github.com/langpavel)
|
|
1044
|
-
- Dan MacTough (http://yabfog.com/)
|
|
1045
|
-
- w1nk (https://github.com/w1nk)
|
|
1046
|
-
- Hugh Kennedy (http://twitter.com/hughskennedy)
|
|
1047
|
-
- Dustin Diaz (http://dustindiaz.com)
|
|
1048
|
-
- Ilya Shaisultanov (https://github.com/diversario)
|
|
1049
|
-
- Nathan MacInnes <nathan@macinn.es> (http://macinn.es/)
|
|
1050
|
-
- Benjamin E. Coe <ben@npmjs.com> (https://twitter.com/benjamincoe)
|
|
1051
|
-
- Nathan Zadoks (https://github.com/nathan7)
|
|
1052
|
-
- Róbert Oroszi <robert+gh@oroszi.net> (https://github.com/oroce)
|
|
1053
|
-
- Aurélio A. Heckert (http://softwarelivre.org/aurium)
|
|
1054
|
-
- Guy Ellis (http://www.guyellisrocks.com/)
|
|
1055
|
-
|
|
1056
|
-
> Copyright © 2011-2015 Paul Vorbach <paul@vorba.ch>
|
|
1057
|
-
>
|
|
1058
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
1059
|
-
> this software and associated documentation files (the “Software”), to deal in
|
|
1060
|
-
> the Software without restriction, including without limitation the rights to
|
|
1061
|
-
> use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
1062
|
-
> the Software, and to permit persons to whom the Software is furnished to do so,
|
|
1063
|
-
> subject to the following conditions:
|
|
1064
|
-
>
|
|
1065
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
1066
|
-
> copies or substantial portions of the Software.
|
|
1067
|
-
>
|
|
1068
|
-
> THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1069
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
1070
|
-
> FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
1071
|
-
> COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
1072
|
-
> IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE
|
|
1073
|
-
> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1074
|
-
|
|
1075
|
-
----------------------------------------
|
|
1076
|
-
|
|
1077
1031
|
### collapse-white-space@v1.0.6
|
|
1078
1032
|
|
|
1079
1033
|
> Replace multiple white-space characters with a single space
|
|
@@ -1249,39 +1203,6 @@ Contributors:
|
|
|
1249
1203
|
|
|
1250
1204
|
----------------------------------------
|
|
1251
1205
|
|
|
1252
|
-
### defaults@v1.0.4
|
|
1253
|
-
|
|
1254
|
-
> merge single level defaults over a config object
|
|
1255
|
-
|
|
1256
|
-
License: MIT
|
|
1257
|
-
Repository: <git://github.com/sindresorhus/node-defaults.git>
|
|
1258
|
-
Author: Elijah Insua <tmpvar@gmail.com>
|
|
1259
|
-
|
|
1260
|
-
> The MIT License (MIT)
|
|
1261
|
-
>
|
|
1262
|
-
> Copyright (c) 2022 Sindre Sorhus
|
|
1263
|
-
> Copyright (c) 2015 Elijah Insua
|
|
1264
|
-
>
|
|
1265
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
1266
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
1267
|
-
> in the Software without restriction, including without limitation the rights
|
|
1268
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
1269
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
1270
|
-
> furnished to do so, subject to the following conditions:
|
|
1271
|
-
>
|
|
1272
|
-
> The above copyright notice and this permission notice shall be included in
|
|
1273
|
-
> all copies or substantial portions of the Software.
|
|
1274
|
-
>
|
|
1275
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
1276
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
1277
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
1278
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
1279
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
1280
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1281
|
-
> THE SOFTWARE.
|
|
1282
|
-
|
|
1283
|
-
----------------------------------------
|
|
1284
|
-
|
|
1285
1206
|
### diff@v5.1.0
|
|
1286
1207
|
|
|
1287
1208
|
> A javascript text diff implementation.
|
|
@@ -1800,7 +1721,7 @@ Contributors:
|
|
|
1800
1721
|
|
|
1801
1722
|
----------------------------------------
|
|
1802
1723
|
|
|
1803
|
-
### flow-parser@v0.
|
|
1724
|
+
### flow-parser@v0.224.0
|
|
1804
1725
|
|
|
1805
1726
|
> JavaScript parser written in OCaml. Produces ESTree AST
|
|
1806
1727
|
|
|
@@ -4820,23 +4741,23 @@ Author: Ika <ikatyang@gmail.com> (https://github.com/ikatyang)
|
|
|
4820
4741
|
|
|
4821
4742
|
----------------------------------------
|
|
4822
4743
|
|
|
4823
|
-
### wcwidth@v1.
|
|
4744
|
+
### wcwidth.js@v1.1.2
|
|
4824
4745
|
|
|
4825
|
-
>
|
|
4746
|
+
> a javascript porting of C's wcwidth()
|
|
4826
4747
|
|
|
4827
4748
|
License: MIT
|
|
4828
|
-
Homepage: <
|
|
4829
|
-
Repository: <
|
|
4830
|
-
Author:
|
|
4749
|
+
Homepage: <http://code.woong.org/wcwidth.js>
|
|
4750
|
+
Repository: <https://github.com/mycoboco/wcwidth.js.git>
|
|
4751
|
+
Author: Woong Jun <woong.jun@gmail.com> (http://code.woong.org/)
|
|
4831
4752
|
Contributors:
|
|
4832
|
-
-
|
|
4753
|
+
- Tim Oxley <secoif@gmail.com> (http://campjs.com/)
|
|
4833
4754
|
|
|
4834
|
-
> wcwidth.js:
|
|
4835
|
-
>
|
|
4755
|
+
> wcwidth.js: a javascript portng of C's wcwidth()
|
|
4756
|
+
> ================================================
|
|
4836
4757
|
>
|
|
4837
|
-
> Copyright (C) 2012 by Jun
|
|
4758
|
+
> Copyright (C) 2012-2014 by Woong Jun and Tim Oxley.
|
|
4838
4759
|
>
|
|
4839
|
-
> This package is a
|
|
4760
|
+
> This package is a javascript porting of `wcwidth()` implementation
|
|
4840
4761
|
> [by Markus Kuhn](http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c).
|
|
4841
4762
|
>
|
|
4842
4763
|
> Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
@@ -4854,12 +4775,12 @@ Contributors:
|
|
|
4854
4775
|
> INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
4855
4776
|
> FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
|
|
4856
4777
|
> OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
4857
|
-
> EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
4858
|
-
>
|
|
4859
|
-
>
|
|
4860
|
-
>
|
|
4861
|
-
>
|
|
4862
|
-
>
|
|
4778
|
+
> EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
|
4779
|
+
> OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
4780
|
+
> INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
4781
|
+
> CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
4782
|
+
> IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
|
4783
|
+
> OF SUCH DAMAGE.
|
|
4863
4784
|
|
|
4864
4785
|
----------------------------------------
|
|
4865
4786
|
|
package/index.cjs
CHANGED
|
@@ -585,7 +585,7 @@ var init_public = __esm({
|
|
|
585
585
|
// src/main/version.evaluate.cjs
|
|
586
586
|
var require_version_evaluate = __commonJS({
|
|
587
587
|
"src/main/version.evaluate.cjs"(exports2, module2) {
|
|
588
|
-
module2.exports = "4.0.0-alpha.
|
|
588
|
+
module2.exports = "4.0.0-alpha.7";
|
|
589
589
|
}
|
|
590
590
|
});
|
|
591
591
|
|
package/index.mjs
CHANGED
|
@@ -24497,7 +24497,7 @@ function isNextLineEmpty2(text, startIndex) {
|
|
|
24497
24497
|
import * as doc from "./doc.mjs";
|
|
24498
24498
|
|
|
24499
24499
|
// src/main/version.evaluate.cjs
|
|
24500
|
-
var version_evaluate_default = "4.0.0-alpha.
|
|
24500
|
+
var version_evaluate_default = "4.0.0-alpha.7";
|
|
24501
24501
|
|
|
24502
24502
|
// src/index.js
|
|
24503
24503
|
function withPlugins(fn, optionsArgumentIndex = 1) {
|
package/internal/cli.mjs
CHANGED
|
@@ -64,150 +64,9 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
-
// node_modules/
|
|
68
|
-
var require_clone = __commonJS({
|
|
69
|
-
"node_modules/clone/clone.js"(exports, module) {
|
|
70
|
-
var clone = function() {
|
|
71
|
-
"use strict";
|
|
72
|
-
function clone2(parent, circular, depth, prototype) {
|
|
73
|
-
var filter;
|
|
74
|
-
if (typeof circular === "object") {
|
|
75
|
-
depth = circular.depth;
|
|
76
|
-
prototype = circular.prototype;
|
|
77
|
-
filter = circular.filter;
|
|
78
|
-
circular = circular.circular;
|
|
79
|
-
}
|
|
80
|
-
var allParents = [];
|
|
81
|
-
var allChildren = [];
|
|
82
|
-
var useBuffer = typeof Buffer != "undefined";
|
|
83
|
-
if (typeof circular == "undefined")
|
|
84
|
-
circular = true;
|
|
85
|
-
if (typeof depth == "undefined")
|
|
86
|
-
depth = Infinity;
|
|
87
|
-
function _clone(parent2, depth2) {
|
|
88
|
-
if (parent2 === null)
|
|
89
|
-
return null;
|
|
90
|
-
if (depth2 == 0)
|
|
91
|
-
return parent2;
|
|
92
|
-
var child;
|
|
93
|
-
var proto2;
|
|
94
|
-
if (typeof parent2 != "object") {
|
|
95
|
-
return parent2;
|
|
96
|
-
}
|
|
97
|
-
if (clone2.__isArray(parent2)) {
|
|
98
|
-
child = [];
|
|
99
|
-
} else if (clone2.__isRegExp(parent2)) {
|
|
100
|
-
child = new RegExp(parent2.source, __getRegExpFlags(parent2));
|
|
101
|
-
if (parent2.lastIndex)
|
|
102
|
-
child.lastIndex = parent2.lastIndex;
|
|
103
|
-
} else if (clone2.__isDate(parent2)) {
|
|
104
|
-
child = new Date(parent2.getTime());
|
|
105
|
-
} else if (useBuffer && Buffer.isBuffer(parent2)) {
|
|
106
|
-
if (Buffer.allocUnsafe) {
|
|
107
|
-
child = Buffer.allocUnsafe(parent2.length);
|
|
108
|
-
} else {
|
|
109
|
-
child = new Buffer(parent2.length);
|
|
110
|
-
}
|
|
111
|
-
parent2.copy(child);
|
|
112
|
-
return child;
|
|
113
|
-
} else {
|
|
114
|
-
if (typeof prototype == "undefined") {
|
|
115
|
-
proto2 = Object.getPrototypeOf(parent2);
|
|
116
|
-
child = Object.create(proto2);
|
|
117
|
-
} else {
|
|
118
|
-
child = Object.create(prototype);
|
|
119
|
-
proto2 = prototype;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (circular) {
|
|
123
|
-
var index = allParents.indexOf(parent2);
|
|
124
|
-
if (index != -1) {
|
|
125
|
-
return allChildren[index];
|
|
126
|
-
}
|
|
127
|
-
allParents.push(parent2);
|
|
128
|
-
allChildren.push(child);
|
|
129
|
-
}
|
|
130
|
-
for (var i in parent2) {
|
|
131
|
-
var attrs;
|
|
132
|
-
if (proto2) {
|
|
133
|
-
attrs = Object.getOwnPropertyDescriptor(proto2, i);
|
|
134
|
-
}
|
|
135
|
-
if (attrs && attrs.set == null) {
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
child[i] = _clone(parent2[i], depth2 - 1);
|
|
139
|
-
}
|
|
140
|
-
return child;
|
|
141
|
-
}
|
|
142
|
-
return _clone(parent, depth);
|
|
143
|
-
}
|
|
144
|
-
clone2.clonePrototype = function clonePrototype(parent) {
|
|
145
|
-
if (parent === null)
|
|
146
|
-
return null;
|
|
147
|
-
var c = function() {
|
|
148
|
-
};
|
|
149
|
-
c.prototype = parent;
|
|
150
|
-
return new c();
|
|
151
|
-
};
|
|
152
|
-
function __objToStr(o) {
|
|
153
|
-
return Object.prototype.toString.call(o);
|
|
154
|
-
}
|
|
155
|
-
;
|
|
156
|
-
clone2.__objToStr = __objToStr;
|
|
157
|
-
function __isDate(o) {
|
|
158
|
-
return typeof o === "object" && __objToStr(o) === "[object Date]";
|
|
159
|
-
}
|
|
160
|
-
;
|
|
161
|
-
clone2.__isDate = __isDate;
|
|
162
|
-
function __isArray(o) {
|
|
163
|
-
return typeof o === "object" && __objToStr(o) === "[object Array]";
|
|
164
|
-
}
|
|
165
|
-
;
|
|
166
|
-
clone2.__isArray = __isArray;
|
|
167
|
-
function __isRegExp(o) {
|
|
168
|
-
return typeof o === "object" && __objToStr(o) === "[object RegExp]";
|
|
169
|
-
}
|
|
170
|
-
;
|
|
171
|
-
clone2.__isRegExp = __isRegExp;
|
|
172
|
-
function __getRegExpFlags(re) {
|
|
173
|
-
var flags = "";
|
|
174
|
-
if (re.global)
|
|
175
|
-
flags += "g";
|
|
176
|
-
if (re.ignoreCase)
|
|
177
|
-
flags += "i";
|
|
178
|
-
if (re.multiline)
|
|
179
|
-
flags += "m";
|
|
180
|
-
return flags;
|
|
181
|
-
}
|
|
182
|
-
;
|
|
183
|
-
clone2.__getRegExpFlags = __getRegExpFlags;
|
|
184
|
-
return clone2;
|
|
185
|
-
}();
|
|
186
|
-
if (typeof module === "object" && module.exports) {
|
|
187
|
-
module.exports = clone;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
// node_modules/defaults/index.js
|
|
193
|
-
var require_defaults = __commonJS({
|
|
194
|
-
"node_modules/defaults/index.js"(exports, module) {
|
|
195
|
-
var clone = require_clone();
|
|
196
|
-
module.exports = function(options, defaults) {
|
|
197
|
-
options = options || {};
|
|
198
|
-
Object.keys(defaults).forEach(function(key) {
|
|
199
|
-
if (typeof options[key] === "undefined") {
|
|
200
|
-
options[key] = clone(defaults[key]);
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
return options;
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
// node_modules/wcwidth/combining.js
|
|
67
|
+
// node_modules/wcwidth.js/combining.js
|
|
209
68
|
var require_combining = __commonJS({
|
|
210
|
-
"node_modules/wcwidth/combining.js"(exports, module) {
|
|
69
|
+
"node_modules/wcwidth.js/combining.js"(exports, module) {
|
|
211
70
|
module.exports = [
|
|
212
71
|
[768, 879],
|
|
213
72
|
[1155, 1158],
|
|
@@ -355,36 +214,30 @@ var require_combining = __commonJS({
|
|
|
355
214
|
}
|
|
356
215
|
});
|
|
357
216
|
|
|
358
|
-
// node_modules/wcwidth/index.js
|
|
217
|
+
// node_modules/wcwidth.js/index.js
|
|
359
218
|
var require_wcwidth = __commonJS({
|
|
360
|
-
"node_modules/wcwidth/index.js"(exports, module) {
|
|
361
|
-
"use strict";
|
|
362
|
-
var defaults = require_defaults();
|
|
219
|
+
"node_modules/wcwidth.js/index.js"(exports, module) {
|
|
363
220
|
var combining = require_combining();
|
|
364
221
|
var DEFAULTS = {
|
|
365
222
|
nul: 0,
|
|
366
223
|
control: 0
|
|
367
224
|
};
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
var n = wcwidth2(str.charCodeAt(i), opts);
|
|
383
|
-
if (n < 0)
|
|
384
|
-
return -1;
|
|
385
|
-
s += n;
|
|
225
|
+
function bisearch(ucs) {
|
|
226
|
+
let min = 0;
|
|
227
|
+
let max = combining.length - 1;
|
|
228
|
+
let mid;
|
|
229
|
+
if (ucs < combining[0][0] || ucs > combining[max][1])
|
|
230
|
+
return false;
|
|
231
|
+
while (max >= min) {
|
|
232
|
+
mid = Math.floor((min + max) / 2);
|
|
233
|
+
if (ucs > combining[mid][1])
|
|
234
|
+
min = mid + 1;
|
|
235
|
+
else if (ucs < combining[mid][0])
|
|
236
|
+
max = mid - 1;
|
|
237
|
+
else
|
|
238
|
+
return true;
|
|
386
239
|
}
|
|
387
|
-
return
|
|
240
|
+
return false;
|
|
388
241
|
}
|
|
389
242
|
function wcwidth2(ucs, opts) {
|
|
390
243
|
if (ucs === 0)
|
|
@@ -402,23 +255,38 @@ var require_wcwidth = __commonJS({
|
|
|
402
255
|
ucs >= 65280 && ucs <= 65376 || // Fullwidth Forms
|
|
403
256
|
ucs >= 65504 && ucs <= 65510 || ucs >= 131072 && ucs <= 196605 || ucs >= 196608 && ucs <= 262141));
|
|
404
257
|
}
|
|
405
|
-
function
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
258
|
+
function wcswidth(str, opts) {
|
|
259
|
+
let h;
|
|
260
|
+
let l;
|
|
261
|
+
let s = 0;
|
|
262
|
+
let n;
|
|
263
|
+
if (typeof str !== "string")
|
|
264
|
+
return wcwidth2(str, opts);
|
|
265
|
+
for (let i = 0; i < str.length; i++) {
|
|
266
|
+
h = str.charCodeAt(i);
|
|
267
|
+
if (h >= 55296 && h <= 56319) {
|
|
268
|
+
l = str.charCodeAt(++i);
|
|
269
|
+
if (l >= 56320 && l <= 57343) {
|
|
270
|
+
h = (h - 55296) * 1024 + (l - 56320) + 65536;
|
|
271
|
+
} else {
|
|
272
|
+
i--;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
n = wcwidth2(h, opts);
|
|
276
|
+
if (n < 0)
|
|
277
|
+
return -1;
|
|
278
|
+
s += n;
|
|
419
279
|
}
|
|
420
|
-
return
|
|
280
|
+
return s;
|
|
421
281
|
}
|
|
282
|
+
module.exports = (str) => wcswidth(str, DEFAULTS);
|
|
283
|
+
module.exports.config = (opts = {}) => {
|
|
284
|
+
opts = {
|
|
285
|
+
...DEFAULTS,
|
|
286
|
+
...opts
|
|
287
|
+
};
|
|
288
|
+
return (str) => wcswidth(str, opts);
|
|
289
|
+
};
|
|
422
290
|
}
|
|
423
291
|
});
|
|
424
292
|
|
|
@@ -4710,7 +4578,7 @@ var require_fast_json_stable_stringify = __commonJS({
|
|
|
4710
4578
|
if (typeof opts === "function")
|
|
4711
4579
|
opts = { cmp: opts };
|
|
4712
4580
|
var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false;
|
|
4713
|
-
var cmp = opts.cmp && function(f) {
|
|
4581
|
+
var cmp = opts.cmp && /* @__PURE__ */ function(f) {
|
|
4714
4582
|
return function(node) {
|
|
4715
4583
|
return function(a, b) {
|
|
4716
4584
|
var aobj = { key: a, value: node[a] };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prettier",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.7",
|
|
4
4
|
"description": "Prettier is an opinionated code formatter",
|
|
5
5
|
"bin": "./bin/prettier.cjs",
|
|
6
6
|
"repository": "prettier/prettier",
|
|
@@ -196,6 +196,6 @@
|
|
|
196
196
|
],
|
|
197
197
|
"preferUnplugged": true,
|
|
198
198
|
"dependencies": {
|
|
199
|
-
"@prettier/cli": "^0.2.
|
|
199
|
+
"@prettier/cli": "^0.2.2"
|
|
200
200
|
}
|
|
201
201
|
}
|