@teambit/prettier 1.0.207 → 1.0.209

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.
@@ -1,4 +1,4 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <testsuites tests="0" failures="0" errors="0" skipped="0">
3
- <testsuite name="teambit.defender/prettier@1.0.207" tests="0" failures="0" errors="0" skipped="0"/>
3
+ <testsuite name="teambit.defender/prettier@1.0.209" tests="0" failures="0" errors="0" skipped="0"/>
4
4
  </testsuites>
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.defender/prettier-preview"]=t():e["teambit.defender/prettier-preview"]=t()}(self,(()=>(()=>{"use strict";var e={57733:(e,t,o)=>{var r={id:"teambit.defender/prettier@1.0.207",homepage:"https://bit.cloud/teambit/defender/prettier",exported:!0};function i(){const e=n(o(41594));return i=function(){return e},e}function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,i.__bit_component=r,n.__bit_component=r;const d=()=>i().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},i().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/brands/logo-prettier.svg"}));d.__bit_component=r,t.Logo=d},41594:e=>{e.exports=React}},t={};function o(r){var i=t[r];if(void 0!==i)return i.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>e,compositions_metadata:()=>i,overview:()=>t});const e=[o(57733)],t=[],i={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["teambit.defender/prettier-preview"]=t():e["teambit.defender/prettier-preview"]=t()}(self,(()=>(()=>{"use strict";var e={74331:(e,t,o)=>{var r={id:"teambit.defender/prettier@1.0.209",homepage:"https://bit.cloud/teambit/defender/prettier",exported:!0};function i(){const e=n(o(41594));return i=function(){return e},e}function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Logo=void 0,i.__bit_component=r,n.__bit_component=r;const d=()=>i().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},i().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/brands/logo-prettier.svg"}));d.__bit_component=r,t.Logo=d},41594:e=>{e.exports=React}},t={};function o(r){var i=t[r];if(void 0!==i)return i.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{o.r(r),o.d(r,{compositions:()=>e,compositions_metadata:()=>i,overview:()=>t});const e=[o(74331)],t=[],i={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),r})()));
@@ -43,7 +43,7 @@
43
43
  "__schema": "ClassSchema",
44
44
  "location": {
45
45
  "filePath": "prettier.main.runtime.ts",
46
- "line": 26,
46
+ "line": 23,
47
47
  "character": 1
48
48
  },
49
49
  "signature": "class PrettierMain",
@@ -53,7 +53,7 @@
53
53
  "__schema": "ConstructorSchema",
54
54
  "location": {
55
55
  "filePath": "prettier.main.runtime.ts",
56
- "line": 27,
56
+ "line": 24,
57
57
  "character": 3
58
58
  },
59
59
  "signature": "constructor PrettierMain(logger: Logger): PrettierMain",
@@ -63,7 +63,7 @@
63
63
  "__schema": "ParameterSchema",
64
64
  "location": {
65
65
  "filePath": "prettier.main.runtime.ts",
66
- "line": 27,
66
+ "line": 24,
67
67
  "character": 15
68
68
  },
69
69
  "name": "logger",
@@ -71,7 +71,7 @@
71
71
  "__schema": "TypeRefSchema",
72
72
  "location": {
73
73
  "filePath": "prettier.main.runtime.ts",
74
- "line": 27,
74
+ "line": 24,
75
75
  "character": 31
76
76
  },
77
77
  "name": "Logger",
@@ -88,7 +88,7 @@
88
88
  "__schema": "ThisTypeSchema",
89
89
  "location": {
90
90
  "filePath": "prettier.main.runtime.ts",
91
- "line": 26,
91
+ "line": 23,
92
92
  "character": 1
93
93
  },
94
94
  "name": "PrettierMain"
@@ -99,14 +99,14 @@
99
99
  "__schema": "FunctionLikeSchema",
100
100
  "location": {
101
101
  "filePath": "prettier.main.runtime.ts",
102
- "line": 33,
102
+ "line": 30,
103
103
  "character": 3
104
104
  },
105
105
  "doc": {
106
106
  "__schema": "DocSchema",
107
107
  "location": {
108
108
  "filePath": "prettier.main.runtime.ts",
109
- "line": 28,
109
+ "line": 25,
110
110
  "character": 3
111
111
  },
112
112
  "raw": "/**\n * create a prettier formatter instance.\n * @param options prettier options.\n * @param PrettierModule reference to an `prettier` module.\n */",
@@ -116,7 +116,7 @@
116
116
  "__schema": "PropertyLikeTagSchema",
117
117
  "location": {
118
118
  "filePath": "prettier.main.runtime.ts",
119
- "line": 30,
119
+ "line": 27,
120
120
  "character": 6
121
121
  },
122
122
  "name": "options",
@@ -127,7 +127,7 @@
127
127
  "__schema": "PropertyLikeTagSchema",
128
128
  "location": {
129
129
  "filePath": "prettier.main.runtime.ts",
130
- "line": 31,
130
+ "line": 28,
131
131
  "character": 6
132
132
  },
133
133
  "name": "PrettierModule",
@@ -143,7 +143,7 @@
143
143
  "__schema": "ParameterSchema",
144
144
  "location": {
145
145
  "filePath": "prettier.main.runtime.ts",
146
- "line": 34,
146
+ "line": 31,
147
147
  "character": 5
148
148
  },
149
149
  "name": "formatterOptions",
@@ -151,7 +151,7 @@
151
151
  "__schema": "TypeRefSchema",
152
152
  "location": {
153
153
  "filePath": "prettier.main.runtime.ts",
154
- "line": 34,
154
+ "line": 31,
155
155
  "character": 23
156
156
  },
157
157
  "name": "FormatterOptions",
@@ -168,7 +168,7 @@
168
168
  "__schema": "ParameterSchema",
169
169
  "location": {
170
170
  "filePath": "prettier.main.runtime.ts",
171
- "line": 35,
171
+ "line": 32,
172
172
  "character": 5
173
173
  },
174
174
  "name": "options",
@@ -176,7 +176,7 @@
176
176
  "__schema": "TypeRefSchema",
177
177
  "location": {
178
178
  "filePath": "prettier.main.runtime.ts",
179
- "line": 35,
179
+ "line": 32,
180
180
  "character": 14
181
181
  },
182
182
  "name": "PrettierOptions"
@@ -188,7 +188,7 @@
188
188
  "__schema": "ParameterSchema",
189
189
  "location": {
190
190
  "filePath": "prettier.main.runtime.ts",
191
- "line": 36,
191
+ "line": 33,
192
192
  "character": 5
193
193
  },
194
194
  "name": "transformers",
@@ -196,17 +196,22 @@
196
196
  "__schema": "TypeArraySchema",
197
197
  "location": {
198
198
  "filePath": "prettier.main.runtime.ts",
199
- "line": 36,
199
+ "line": 33,
200
200
  "character": 19
201
201
  },
202
202
  "type": {
203
203
  "__schema": "TypeRefSchema",
204
204
  "location": {
205
205
  "filePath": "prettier.main.runtime.ts",
206
- "line": 36,
206
+ "line": 33,
207
207
  "character": 19
208
208
  },
209
- "name": "PrettierConfigTransformer"
209
+ "name": "PrettierConfigTransformer",
210
+ "componentId": {
211
+ "scope": "teambit.defender",
212
+ "name": "prettier/config-mutator",
213
+ "version": "0.0.100"
214
+ }
210
215
  }
211
216
  },
