prettier 3.3.2 → 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/LICENSE +35 -34
- package/doc.js +2 -2
- package/doc.mjs +2 -2
- package/index.cjs +8 -8
- package/index.d.ts +1 -2
- package/index.mjs +636 -704
- package/internal/cli.mjs +4 -4
- package/package.json +1 -1
- package/plugins/acorn.js +14 -12
- package/plugins/acorn.mjs +14 -12
- package/plugins/angular.js +1 -1
- package/plugins/angular.mjs +1 -1
- package/plugins/babel.js +10 -11
- package/plugins/babel.mjs +10 -11
- package/plugins/estree.js +27 -27
- package/plugins/estree.mjs +27 -27
- package/plugins/flow.js +15 -16
- package/plugins/flow.mjs +15 -16
- package/plugins/glimmer.js +5 -5
- package/plugins/glimmer.mjs +5 -5
- package/plugins/graphql.js +8 -8
- package/plugins/graphql.mjs +8 -8
- package/plugins/html.js +17 -17
- package/plugins/html.mjs +17 -17
- package/plugins/markdown.js +44 -44
- package/plugins/markdown.mjs +44 -44
- package/plugins/meriyah.js +4 -5
- package/plugins/meriyah.mjs +4 -5
- package/plugins/postcss.js +26 -26
- package/plugins/postcss.mjs +26 -26
- package/plugins/typescript.js +15 -20
- package/plugins/typescript.mjs +15 -20
- package/plugins/yaml.js +6 -6
- package/plugins/yaml.mjs +6 -6
- package/standalone.js +31 -30
- package/standalone.mjs +28 -27
package/internal/cli.mjs
CHANGED
|
@@ -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
|
|
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)
|
|
@@ -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
|
|
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) {
|
|
@@ -3619,7 +3619,7 @@ function createLogger(logLevel = "log") {
|
|
|
3619
3619
|
/* isOptionalObject */
|
|
3620
3620
|
false,
|
|
3621
3621
|
message,
|
|
3622
|
-
/^/
|
|
3622
|
+
/^/gmu,
|
|
3623
3623
|
prefix
|
|
3624
3624
|
) + (options.newline ? "\n" : "");
|
|
3625
3625
|
stream.write(message);
|
|
@@ -3688,7 +3688,7 @@ function indent(str, spaces) {
|
|
|
3688
3688
|
/* isOptionalObject */
|
|
3689
3689
|
false,
|
|
3690
3690
|
str,
|
|
3691
|
-
/^/
|
|
3691
|
+
/^/gmu,
|
|
3692
3692
|
" ".repeat(spaces)
|
|
3693
3693
|
);
|
|
3694
3694
|
}
|