prettier 3.3.1 → 3.3.3

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/internal/cli.mjs CHANGED
@@ -1739,7 +1739,7 @@ var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUp
1739
1739
  var preserveConsecutiveUppercase = (input, toLowerCase) => {
1740
1740
  LEADING_CAPITAL.lastIndex = 0;
1741
1741
  return string_replace_all_default(
1742
- /* isOptionalObject*/
1742
+ /* isOptionalObject */
1743
1743
  false,
1744
1744
  input,
1745
1745
  LEADING_CAPITAL,
@@ -1750,10 +1750,10 @@ var postProcess = (input, toUpperCase) => {
1750
1750
  SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
1751
1751
  NUMBERS_AND_IDENTIFIER.lastIndex = 0;
1752
1752
  return string_replace_all_default(
1753
- /* isOptionalObject*/
1753
+ /* isOptionalObject */
1754
1754
  false,
1755
1755
  string_replace_all_default(
1756
- /* isOptionalObject*/
1756
+ /* isOptionalObject */
1757
1757
  false,
1758
1758
  input,
1759
1759
  NUMBERS_AND_IDENTIFIER,
@@ -1862,7 +1862,7 @@ function isJson(value) {
1862
1862
  }
1863
1863
  }
1864
1864
  var normalizeToPosix = path.sep === "\\" ? (filepath) => string_replace_all_default(
1865
- /* isOptionalObject*/
1865
+ /* isOptionalObject */
1866
1866
  false,
1867
1867
  filepath,
1868
1868
  "\\",
@@ -2570,7 +2570,7 @@ var Context = class {
2570
2570
  popContextPlugins() {
2571
2571
  __privateGet(this, _stack).pop();
2572
2572
  Object.assign(this, at_default(
2573
- /* isOptionalObject*/
2573
+ /* isOptionalObject */
2574
2574
  false,
2575
2575
  __privateGet(this, _stack),
2576
2576
  -1
@@ -2597,7 +2597,7 @@ var Context = class {
2597
2597
  const {
2598
2598
  PRETTIER_PERF_REPEAT
2599
2599
  } = process.env;
2600
- if (PRETTIER_PERF_REPEAT && /^\d+$/.test(PRETTIER_PERF_REPEAT)) {
2600
+ if (PRETTIER_PERF_REPEAT && /^\d+$/u.test(PRETTIER_PERF_REPEAT)) {
2601
2601
  return {
2602
2602
  name: "PRETTIER_PERF_REPEAT (environment variable)",
2603
2603
  debugRepeat: Number(PRETTIER_PERF_REPEAT)
@@ -2786,14 +2786,14 @@ function sortPaths(paths) {
2786
2786
  }
2787
2787
  function escapePathForGlob(path10) {
2788
2788
  return string_replace_all_default(
2789
- /* isOptionalObject*/
2789
+ /* isOptionalObject */
2790
2790
  false,
2791
2791
  string_replace_all_default(
2792
- /* isOptionalObject*/
2792
+ /* isOptionalObject */
2793
2793
  false,
2794
2794
  fastGlob.escapePath(
2795
2795
  string_replace_all_default(
2796
- /* isOptionalObject*/
2796
+ /* isOptionalObject */
2797
2797
  false,
2798
2798
  path10,
2799
2799
  "\\",
@@ -3206,7 +3206,7 @@ function handleError(context, filename, error, printedFilename, ignoreUnknown) {
3206
3206
  return;
3207
3207
  }
3208
3208
  const isParseError = Boolean(error == null ? void 0 : error.loc);
3209
- const isValidationError = /^Invalid \S+ value\./.test(error == null ? void 0 : error.message);
3209
+ const isValidationError = /^Invalid \S+ value\./u.test(error == null ? void 0 : error.message);
3210
3210
  if (isParseError) {
3211
3211
  context.logger.error(`${filename}: ${String(error)}`);
3212
3212
  } else if (isValidationError || error instanceof errors.ConfigError) {
@@ -3616,10 +3616,10 @@ function createLogger(logLevel = "log") {
3616
3616
  ...options
3617
3617
  };
3618
3618
  message = string_replace_all_default(
3619
- /* isOptionalObject*/
3619
+ /* isOptionalObject */
3620
3620
  false,
3621
3621
  message,
3622
- /^/gm,
3622
+ /^/gmu,
3623
3623
  prefix
3624
3624
  ) + (options.newline ? "\n" : "");
3625
3625
  stream.write(message);
@@ -3685,10 +3685,10 @@ var CHOICE_USAGE_MARGIN = 3;
3685
3685
  var CHOICE_USAGE_INDENTATION = 2;
3686
3686
  function indent(str, spaces) {
3687
3687
  return string_replace_all_default(
3688
- /* isOptionalObject*/
3688
+ /* isOptionalObject */
3689
3689
  false,
3690
3690
  str,
3691
- /^/gm,
3691
+ /^/gmu,
3692
3692
  " ".repeat(spaces)
3693
3693
  );
3694
3694
  }
@@ -3716,7 +3716,7 @@ function createOptionUsageRow(header, content, threshold) {
3716
3716
  const separator = header.length >= threshold ? `
3717
3717
  ${" ".repeat(threshold)}` : " ".repeat(threshold - header.length);
3718
3718
  const description = string_replace_all_default(
3719
- /* isOptionalObject*/
3719
+ /* isOptionalObject */
3720
3720
  false,
3721
3721
  content,
3722
3722
  "\n",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prettier",
3
- "version": "3.3.1",
3
+ "version": "3.3.3",
4
4
  "description": "Prettier is an opinionated code formatter",
5
5
  "bin": "./bin/prettier.cjs",
6
6
  "repository": "prettier/prettier",