212
217
  "isOptional": true,
@@ -217,7 +222,7 @@
217
222
  "__schema": "ParameterSchema",
218
223
  "location": {
219
224
  "filePath": "prettier.main.runtime.ts",
220
- "line": 37,
225
+ "line": 34,
221
226
  "character": 5
222
227
  },
223
228
  "name": "PrettierModule",
@@ -225,7 +230,7 @@
225
230
  "__schema": "KeywordTypeSchema",
226
231
  "location": {
227
232
  "filePath": "prettier.main.runtime.ts",
228
- "line": 37,
233
+ "line": 34,
229
234
  "character": 22
230
235
  },
231
236
  "name": "any"
@@ -238,7 +243,7 @@
238
243
  "__schema": "TypeRefSchema",
239
244
  "location": {
240
245
  "filePath": "prettier.main.runtime.ts",
241
- "line": 33,
246
+ "line": 30,
242
247
  "character": 3
243
248
  },
244
249
  "name": "Formatter",
@@ -253,7 +258,7 @@
253
258
  "__schema": "VariableLikeSchema",
254
259
  "location": {
255
260
  "filePath": "prettier.main.runtime.ts",
256
- "line": 45,
261
+ "line": 42,
257
262
  "character": 3
258
263
  },
259
264
  "signature": "(property) PrettierMain.runtime: RuntimeDefinition",
@@ -262,7 +267,7 @@
262
267
  "__schema": "InferenceTypeSchema",
263
268
  "location": {
264
269
  "filePath": "prettier.main.runtime.ts",
265
- "line": 45,
270
+ "line": 42,
266
271
  "character": 3
267
272
  },
268
273
  "type": "RuntimeDefinition"
@@ -274,7 +279,7 @@
274
279
  "__schema": "VariableLikeSchema",
275
280
  "location": {
276
281
  "filePath": "prettier.main.runtime.ts",
277
- "line": 47,
282
+ "line": 44,
278
283
  "character": 3
279
284
  },
280
285
  "signature": "(property) PrettierMain.dependencies: Aspect[]",
@@ -283,7 +288,7 @@
283
288
  "__schema": "InferenceTypeSchema",
284
289
  "location": {
285
290
  "filePath": "prettier.main.runtime.ts",
286
- "line": 47,
291
+ "line": 44,
287
292
  "character": 3
288
293
  },
289
294
  "type": "Aspect[]"
@@ -295,7 +300,7 @@
295
300
  "__schema": "FunctionLikeSchema",
296
301
  "location": {
297
302
  "filePath": "prettier.main.runtime.ts",
298
- "line": 49,
303
+ "line": 46,
299
304
  "character": 3
300
305
  },
301
306
  "signature": "(method) PrettierMain.provider([loggerExt]: [LoggerMain, FormatterMain, WorkspaceConfigFilesMain]): Promise<PrettierMain>",
@@ -305,7 +310,7 @@
305
310
  "__schema": "ParameterSchema",
306
311
  "location": {
307
312
  "filePath": "prettier.main.runtime.ts",
308
- "line": 49,
313
+ "line": 46,
309
314
  "character": 25
310
315
  },
311
316
  "name": "[ loggerExt ]",
@@ -313,7 +318,7 @@
313
318
  "__schema": "TupleTypeSchema",
314
319
  "location": {
315
320
  "filePath": "prettier.main.runtime.ts",
316
- "line": 49,
321
+ "line": 46,
317
322
  "character": 38
318
323
  },
