prettier 4.0.0-alpha.10 → 4.0.0-alpha.12
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 +0 -4381
- package/README.md +7 -8
- package/THIRD-PARTY-NOTICES.md +4416 -0
- package/bin/prettier.cjs +4 -0
- package/doc.d.ts +11 -0
- package/doc.js +329 -393
- package/doc.mjs +329 -393
- package/index.cjs +10 -2
- package/index.d.ts +13 -3
- package/index.mjs +2320 -1964
- package/internal/cli.mjs +2268 -1295
- package/package.json +3 -2
- package/plugins/acorn.js +10 -10
- package/plugins/acorn.mjs +10 -10
- package/plugins/angular.js +2 -1
- package/plugins/angular.mjs +2 -1
- package/plugins/babel.js +11 -11
- package/plugins/babel.mjs +11 -11
- package/plugins/estree.js +28 -28
- package/plugins/estree.mjs +28 -28
- package/plugins/flow.js +15 -15
- package/plugins/flow.mjs +15 -15
- package/plugins/glimmer.js +23 -23
- package/plugins/glimmer.mjs +23 -23
- package/plugins/graphql.js +16 -16
- package/plugins/graphql.mjs +16 -16
- package/plugins/html.js +17 -17
- package/plugins/html.mjs +17 -17
- package/plugins/markdown.js +44 -43
- package/plugins/markdown.mjs +44 -43
- package/plugins/meriyah.js +4 -4
- package/plugins/meriyah.mjs +4 -4
- package/plugins/postcss.js +33 -31
- package/plugins/postcss.mjs +33 -31
- package/plugins/typescript.js +14 -14
- package/plugins/typescript.mjs +14 -14
- package/plugins/yaml.js +66 -66
- package/plugins/yaml.mjs +66 -66
- package/standalone.d.ts +1 -1
- package/standalone.js +32 -28
- package/standalone.mjs +33 -29
package/bin/prettier.cjs
CHANGED
|
@@ -53,6 +53,10 @@ var require_please_upgrade_node = __commonJS({
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
// bin/prettier.cjs
|
|
56
|
+
var nodeModule = require("module");
|
|
57
|
+
if (typeof nodeModule.enableCompileCache === "function") {
|
|
58
|
+
nodeModule.enableCompileCache();
|
|
59
|
+
}
|
|
56
60
|
var pleaseUpgradeNode = require_please_upgrade_node();
|
|
57
61
|
var packageJson = require("../package.json");
|
|
58
62
|
pleaseUpgradeNode(packageJson);
|
package/doc.d.ts
CHANGED
|
@@ -192,7 +192,18 @@ export namespace printer {
|
|
|
192
192
|
options: Options,
|
|
193
193
|
): {
|
|
194
194
|
formatted: string;
|
|
195
|
+
/**
|
|
196
|
+
* This property is a misnomer, and has been since the changes in
|
|
197
|
+
* https://github.com/prettier/prettier/pull/15709.
|
|
198
|
+
* The region of the document indicated by `cursorNodeStart` and `cursorNodeText` will
|
|
199
|
+
* sometimes actually be what lies BETWEEN a pair of leaf nodes in the AST, rather than a node.
|
|
200
|
+
*/
|
|
195
201
|
cursorNodeStart?: number | undefined;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Note that, like cursorNodeStart, this is a misnomer and may actually be the text between two
|
|
205
|
+
* leaf nodes in the AST instead of the text of a node.
|
|
206
|
+
*/
|
|
196
207
|
cursorNodeText?: string | undefined;
|
|
197
208
|
};
|
|
198
209
|
interface Options {
|