dorian 2.6.8 → 3.0.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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.node-version +1 -1
  3. data/.npm-version +1 -1
  4. data/.rubocop.yml +25 -21
  5. data/.ruby-version +1 -1
  6. data/.tool-versions +2 -3
  7. data/Gemfile +0 -4
  8. data/Gemfile.lock +63 -116
  9. data/VERSION +1 -1
  10. data/dorian.gemspec +19 -19
  11. data/lib/dorian/bin.rb +82 -75
  12. data/package-lock.json +8 -8
  13. data/package.json +5 -5
  14. data/vendor/prettier/LICENSE +0 -4372
  15. data/vendor/prettier/README.md +14 -19
  16. data/vendor/prettier/THIRD-PARTY-NOTICES.md +6059 -0
  17. data/vendor/prettier/bin/prettier.cjs +27 -18
  18. data/vendor/prettier/doc.d.ts +11 -0
  19. data/vendor/prettier/doc.js +742 -776
  20. data/vendor/prettier/doc.mjs +743 -766
  21. data/vendor/prettier/index.cjs +266 -371
  22. data/vendor/prettier/index.d.ts +43 -16
  23. data/vendor/prettier/index.mjs +9615 -16721
  24. data/vendor/prettier/internal/experimental-cli-worker.mjs +2841 -0
  25. data/vendor/prettier/internal/experimental-cli.mjs +12790 -0
  26. data/vendor/prettier/internal/legacy-cli.mjs +6229 -0
  27. data/vendor/prettier/package.json +113 -108
  28. data/vendor/prettier/plugins/acorn.js +16 -6618
  29. data/vendor/prettier/plugins/acorn.mjs +16 -6456
  30. data/vendor/prettier/plugins/angular.js +4 -2435
  31. data/vendor/prettier/plugins/angular.mjs +4 -2375
  32. data/vendor/prettier/plugins/babel.d.ts +7 -7
  33. data/vendor/prettier/plugins/babel.js +15 -14271
  34. data/vendor/prettier/plugins/babel.mjs +15 -13986
  35. data/vendor/prettier/plugins/estree.d.ts +6 -1
  36. data/vendor/prettier/plugins/estree.js +43 -9486
  37. data/vendor/prettier/plugins/estree.mjs +43 -9278
  38. data/vendor/prettier/plugins/flow.js +19 -51476
  39. data/vendor/prettier/plugins/flow.mjs +19 -51218
  40. data/vendor/prettier/plugins/glimmer.d.ts +5 -1
  41. data/vendor/prettier/plugins/glimmer.js +30 -8527
  42. data/vendor/prettier/plugins/glimmer.mjs +30 -8414
  43. data/vendor/prettier/plugins/graphql.d.ts +5 -1
  44. data/vendor/prettier/plugins/graphql.js +15 -2408
  45. data/vendor/prettier/plugins/graphql.mjs +15 -2334
  46. data/vendor/prettier/plugins/html.d.ts +6 -1
  47. data/vendor/prettier/plugins/html.js +25 -8182
  48. data/vendor/prettier/plugins/html.mjs +25 -8077
  49. data/vendor/prettier/plugins/markdown.d.ts +5 -1
  50. data/vendor/prettier/plugins/markdown.js +57 -9063
  51. data/vendor/prettier/plugins/markdown.mjs +57 -8972
  52. data/vendor/prettier/plugins/meriyah.js +5 -5953
  53. data/vendor/prettier/plugins/meriyah.mjs +5 -5800
  54. data/vendor/prettier/plugins/postcss.d.ts +5 -1
  55. data/vendor/prettier/plugins/postcss.js +61 -9244
  56. data/vendor/prettier/plugins/postcss.mjs +61 -9046
  57. data/vendor/prettier/plugins/typescript.js +15 -38052
  58. data/vendor/prettier/plugins/typescript.mjs +15 -37726
  59. data/vendor/prettier/plugins/yaml.d.ts +5 -1
  60. data/vendor/prettier/plugins/yaml.js +157 -7423
  61. data/vendor/prettier/plugins/yaml.mjs +157 -7327
  62. data/vendor/prettier/standalone.d.ts +1 -1
  63. data/vendor/prettier/standalone.js +29 -3984
  64. data/vendor/prettier/standalone.mjs +29 -3938
  65. metadata +145 -40
  66. data/vendor/prettier/internal/cli.mjs +0 -4366