319
324
  "elements": [
@@ -321,7 +326,7 @@
321
326
  "__schema": "TypeRefSchema",
322
327
  "location": {
323
328
  "filePath": "prettier.main.runtime.ts",
324
- "line": 49,
329
+ "line": 46,
325
330
  "character": 39
326
331
  },
327
332
  "name": "LoggerMain",
@@ -334,7 +339,7 @@
334
339
  "__schema": "TypeRefSchema",
335
340
  "location": {
336
341
  "filePath": "prettier.main.runtime.ts",
337
- "line": 49,
342
+ "line": 46,
338
343
  "character": 51
339
344
  },
340
345
  "name": "FormatterMain",
@@ -347,7 +352,7 @@
347
352
  "__schema": "TypeRefSchema",
348
353
  "location": {
349
354
  "filePath": "prettier.main.runtime.ts",
350
- "line": 49,
355
+ "line": 46,
351
356
  "character": 66
352
357
  },
353
358
  "name": "WorkspaceConfigFilesMain",
@@ -366,7 +371,7 @@
366
371
  "__schema": "TypeRefSchema",
367
372
  "location": {
368
373
  "filePath": "prettier.main.runtime.ts",
369
- "line": 49,
374
+ "line": 46,
370
375
  "character": 94
371
376
  },
372
377
  "name": "Promise",
@@ -375,7 +380,7 @@
375
380
  "__schema": "TypeRefSchema",
376
381
  "location": {
377
382
  "filePath": "prettier.main.runtime.ts",
378
- "line": 49,
383
+ "line": 46,
379
384
  "character": 102
380
385
  },
381
386
  "name": "PrettierMain"
@@ -395,7 +400,7 @@
395
400
  "__schema": "TypeSchema",
396
401
  "location": {
397
402
  "filePath": "prettier.main.runtime.ts",
398
- "line": 10,
403
+ "line": 14,
399
404
  "character": 1
400
405
  },
401
406
  "signature": "type PrettierOptions = {\n config: PrettierModuleOptions;\n}",
@@ -404,7 +409,7 @@
404
409
  "__schema": "TypeLiteralSchema",
405
410
  "location": {
406
411
  "filePath": "prettier.main.runtime.ts",
407
- "line": 10,
412
+ "line": 14,
408
413
  "character": 31
409
414
  },
410
415
  "members": [
@@ -412,14 +417,14 @@
412
417
  "__schema": "VariableLikeSchema",
413
418
  "location": {
414
419
  "filePath": "prettier.main.runtime.ts",
415
- "line": 14,
420
+ "line": 18,
416
421
  "character": 3
417
422
  },
418
423
  "doc": {
419
424
  "__schema": "DocSchema",
420
425
  "location": {
421
426
  "filePath": "prettier.main.runtime.ts",
422
- "line": 11,
427
+ "line": 15,
423
428
  "character": 3
424
429
  },
425
430
  "raw": "/**\n * formatter config for prettier.\n */",
@@ -431,7 +436,7 @@
431
436
  "__schema": "TypeRefSchema",
432
437
  "location": {
433
438
  "filePath": "prettier.main.runtime.ts",
434
- "line": 14,
439
+ "line": 18,
435
440
  "character": 11
436
441
  },
437
442
  "name": "PrettierModuleOptions"
@@ -441,133 +446,11 @@
441
446
  ]
442
447
  }
443
448
  },
444
- {
445
- "__schema": "TypeSchema",
446
- "location": {
447
- "filePath": "prettier.main.runtime.ts",
448
- "line": 21,
449
- "character": 1
450
- },
451
- "signature": "type PrettierConfigTransformer = (config: PrettierConfigMutator, context: PrettierConfigTransformContext) => PrettierConfigMutator",
452
- "name": "PrettierConfigTransformer",
453
- "type": {
454
- "__schema": "FunctionLikeSchema",
455
- "location": {
456
- "filePath": "prettier.main.runtime.ts",
457
- "line": 21,
458
- "character": 41
459
- },
460
- "signature": "(config: \u001b[2m(component: teambit.defender/prettier/config-mutator)\u001b[22m PrettierConfigMutator, context: PrettierConfigTransformContext): \u001b[2m(component: teambit.defender/prettier/config-mutator)\u001b[22m PrettierConfigMutator",
461
- "name": "",
462
- "params": [
463
- {
464
- "__schema": "ParameterSchema",
465
- "location": {
466
- "filePath": "prettier.main.runtime.ts",
467
- "line": 22,
468
- "character": 3
469
- },
470
- "name": "config",
471
- "type": {
472
- "__schema": "TypeRefSchema",
473
- "location": {
474
- "filePath": "prettier.main.runtime.ts",
475
- "line": 22,
476
- "character": 11
477
- },
478
- "name": "PrettierConfigMutator",
479
- "componentId": {
480
- "scope": "teambit.defender",
481
- "name": "prettier/config-mutator",
482
- "version": "0.0.99"
483
- }
484
- },
485
- "isOptional": false,
486
- "isSpread": false
487
- },
488
- {
489
- "__schema": "ParameterSchema",
490
- "location": {
491
- "filePath": "prettier.main.runtime.ts",
492
- "line": 23,
493
- "character": 3
494
- },
495
- "name": "context",
496
- "type": {
497
- "__schema": "TypeRefSchema",
498
- "location": {
499
- "filePath": "prettier.main.runtime.ts",
500
- "line": 23,
501
- "character": 12
502
- },
503
- "name": "PrettierConfigTransformContext"
504
- },
505
- "isOptional": false,
506
- "isSpread": false
507
- }
508
- ],
509
- "returnType": {
510
- "__schema": "TypeRefSchema",
511
- "location": {
512
- "filePath": "prettier.main.runtime.ts",
513
- "line": 24,
514
- "character": 6
515
- },
516
- "name": "PrettierConfigMutator",
517
- "componentId": {
518
- "scope": "teambit.defender",
519
- "name": "prettier/config-mutator",
520
- "version": "0.0.99"
521
- }
522
- },
523
- "modifiers": []
524
- }
525
- },
526
- {
527
- "__schema": "TypeSchema",
528
- "location": {
529
- "filePath": "prettier.main.runtime.ts",
530
- "line": 17,
531
- "character": 1
532
- },
533
- "signature": "type PrettierConfigTransformContext = {\n check: boolean;\n}",
534
- "name": "PrettierConfigTransformContext",
535
- "type": {
536
- "__schema": "TypeLiteralSchema",
537
- "location": {
538
- "filePath": "prettier.main.runtime.ts",
539
- "line": 17,
540
- "character": 46
541
- },
542
- "members": [
543
- {
544
- "__schema": "VariableLikeSchema",
545
- "location": {
546
- "filePath": "prettier.main.runtime.ts",
547
- "line": 18,
548
- "character": 3
549
- },
550
- "signature": "(property) check: boolean",
551
- "name": "check",
552
- "type": {
553
- "__schema": "KeywordTypeSchema",
554
- "location": {
555
- "filePath": "prettier.main.runtime.ts",
556
- "line": 18,
557
- "character": 10
558
- },
559
- "name": "boolean"
560
- },
561
- "isOptional": false
562
- }
563
- ]
564
- }
565
- },
566
449
  {
567
450
  "__schema": "UnImplementedSchema",
568
451
  "location": {
569
452
  "filePath": "index.ts",
570
- "line": 10,
453
+ "line": 5,
571
454
  "character": 16
572
455
  },
573
456
  "name": "PrettierAspect",
@@ -626,7 +509,7 @@
626
509
  "__schema": "TypeSchema",
627
510
  "location": {
628
511
  "filePath": "prettier.main.runtime.ts",
629
- "line": 10,
512
+ "line": 14,
630
513
  "character": 1
631
514
  },
632
515
  "signature": "type PrettierOptions = {\n config: PrettierModuleOptions;\n}",
@@ -635,7 +518,7 @@
635
518
  "__schema": "TypeLiteralSchema",
636
519
  "location": {
637
520
  "filePath": "prettier.main.runtime.ts",
638
- "line": 10,
521
+ "line": 14,
639
522
  "character": 31
640
523
  },
641
524
  "members": [
@@ -643,14 +526,14 @@
643
526
  "__schema": "VariableLikeSchema",
644
527
  "location": {
645
528
  "filePath": "prettier.main.runtime.ts",
646
- "line": 14,
529
+ "line": 18,
647
530
  "character": 3
648
531
  },
649
532
  "doc": {
650
533
  "__schema": "DocSchema",
651
534
  "location": {
652
535
  "filePath": "prettier.main.runtime.ts",
653
- "line": 11,
536
+ "line": 15,
654
537
  "character": 3
655
538
  },
656
539
  "raw": "/**\n * formatter config for prettier.\n */",
@@ -662,7 +545,7 @@
662
545
  "__schema": "TypeRefSchema",
663
546
  "location": {
664
547
  "filePath": "prettier.main.runtime.ts",
665
- "line": 14,
548
+ "line": 18,
666
549
  "character": 11
667
550
  },
668
551
  "name": "PrettierModuleOptions"
@@ -672,133 +555,11 @@
672
555
  ]
673
556
  }
674
557
  },
