prettier 3.1.0 → 4.0.0-alpha.1

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 CHANGED
@@ -94,7 +94,7 @@ Author: The Babel Team (https://babel.dev/team)
94
94
 
95
95
  ----------------------------------------
96
96
 
97
- ### @babel/highlight@v7.22.13
97
+ ### @babel/highlight@v7.23.4
98
98
 
99
99
  > Syntax highlight JavaScript strings for output in terminals.
100
100
 
@@ -128,7 +128,7 @@ Author: The Babel Team (https://babel.dev/team)
128
128
 
129
129
  ----------------------------------------
130
130
 
131
- ### @babel/parser@v7.23.3
131
+ ### @babel/parser@v7.23.4
132
132
 
133
133
  > A JavaScript parser
134
134
 
@@ -187,7 +187,7 @@ License: MIT
187
187
 
188
188
  ----------------------------------------
189
189
 
190
- ### @glimmer/syntax@v0.85.12
190
+ ### @glimmer/syntax@v0.85.13
191
191
 
192
192
  > Copyright (c) 2015 Tilde, Inc.
193
193
  >
@@ -211,7 +211,7 @@ License: MIT
211
211
 
212
212
  ----------------------------------------
213
213
 
214
- ### @glimmer/util@v0.85.12
214
+ ### @glimmer/util@v0.85.13
215
215
 
216
216
  > Common utilities used in Glimmer
217
217
 
@@ -239,7 +239,7 @@ License: MIT
239
239
 
240
240
  ----------------------------------------
241
241
 
242
- ### @glimmer/wire-format@v0.85.12
242
+ ### @glimmer/wire-format@v0.85.13
243
243
 
244
244
  License: MIT
245
245
 
@@ -583,7 +583,7 @@ Repository: <https://github.com/acornjs/acorn-jsx>
583
583
 
584
584
  ----------------------------------------
585
585
 
586
- ### angular-estree-parser@v8.0.3
586
+ ### angular-estree-parser@v9.0.0
587
587
 
588
588
  > A parser that converts Angular source code into an ESTree-compatible form
589
589
 
@@ -1599,7 +1599,7 @@ Author: Matteo Collina <hello@matteocollina.com>
1599
1599
 
1600
1600
  ----------------------------------------
1601
1601
 
1602
- ### file-entry-cache@v7.0.1
1602
+ ### file-entry-cache@v7.0.2
1603
1603
 
1604
1604
  > Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process
1605
1605
 
@@ -1688,41 +1688,6 @@ Author: Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
1688
1688
 
1689
1689
  ----------------------------------------
1690
1690
 
1691
- ### find-parent-dir@v0.3.1
1692
-
1693
- > Finds the first parent directory that contains a given file or directory.
1694
-
1695
- License: MIT
1696
- Homepage: <https://github.com/thlorenz/find-parent-dir>
1697
- Repository: <git://github.com/thlorenz/find-parent-dir.git>
1698
- Author: Thorsten Lorenz <thlorenz@gmx.de> (http://thlorenz.com)
1699
-
1700
- > Copyright 2013 Thorsten Lorenz.
1701
- > All rights reserved.
1702
- >
1703
- > Permission is hereby granted, free of charge, to any person
1704
- > obtaining a copy of this software and associated documentation
1705
- > files (the "Software"), to deal in the Software without
1706
- > restriction, including without limitation the rights to use,
1707
- > copy, modify, merge, publish, distribute, sublicense, and/or sell
1708
- > copies of the Software, and to permit persons to whom the
1709
- > Software is furnished to do so, subject to the following
1710
- > conditions:
1711
- >
1712
- > The above copyright notice and this permission notice shall be
1713
- > included in all copies or substantial portions of the Software.
1714
- >
1715
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1716
- > EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
1717
- > OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
1718
- > NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
1719
- > HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1720
- > WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1721
- > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1722
- > OTHER DEALINGS IN THE SOFTWARE.
1723
-
1724
- ----------------------------------------
1725
-
1726
1691
  ### find-up@v6.3.0
1727
1692
 
1728
1693
  > Find a file or directory by walking up parent directories
@@ -1742,7 +1707,7 @@ Author: Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
1742
1707
 
1743
1708
  ----------------------------------------
1744
1709
 
1745
- ### flat-cache@v3.1.1
1710
+ ### flat-cache@v3.2.0
1746
1711
 
1747
1712
  > A stupidly simple key/value storage using files to persist some data
1748
1713
 
@@ -1835,7 +1800,7 @@ Contributors:
1835
1800
 
1836
1801
  ----------------------------------------
1837
1802
 
1838
- ### flow-parser@v0.221.0
1803
+ ### flow-parser@v0.222.0
1839
1804
 
1840
1805
  > JavaScript parser written in OCaml. Produces ESTree AST
1841
1806
 
@@ -2049,7 +2014,7 @@ Author: Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
2049
2014
 
2050
2015
  ----------------------------------------
2051
2016
 
2052
- ### ignore@v5.2.4
2017
+ ### ignore@v5.3.0
2053
2018
 
2054
2019
  > Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.
2055
2020
 
@@ -2630,6 +2595,38 @@ Contributors:
2630
2595
 
2631
2596
  ----------------------------------------
2632
2597
 
2598
+ ### iterate-directory-up@v1.1.1
2599
+
2600
+ > Iterate directory up.
2601
+
2602
+ License: MIT
2603
+ Homepage: <https://github.com/fisker/iterate-directory-up#readme>
2604
+ Author: fisker Cheung <lionkay@gmail.com> (https://www.fiskercheung.com/)
2605
+
2606
+ > MIT License
2607
+ >
2608
+ > Copyright (c) fisker Cheung <lionkay@gmail.com> (https://www.fiskercheung.com/)
2609
+ >
2610
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
2611
+ > of this software and associated documentation files (the "Software"), to deal
2612
+ > in the Software without restriction, including without limitation the rights
2613
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2614
+ > copies of the Software, and to permit persons to whom the Software is
2615
+ > furnished to do so, subject to the following conditions:
2616
+ >
2617
+ > The above copyright notice and this permission notice shall be included in all
2618
+ > copies or substantial portions of the Software.
2619
+ >
2620
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2621
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2622
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2623
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2624
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2625
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2626
+ > SOFTWARE.
2627
+
2628
+ ----------------------------------------
2629
+
2633
2630
  ### jest-docblock@v29.7.0
2634
2631
 
2635
2632
  License: MIT
@@ -2759,42 +2756,6 @@ Author: Dominic Tarr <dominic.tarr@gmail.com> (http://dominictarr.com)
2759
2756
 
2760
2757
  ----------------------------------------
2761
2758
 
2762
- ### json-parse-even-better-errors@v3.0.0
2763
-
2764
- > JSON.parse with context information on error
2765
-
2766
- License: MIT
2767
- Repository: <https://github.com/npm/json-parse-even-better-errors.git>
2768
- Author: GitHub Inc.
2769
-
2770
- > Copyright 2017 Kat Marchán
2771
- > Copyright npm, Inc.
2772
- >
2773
- > Permission is hereby granted, free of charge, to any person obtaining a
2774
- > copy of this software and associated documentation files (the "Software"),
2775
- > to deal in the Software without restriction, including without limitation
2776
- > the rights to use, copy, modify, merge, publish, distribute, sublicense,
2777
- > and/or sell copies of the Software, and to permit persons to whom the
2778
- > Software is furnished to do so, subject to the following conditions:
2779
- >
2780
- > The above copyright notice and this permission notice shall be included in
2781
- > all copies or substantial portions of the Software.
2782
- >
2783
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2784
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2785
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2786
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2787
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2788
- > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2789
- > DEALINGS IN THE SOFTWARE.
2790
- >
2791
- > ---
2792
- >
2793
- > This library is a fork of 'better-json-errors' by Kat Marchán, extended and
2794
- > distributed under the terms of the MIT license above.
2795
-
2796
- ----------------------------------------
2797
-
2798
2759
  ### json5@v2.2.3
2799
2760
 
2800
2761
  > JSON for Humans
@@ -2834,7 +2795,7 @@ Contributors:
2834
2795
 
2835
2796
  ----------------------------------------
2836
2797
 
2837
- ### keyv@v4.5.3
2798
+ ### keyv@v4.5.4
2838
2799
 
2839
2800
  > Simple key-value storage with support for multiple backends
2840
2801
 
@@ -3077,7 +3038,7 @@ Repository: <git@github.com:teambition/merge2.git>
3077
3038
 
3078
3039
  ----------------------------------------
3079
3040
 
3080
- ### meriyah@v4.3.8
3041
+ ### meriyah@v4.3.9
3081
3042
 
3082
3043
  > A 100% compliant, self-hosted javascript parser with high focus on both performance and stability
3083
3044
 
@@ -3252,7 +3213,7 @@ Author: Yoan Arnaudov <jonidev@gmail.com>
3252
3213
 
3253
3214
  ----------------------------------------
3254
3215
 
3255
- ### nanoid@v3.3.6
3216
+ ### nanoid@v3.3.7
3256
3217
 
3257
3218
  > A tiny (116 bytes), secure URL-friendly unique string ID generator
3258
3219
 
@@ -3411,7 +3372,7 @@ Contributors:
3411
3372
 
3412
3373
  ----------------------------------------
3413
3374
 
3414
- ### parse-json@v8.0.1
3375
+ ### parse-json@v8.1.0
3415
3376
 
3416
3377
  > Parse JSON with more helpful errors
3417
3378
 
@@ -4344,7 +4305,7 @@ Contributors:
4344
4305
 
4345
4306
  ----------------------------------------
4346
4307
 
4347
- ### ts-api-utils@v1.0.1
4308
+ ### ts-api-utils@v1.0.3
4348
4309
 
4349
4310
  > Utility functions for working with TypeScript's API. Successor to the wonderful tsutils.
4350
4311
 
@@ -4720,7 +4681,7 @@ Contributors:
4720
4681
 
4721
4682
  ----------------------------------------
4722
4683
 
4723
- ### url-or-path@v2.1.0
4684
+ ### url-or-path@v2.3.0
4724
4685
 
4725
4686
  > Convert between file URL and path.
4726
4687
 
package/bin/prettier.cjs CHANGED
@@ -60,9 +60,13 @@ var require_please_upgrade_node = __commonJS({
60
60
  var pleaseUpgradeNode = require_please_upgrade_node();
61
61
  var packageJson = require("../package.json");
62
62
  pleaseUpgradeNode(packageJson);
63
- function runCli(cli) {
64
- return cli.run();
65
- }
66
63
  var dynamicImport = new Function("module", "return import(module)");
67
- var promise = dynamicImport("../internal/cli.mjs").then(runCli);
68
- module.exports.__promise = promise;
64
+ if (process.env.PRETTIER_LEGACY_CLI) {
65
+ promise = dynamicImport("../internal/cli.mjs").then(function runCli(cli) {
66
+ return cli.run();
67
+ });
68
+ module.exports.__promise = promise;
69
+ } else {
70
+ dynamicImport("@prettier/cli/bin");
71
+ }
72
+ var promise;
package/doc.js CHANGED
@@ -13,13 +13,13 @@
13
13
  typeof globalThis !== "undefined"
14
14
  ? globalThis
15
15
  : typeof global !== "undefined"
16
- ? global
17
- : typeof self !== "undefined"
18
- ? self
19
- : this || {};
16
+ ? global
17
+ : typeof self !== "undefined"
18
+ ? self
19
+ : this || {};
20
20
  root.doc = interopModuleDefault();
21
21
  }
22
- })(function() {
22
+ })(function () {
23
23
  "use strict";
24
24
  var __defProp = Object.defineProperty;
25
25
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
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 = "3.1.0";
588
+ module2.exports = "4.0.0-alpha.1";
589
589
  }
590
590
  });
591
591
 
package/index.d.ts CHANGED
@@ -50,8 +50,8 @@ type IndexValue<T, P> = T extends any[]
50
50
  ? T[P]
51
51
  : never
52
52
  : P extends keyof T
53
- ? T[P]
54
- : never;
53
+ ? T[P]
54
+ : never;
55
55
 
56
56
  // Determines if an object T is an array like string[] (in which case this
57
57
  // evaluates to false) or a tuple like [string] (in which case this evaluates to
@@ -60,8 +60,8 @@ type IndexValue<T, P> = T extends any[]
60
60
  type IsTuple<T> = T extends []
61
61
  ? true
62
62
  : T extends [infer First, ...infer Remain]
63
- ? IsTuple<Remain>
64
- : false;
63
+ ? IsTuple<Remain>
64
+ : false;
65
65
 
66
66
  type CallProperties<T> = T extends any[] ? IndexProperties<T> : keyof T;
67
67
  type IterProperties<T> = T extends any[]