@@ -1,19 +1,15 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __commonJS = function (cb, mod) {
4
+ var __commonJS = function(cb, mod) {
5
5
  return function __require() {
6
- return (
7
- mod ||
8
- (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod),
9
- mod.exports
10
- );
6
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
7
  };
12
8
  };
13
9
 
14
10
  // node_modules/semver-compare/index.js
15
11
  var require_semver_compare = __commonJS({
16
- "node_modules/semver-compare/index.js": function (exports2, module2) {
12
+ "node_modules/semver-compare/index.js": function(exports2, module2) {
17
13
  module2.exports = function cmp(a, b) {
18
14
  var pa = a.split(".");
19
15
  var pb = b.split(".");
@@ -27,12 +23,12 @@ var require_semver_compare = __commonJS({
27
23
  }
28
24
  return 0;
29
25
  };
30
- },
26
+ }
31
27
  });
32
28
 
33
29
  // node_modules/please-upgrade-node/index.js
34
30
  var require_please_upgrade_node = __commonJS({
35
- "node_modules/please-upgrade-node/index.js": function (exports2, module2) {
31
+ "node_modules/please-upgrade-node/index.js": function(exports2, module2) {
36
32
  var semverCompare = require_semver_compare();
37
33
  module2.exports = function pleaseUpgradeNode2(pkg, opts) {
38
34
  var opts = opts || {};
@@ -43,10 +39,7 @@ var require_please_upgrade_node = __commonJS({
43
39
  console.error(opts.message(requiredVersion));
44
40
  } else {
45
41
  console.error(
46
- pkg.name +
47
- " requires at least version " +
48
- requiredVersion +
49
- " of Node, please upgrade",
42
+ pkg.name + " requires at least version " + requiredVersion + " of Node, please upgrade"
50
43
  );
51
44
  }
52
45
  if (opts.hasOwnProperty("exitCode")) {
@@ -56,16 +49,32 @@ var require_please_upgrade_node = __commonJS({
56
49
  }
57
50
  }
58
51
  };
59
- },
52
+ }
60
53
  });
61
54
 
62
55
  // bin/prettier.cjs
56
+ var nodeModule = require("module");
57
+ if (typeof nodeModule.enableCompileCache === "function") {
58
+ nodeModule.enableCompileCache();
59
+ }
63
60
  var pleaseUpgradeNode = require_please_upgrade_node();
64
61
  var packageJson = require("../package.json");
65
62
  pleaseUpgradeNode(packageJson);
66
- function runCli(cli) {
67
- return cli.run();
68
- }
69
63
  var dynamicImport = new Function("module", "return import(module)");
70
- var promise = dynamicImport("../internal/cli.mjs").then(runCli);
64
+ var promise;
65
+ var index = process.argv.indexOf("--experimental-cli");
66
+ if (process.env.PRETTIER_EXPERIMENTAL_CLI || index !== -1) {
67
+ if (index !== -1) {
68
+ process.argv.splice(index, 1);
69
+ }
70
+ promise = dynamicImport("../internal/experimental-cli.mjs").then(
71
+ function(cli) {
72
+ return cli.__promise;
73
+ }
74
+ );
75
+ } else {
76
+ promise = dynamicImport("../internal/legacy-cli.mjs").then(function runCli(cli) {
77
+ return cli.run();
78
+ });
79
+ }
71
80
  module.exports.__promise = promise;
@@ -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 {