675
- {
676
- "__schema": "TypeSchema",
677
- "location": {
678
- "filePath": "prettier.main.runtime.ts",
679
- "line": 17,
680
- "character": 1
681
- },
682
- "signature": "type PrettierConfigTransformContext = {\n check: boolean;\n}",
683
- "name": "PrettierConfigTransformContext",
684
- "type": {
685
- "__schema": "TypeLiteralSchema",
686
- "location": {
687
- "filePath": "prettier.main.runtime.ts",
688
- "line": 17,
689
- "character": 46
690
- },
691
- "members": [
692
- {
693
- "__schema": "VariableLikeSchema",
694
- "location": {
695
- "filePath": "prettier.main.runtime.ts",
696
- "line": 18,
697
- "character": 3
698
- },
699
- "signature": "(property) check: boolean",
700
- "name": "check",
701
- "type": {
702
- "__schema": "KeywordTypeSchema",
703
- "location": {
704
- "filePath": "prettier.main.runtime.ts",
705
- "line": 18,
706
- "character": 10
707
- },
708
- "name": "boolean"
709
- },
710
- "isOptional": false
711
- }
712
- ]
713
- }
714
- },
715
- {
716
- "__schema": "TypeSchema",
717
- "location": {
718
- "filePath": "prettier.main.runtime.ts",
719
- "line": 21,
720
- "character": 1
721
- },
722
- "signature": "type PrettierConfigTransformer = (config: PrettierConfigMutator, context: PrettierConfigTransformContext) => PrettierConfigMutator",
723
- "name": "PrettierConfigTransformer",
724
- "type": {
725
- "__schema": "FunctionLikeSchema",
726
- "location": {
727
- "filePath": "prettier.main.runtime.ts",
728
- "line": 21,
729
- "character": 41
730
- },
731
- "signature": "(config: \u001b[2m(component: teambit.defender/prettier/config-mutator)\u001b[22m PrettierConfigMutator, context: PrettierConfigTransformContext): \u001b[2m(component: teambit.defender/prettier/config-mutator)\u001b[22m PrettierConfigMutator",
732
- "name": "",
733
- "params": [
734
- {
735
- "__schema": "ParameterSchema",
736
- "location": {
737
- "filePath": "prettier.main.runtime.ts",
738
- "line": 22,
739
- "character": 3
740
- },
741
- "name": "config",
742
- "type": {
743
- "__schema": "TypeRefSchema",
744
- "location": {
745
- "filePath": "prettier.main.runtime.ts",
746
- "line": 22,
747
- "character": 11
748
- },
749
- "name": "PrettierConfigMutator",
750
- "componentId": {
751
- "scope": "teambit.defender",
752
- "name": "prettier/config-mutator",
753
- "version": "0.0.99"
754
- }
755
- },
756
- "isOptional": false,
757
- "isSpread": false
758
- },
759
- {
760
- "__schema": "ParameterSchema",
761
- "location": {
762
- "filePath": "prettier.main.runtime.ts",
763
- "line": 23,
764
- "character": 3
765
- },
766
- "name": "context",
767
- "type": {
768
- "__schema": "TypeRefSchema",
769
- "location": {
770
- "filePath": "prettier.main.runtime.ts",
771
- "line": 23,
772
- "character": 12
773
- },
774
- "name": "PrettierConfigTransformContext"
775
- },
776
- "isOptional": false,
777
- "isSpread": false
778
- }
779
- ],
780
- "returnType": {
781
- "__schema": "TypeRefSchema",
782
- "location": {
783
- "filePath": "prettier.main.runtime.ts",
784
- "line": 24,
785
- "character": 6
786
- },
787
- "name": "PrettierConfigMutator",
788
- "componentId": {
789
- "scope": "teambit.defender",
790
- "name": "prettier/config-mutator",
791
- "version": "0.0.99"
792
- }
793
- },
794
- "modifiers": []
795
- }
796
- },
797
558
  {
798
559
  "__schema": "ClassSchema",
799
560
  "location": {
800
561
  "filePath": "prettier.main.runtime.ts",
801
- "line": 26,
562
+ "line": 23,
802
563
  "character": 1
803
564
  },
804
565
  "signature": "class PrettierMain",
@@ -808,7 +569,7 @@
808
569
  "__schema": "ConstructorSchema",
809
570
  "location": {
810
571
  "filePath": "prettier.main.runtime.ts",
811
- "line": 27,
572
+ "line": 24,
812
573
  "character": 3
813
574
  },
814
575
  "signature": "constructor PrettierMain(logger: Logger): PrettierMain",
@@ -818,7 +579,7 @@
818
579
  "__schema": "ParameterSchema",
819
580
  "location": {
820
581
  "filePath": "prettier.main.runtime.ts",
821
- "line": 27,
582
+ "line": 24,
822
583
  "character": 15
823
584
  },
824
585
  "name": "logger",
@@ -826,7 +587,7 @@
826
587
  "__schema": "TypeRefSchema",
827
588
  "location": {
828
589
  "filePath": "prettier.main.runtime.ts",
829
- "line": 27,
590
+ "line": 24,
830
591
  "character": 31
831
592
  },
832
593
  "name": "Logger",
@@ -843,7 +604,7 @@
843
604
  "__schema": "ThisTypeSchema",
844
605
  "location": {
845
606
  "filePath": "prettier.main.runtime.ts",
846
- "line": 26,
607
+ "line": 23,
847
608
  "character": 1
848
609
  },
849
610
  "name": "PrettierMain"
@@ -854,14 +615,14 @@
854
615
  "__schema": "FunctionLikeSchema",
855
616
  "location": {
856
617
  "filePath": "prettier.main.runtime.ts",
857
- "line": 33,
618
+ "line": 30,
858
619
  "character": 3
859
620
  },
860
621
  "doc": {
861
622
  "__schema": "DocSchema",
862
623
  "location": {
863
624
  "filePath": "prettier.main.runtime.ts",
864
- "line": 28,
625
+ "line": 25,
865
626
  "character": 3
866
627
  },
867
628
  "raw": "/**\n * create a prettier formatter instance.\n * @param options prettier options.\n * @param PrettierModule reference to an `prettier` module.\n */",
@@ -871,7 +632,7 @@
871
632
  "__schema": "PropertyLikeTagSchema",
872
633
  "location": {
873
634
  "filePath": "prettier.main.runtime.ts",
874
- "line": 30,
635
+ "line": 27,
875
636
  "character": 6
876
637
  },
877
638
  "name": "options",
@@ -882,7 +643,7 @@
882
643
  "__schema": "PropertyLikeTagSchema",
883
644
  "location": {
884
645
  "filePath": "prettier.main.runtime.ts",
885
- "line": 31,
646
+ "line": 28,
886
647
  "character": 6
887
648
  },
888
649
  "name": "PrettierModule",
@@ -898,7 +659,7 @@
898
659
  "__schema": "ParameterSchema",
899
660
  "location": {
900
661
  "filePath": "prettier.main.runtime.ts",
901
- "line": 34,
662
+ "line": 31,
902
663
  "character": 5
903
664
  },
904
665
  "name": "formatterOptions",
@@ -906,7 +667,7 @@
906
667
  "__schema": "TypeRefSchema",
907
668
  "location": {
908
669
  "filePath": "prettier.main.runtime.ts",
909
- "line": 34,
670
+ "line": 31,
910
671
  "character": 23
911
672
  },
912
673
  "name": "FormatterOptions",
@@ -923,7 +684,7 @@
923
684
  "__schema": "ParameterSchema",
924
685
  "location": {
925
686
  "filePath": "prettier.main.runtime.ts",
926
- "line": 35,
687
+ "line": 32,
927
688
  "character": 5
928
689
  },
929
690
  "name": "options",
@@ -931,7 +692,7 @@
931
692
  "__schema": "TypeRefSchema",
932
693
  "location": {
933
694
  "filePath": "prettier.main.runtime.ts",
934
- "line": 35,
695
+ "line": 32,
935
696
  "character": 14
936
697
  },
937
698
  "name": "PrettierOptions"
@@ -943,7 +704,7 @@
943
704
  "__schema": "ParameterSchema",
944
705
  "location": {
945
706
  "filePath": "prettier.main.runtime.ts",
946
- "line": 36,
707
+ "line": 33,
947
708
  "character": 5
948
709
  },
949
710
  "name": "transformers",
@@ -951,17 +712,22 @@
951
712
  "__schema": "TypeArraySchema",
952
713
  "location": {
953
714
  "filePath": "prettier.main.runtime.ts",
954
- "line": 36,
715
+ "line": 33,
955
716
  "character": 19
956
717
  },
957
718
  "type": {
958
719
  "__schema": "TypeRefSchema",
959
720
  "location": {
960
721
  "filePath": "prettier.main.runtime.ts",
961
- "line": 36,
722
+ "line": 33,
962
723
  "character": 19
963
724
  },
964
- "name": "PrettierConfigTransformer"
725
+ "name": "PrettierConfigTransformer",
726
+ "componentId": {
727
+ "scope": "teambit.defender",
728
+ "name": "prettier/config-mutator",
729
+ "version": "0.0.100"
730
+ }
965
731
  }
966
732
  },
967
733
  "isOptional": true,
@@ -972,7 +738,7 @@
972
738
  "__schema": "ParameterSchema",
973
739
  "location": {
974
740
  "filePath": "prettier.main.runtime.ts",
975
- "line": 37,
741
+ "line": 34,
976
742
  "character": 5
977
743
  },
978
744
  "name": "PrettierModule",
@@ -980,7 +746,7 @@
980
746
  "__schema": "KeywordTypeSchema",
981
747
  "location": {
982
748
  "filePath": "prettier.main.runtime.ts",
983
- "line": 37,
749
+ "line": 34,
984
750
  "character": 22
985
751
  },
986
752
  "name": "any"
@@ -993,7 +759,7 @@
993
759
  "__schema": "TypeRefSchema",
994
760
  "location": {
995
761
  "filePath": "prettier.main.runtime.ts",
996
- "line": 33,
762
+ "line": 30,
997
763
  "character": 3
998
764
  },
999
765
  "name": "Formatter",
@@ -1008,7 +774,7 @@
1008
774
  "__schema": "VariableLikeSchema",
1009
775
  "location": {
1010
776
  "filePath": "prettier.main.runtime.ts",
1011
- "line": 45,
777
+ "line": 42,
1012
778
  "character": 3
1013
779
  },
1014
780
  "signature": "(property) PrettierMain.runtime: RuntimeDefinition",
@@ -1017,7 +783,7 @@
1017
783
  "__schema": "InferenceTypeSchema",
1018
784
  "location": {
1019
785
  "filePath": "prettier.main.runtime.ts",
1020
- "line": 45,
786
+ "line": 42,
1021
787
  "character": 3
1022
788
  },
1023
789
  "type": "RuntimeDefinition"
@@ -1029,7 +795,7 @@
1029
795
  "__schema": "VariableLikeSchema",
1030
796
  "location": {
1031
797
  "filePath": "prettier.main.runtime.ts",
1032
- "line": 47,
798
+ "line": 44,
1033
799
  "character": 3
1034
800
  },
1035
801
  "signature": "(property) PrettierMain.dependencies: Aspect[]",
@@ -1038,7 +804,7 @@
1038
804
  "__schema": "InferenceTypeSchema",
1039
805
  "location": {
1040
806
  "filePath": "prettier.main.runtime.ts",
1041
- "line": 47,
807
+ "line": 44,
1042
808
  "character": 3
1043
809
  },
1044
810
  "type": "Aspect[]"
@@ -1050,7 +816,7 @@
1050
816
  "__schema": "FunctionLikeSchema",
1051
817
  "location": {
1052
818
  "filePath": "prettier.main.runtime.ts",
1053
- "line": 49,
819
+ "line": 46,
1054
820
  "character": 3
1055
821
  },
1056
822
  "signature": "(method) PrettierMain.provider([loggerExt]: [LoggerMain, FormatterMain, WorkspaceConfigFilesMain]): Promise<PrettierMain>",
@@ -1060,7 +826,7 @@
1060
826
  "__schema": "ParameterSchema",
1061
827
  "location": {
1062
828
  "filePath": "prettier.main.runtime.ts",
1063
- "line": 49,
829
+ "line": 46,
1064
830
  "character": 25
1065
831
  },
1066
832
  "name": "[ loggerExt ]",
@@ -1068,7 +834,7 @@
1068
834
  "__schema": "TupleTypeSchema",
1069
835
  "location": {
1070
836
  "filePath": "prettier.main.runtime.ts",
1071
- "line": 49,
837
+ "line": 46,
1072
838
  "character": 38
1073
839
  },
1074
840
  "elements": [
@@ -1076,7 +842,7 @@
1076
842
  "__schema": "TypeRefSchema",
1077
843
  "location": {
1078
844
  "filePath": "prettier.main.runtime.ts",
1079
- "line": 49,
845
+ "line": 46,
1080
846
  "character": 39
1081
847
  },
1082
848
  "name": "LoggerMain",
@@ -1089,7 +855,7 @@
1089
855
  "__schema": "TypeRefSchema",
1090
856
  "location": {
1091
857
  "filePath": "prettier.main.runtime.ts",
1092
- "line": 49,
858
+ "line": 46,
1093
859
  "character": 51
1094
860
  },
1095
861
  "name": "FormatterMain",
@@ -1102,7 +868,7 @@
1102
868
  "__schema": "TypeRefSchema",
1103
869
  "location": {
1104
870
  "filePath": "prettier.main.runtime.ts",
1105
- "line": 49,
871
+ "line": 46,
1106
872
  "character": 66
1107
873
  },
1108
874
  "name": "WorkspaceConfigFilesMain",
@@ -1121,7 +887,7 @@
1121
887
  "__schema": "TypeRefSchema",
1122
888
  "location": {
1123
889
  "filePath": "prettier.main.runtime.ts",
1124
- "line": 49,
890
+ "line": 46,
1125
891
  "character": 94
1126
892
  },
1127
893
  "name": "Promise",
@@ -1130,7 +896,7 @@
1130
896
  "__schema": "TypeRefSchema",
1131
897
  "location": {
1132
898
  "filePath": "prettier.main.runtime.ts",
1133
- "line": 49,
899
+ "line": 46,
1134
900
  "character": 102
1135
901
  },
1136
902
  "name": "PrettierMain"
@@ -1150,7 +916,7 @@
1150
916
  "__schema": "FunctionLikeSchema",
1151
917
  "location": {
1152
918
  "filePath": "prettier.main.runtime.ts",
1153
- "line": 57,
919
+ "line": 54,
1154
920
  "character": 1
1155
921
  },
1156
922
  "signature": "function runTransformersWithContext(config: PrettierConfigMutator, transformers: PrettierConfigTransformer[] | undefined, context: PrettierConfigTransformContext): PrettierConfigMutator",
@@ -1160,7 +926,7 @@
1160
926
  "__schema": "ParameterSchema",
1161
927
  "location": {
1162
928
  "filePath": "prettier.main.runtime.ts",
1163
- "line": 58,
929
+ "line": 55,
1164
930
  "character": 3
1165
931
  },
1166
932
  "name": "config",
@@ -1168,14 +934,14 @@
1168
934
  "__schema": "TypeRefSchema",
1169
935
  "location": {
1170
936
  "filePath": "prettier.main.runtime.ts",
1171
- "line": 58,
937
+ "line": 55,
1172
938
  "character": 11
1173
939
  },
1174
940
  "name": "PrettierConfigMutator",
1175
941
  "componentId": {
1176
942
  "scope": "teambit.defender",
1177
943
  "name": "prettier/config-mutator",
1178
- "version": "0.0.99"
944
+ "version": "0.0.100"
1179
945
  }
1180
946
  },
1181
947
  "isOptional": false,
@@ -1185,7 +951,7 @@
1185
951
  "__schema": "ParameterSchema",
1186
952
  "location": {
1187
953
  "filePath": "prettier.main.runtime.ts",
1188
- "line": 59,
954
+ "line": 56,
1189
955
  "character": 3
1190
956
  },
1191
957
  "name": "transformers",
@@ -1193,17 +959,22 @@
1193
959
  "__schema": "TypeArraySchema",
1194
960
  "location": {
1195
961
  "filePath": "prettier.main.runtime.ts",
1196
- "line": 59,
962
+ "line": 56,
1197
963
  "character": 17
1198
964
  },
1199
965
  "type": {
1200
966
  "__schema": "TypeRefSchema",
1201
967
  "location": {
1202
968
  "filePath": "prettier.main.runtime.ts",
1203
- "line": 59,
969
+ "line": 56,
1204
970
  "character": 17
1205
971
  },
1206
- "name": "PrettierConfigTransformer"
972
+ "name": "PrettierConfigTransformer",
973
+ "componentId": {
974
+ "scope": "teambit.defender",
975
+ "name": "prettier/config-mutator",
976
+ "version": "0.0.100"
977
+ }
1207
978
  }
1208
979
  },
1209
980
  "isOptional": true,
@@ -1214,7 +985,7 @@
1214
985
  "__schema": "ParameterSchema",
1215
986
  "location": {
1216
987
  "filePath": "prettier.main.runtime.ts",
1217
- "line": 60,
988
+ "line": 57,
1218
989
  "character": 3
1219
990
  },
1220
991
  "name": "context",
@@ -1222,10 +993,15 @@
1222
993
  "__schema": "TypeRefSchema",
1223
994
  "location": {
1224
995
  "filePath": "prettier.main.runtime.ts",
1225
- "line": 60,
996
+ "line": 57,
1226
997
  "character": 12
1227
998
  },
1228
- "name": "PrettierConfigTransformContext"
999
+ "name": "PrettierConfigTransformContext",
1000
+ "componentId": {
1001
+ "scope": "teambit.defender",
1002
+ "name": "prettier/config-mutator",
1003
+ "version": "0.0.100"
1004
+ }
1229
1005
  },
1230
1006
  "isOptional": false,
1231
1007
  "isSpread": false
@@ -1235,14 +1011,14 @@
1235
1011
  "__schema": "TypeRefSchema",
1236
1012
  "location": {
1237
1013
  "filePath": "prettier.main.runtime.ts",
1238
- "line": 57,
1014
+ "line": 54,
1239
1015
  "character": 1
1240
1016
  },
1241
1017
  "name": "PrettierConfigMutator",
1242
1018
  "componentId": {
1243
1019
  "scope": "teambit.defender",
1244
1020
  "name": "prettier/config-mutator",
1245
- "version": "0.0.99"
1021
+ "version": "0.0.100"
1246
1022
  }
1247
1023
  },
1248
1024
  "modifiers": [
@@ -1255,7 +1031,7 @@
1255
1031
  "__schema": "UnImplementedSchema",
1256
1032
  "location": {
1257
1033
  "filePath": "prettier.main.runtime.ts",
1258
- "line": 55,
1034
+ "line": 52,
1259
1035
  "character": 1
1260
1036
  },
1261
1037
  "name": "PrettierAspect.addRuntime(PrettierMain);",
@@ -1267,7 +1043,7 @@
1267
1043
  "componentId": {
1268
1044
  "scope": "teambit.defender",
1269
1045
  "name": "prettier",
1270
- "version": "1.0.207"
1046
+ "version": "1.0.209"
1271
1047
  },
1272
1048
  "taggedModuleExports": []
1273
1049
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { PrettierAspect } from './prettier.aspect';
2
2
  export { PrettierAspect };
3
- export type { PrettierMain, PrettierOptions, PrettierConfigTransformer, PrettierConfigTransformContext, } from './prettier.main.runtime';
3
+ export type { PrettierMain, PrettierOptions } from './prettier.main.runtime';
4
4
  export default PrettierAspect;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_prettier","data","require","_default","exports","default","PrettierAspect"],"sources":["index.ts"],"sourcesContent":["import { PrettierAspect } from './prettier.aspect';\n\nexport { PrettierAspect };\nexport type {\n PrettierMain,\n PrettierOptions,\n PrettierConfigTransformer,\n PrettierConfigTransformContext,\n} from './prettier.main.runtime';\nexport default PrettierAspect;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmD,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GASpCC,0BAAc","ignoreList":[]}
1
+ {"version":3,"names":["_prettier","data","require","_default","exports","default","PrettierAspect"],"sources":["index.ts"],"sourcesContent":["import { PrettierAspect } from './prettier.aspect';\n\nexport { PrettierAspect };\nexport type { PrettierMain, PrettierOptions } from './prettier.main.runtime';\nexport default PrettierAspect;\n"],"mappings":";;;;;;;;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAmD,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAIpCC,0BAAc","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import { Options as PrettierModuleOptions } from 'prettier';
2
2
  import { Formatter, FormatterMain, FormatterOptions } from '@teambit/formatter';
3
3
  import { Logger, LoggerMain } from '@teambit/logger';
4
- import { PrettierConfigMutator } from '@teambit/defender.prettier.config-mutator';
4
+ import { PrettierConfigMutator, PrettierConfigTransformContext, PrettierConfigTransformer } from '@teambit/defender.prettier.config-mutator';
5
5
  import { WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';
6
6
  export type PrettierOptions = {
7
7
  /**
@@ -9,10 +9,6 @@ export type PrettierOptions = {
9
9
  */
10
10
  config: PrettierModuleOptions;
11
11
  };
12
- export type PrettierConfigTransformContext = {
13
- check: boolean;
14
- };
15
- export type PrettierConfigTransformer = (config: PrettierConfigMutator, context: PrettierConfigTransformContext) => PrettierConfigMutator;
16
12
  export declare class PrettierMain {
17
13
  private logger;
18
14
  constructor(logger: Logger);
@@ -43,6 +43,8 @@ function _prettier2() {
43
43
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
44
44
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
45
45
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
46
+ // TODO: this aspect is not used anymore, it is still here for now for backward compatibility.
47
+ // it will be removed as part of next major bit version
46
48
  class PrettierMain {
47
49
  constructor(logger) {
48
50
  this.logger = logger;
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_logger","_defenderPrettier","_prettier","_prettier2","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","PrettierMain","constructor","logger","createFormatter","formatterOptions","options","transformers","PrettierModule","configMutator","PrettierConfigMutator","config","transformerContext","check","afterMutation","runTransformersWithContext","clone","PrettierFormatter","raw","provider","loggerExt","createLogger","PrettierAspect","id","exports","MainRuntime","LoggerAspect","addRuntime","context","Array","isArray","newConfig","reduce","acc","transformer"],"sources":["prettier.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { Options as PrettierModuleOptions } from 'prettier';\nimport { Formatter, FormatterMain, FormatterOptions } from '@teambit/formatter';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport { PrettierConfigMutator } from '@teambit/defender.prettier.config-mutator';\nimport { WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\nimport { PrettierAspect } from './prettier.aspect';\nimport { PrettierFormatter } from './prettier.formatter';\n\nexport type PrettierOptions = {\n /**\n * formatter config for prettier.\n */\n config: PrettierModuleOptions;\n};\n\nexport type PrettierConfigTransformContext = {\n check: boolean;\n};\n\nexport type PrettierConfigTransformer = (\n config: PrettierConfigMutator,\n context: PrettierConfigTransformContext\n) => PrettierConfigMutator;\n\nexport class PrettierMain {\n constructor(private logger: Logger) {}\n /**\n * create a prettier formatter instance.\n * @param options prettier options.\n * @param PrettierModule reference to an `prettier` module.\n */\n createFormatter(\n formatterOptions: FormatterOptions = {},\n options: PrettierOptions,\n transformers: PrettierConfigTransformer[] = [],\n PrettierModule?: any\n ): Formatter {\n const configMutator = new PrettierConfigMutator(options.config);\n const transformerContext: PrettierConfigTransformContext = { check: !!formatterOptions.check };\n const afterMutation = runTransformersWithContext(configMutator.clone(), transformers, transformerContext);\n return new PrettierFormatter(this.logger, afterMutation.raw, PrettierModule);\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [LoggerAspect];\n\n static async provider([loggerExt]: [LoggerMain, FormatterMain, WorkspaceConfigFilesMain]): Promise<PrettierMain> {\n const logger = loggerExt.createLogger(PrettierAspect.id);\n return new PrettierMain(logger);\n }\n}\n\nPrettierAspect.addRuntime(PrettierMain);\n\nexport function runTransformersWithContext(\n config: PrettierConfigMutator,\n transformers: PrettierConfigTransformer[] = [],\n context: PrettierConfigTransformContext\n): PrettierConfigMutator {\n if (!Array.isArray(transformers)) return config;\n const newConfig = transformers.reduce((acc, transformer) => {\n return transformer(acc, context);\n }, config);\n return newConfig;\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_logger","_defenderPrettier","_prettier","_prettier2","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","PrettierMain","constructor","logger","createFormatter","formatterOptions","options","transformers","PrettierModule","configMutator","PrettierConfigMutator","config","transformerContext","check","afterMutation","runTransformersWithContext","clone","PrettierFormatter","raw","provider","loggerExt","createLogger","PrettierAspect","id","exports","MainRuntime","LoggerAspect","addRuntime","context","Array","isArray","newConfig","reduce","acc","transformer"],"sources":["prettier.main.runtime.ts"],"sourcesContent":["import { MainRuntime } from '@teambit/cli';\nimport { Options as PrettierModuleOptions } from 'prettier';\nimport { Formatter, FormatterMain, FormatterOptions } from '@teambit/formatter';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport {\n PrettierConfigMutator,\n PrettierConfigTransformContext,\n PrettierConfigTransformer,\n} from '@teambit/defender.prettier.config-mutator';\nimport { WorkspaceConfigFilesMain } from '@teambit/workspace-config-files';\nimport { PrettierAspect } from './prettier.aspect';\nimport { PrettierFormatter } from './prettier.formatter';\n\nexport type PrettierOptions = {\n /**\n * formatter config for prettier.\n */\n config: PrettierModuleOptions;\n};\n\n// TODO: this aspect is not used anymore, it is still here for now for backward compatibility.\n// it will be removed as part of next major bit version\nexport class PrettierMain {\n constructor(private logger: Logger) {}\n /**\n * create a prettier formatter instance.\n * @param options prettier options.\n * @param PrettierModule reference to an `prettier` module.\n */\n createFormatter(\n formatterOptions: FormatterOptions = {},\n options: PrettierOptions,\n transformers: PrettierConfigTransformer[] = [],\n PrettierModule?: any\n ): Formatter {\n const configMutator = new PrettierConfigMutator(options.config);\n const transformerContext: PrettierConfigTransformContext = { check: !!formatterOptions.check };\n const afterMutation = runTransformersWithContext(configMutator.clone(), transformers, transformerContext);\n return new PrettierFormatter(this.logger, afterMutation.raw, PrettierModule);\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [LoggerAspect];\n\n static async provider([loggerExt]: [LoggerMain, FormatterMain, WorkspaceConfigFilesMain]): Promise<PrettierMain> {\n const logger = loggerExt.createLogger(PrettierAspect.id);\n return new PrettierMain(logger);\n }\n}\n\nPrettierAspect.addRuntime(PrettierMain);\n\nexport function runTransformersWithContext(\n config: PrettierConfigMutator,\n transformers: PrettierConfigTransformer[] = [],\n context: PrettierConfigTransformContext\n): PrettierConfigMutator {\n if (!Array.isArray(transformers)) return config;\n const newConfig = transformers.reduce((acc, transformer) => {\n return transformer(acc, context);\n }, config);\n return newConfig;\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_prettier@1.0.207/dist/prettier.composition.js';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.defender_prettier@1.0.209/dist/prettier.composition.js';
2
2
  ;
3
3
 
4
4
  export const compositions = [compositions_0];
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@teambit/prettier",
3
- "version": "1.0.207",
3
+ "version": "1.0.209",
4
4
  "homepage": "https://bit.cloud/teambit/defender/prettier",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.defender",
8
8
  "name": "prettier",
9
- "version": "1.0.207"
9
+ "version": "1.0.209"
10
10
  },
11
11
  "dependencies": {
12
12
  "p-map-series": "2.1.0",
13
13
  "prettier": "2.8.8",
14
14
  "@teambit/harmony": "0.4.6",
15
- "@teambit/envs": "1.0.207",
16
- "@teambit/formatter": "1.0.207",
15
+ "@teambit/envs": "1.0.209",
16
+ "@teambit/formatter": "1.0.209",
17
17
  "@teambit/logger": "0.0.951",
18
18
  "@teambit/cli": "0.0.858",
19
- "@teambit/defender.prettier.config-mutator": "0.0.99",
20
- "@teambit/workspace-config-files": "1.0.207"
19
+ "@teambit/defender.prettier.config-mutator": "0.0.100",
20
+ "@teambit/workspace-config-files": "1.0.209"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/prettier": "2.7.3",