prettier
Advanced tools
+12
-13
@@ -71,3 +71,3 @@ (function (factory) { | ||
| // src/utils/noop.js | ||
| // src/utilities/noop.js | ||
| var noop = () => { | ||
@@ -789,11 +789,10 @@ }; | ||
| // src/common/end-of-line.js | ||
| function convertEndOfLineToChars(value) { | ||
| switch (value) { | ||
| case "cr": | ||
| return "\r"; | ||
| case "crlf": | ||
| return "\r\n"; | ||
| default: | ||
| return "\n"; | ||
| } | ||
| var OPTION_CR = "cr"; | ||
| var OPTION_CRLF = "crlf"; | ||
| var CHARACTER_CR = "\r"; | ||
| var CHARACTER_CRLF = "\r\n"; | ||
| var CHARACTER_LF = "\n"; | ||
| var DEFAULT_EOL = CHARACTER_LF; | ||
| function convertEndOfLineOptionToCharacter(endOfLineOption) { | ||
| return endOfLineOption === OPTION_CR ? CHARACTER_CR : endOfLineOption === OPTION_CRLF ? CHARACTER_CRLF : DEFAULT_EOL; | ||
| } | ||
@@ -814,6 +813,6 @@ | ||
| // src/utils/narrow-emojis.evaluate.js | ||
| // src/utilities/narrow-emojis.evaluate.js | ||
| var narrow_emojis_evaluate_default = "\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07"; | ||
| // src/utils/get-string-width.js | ||
| // src/utilities/get-string-width.js | ||
| var notAsciiRegex = /[^\x20-\x7F]/u; | ||
@@ -1095,3 +1094,3 @@ var narrowEmojisSet = new Set(narrow_emojis_evaluate_default); | ||
| const width = options.printWidth; | ||
| const newLine = convertEndOfLineToChars(options.endOfLine); | ||
| const newLine = convertEndOfLineOptionToCharacter(options.endOfLine); | ||
| let position = 0; | ||
@@ -1098,0 +1097,0 @@ const commands = [{ |
+12
-13
@@ -36,3 +36,3 @@ var __defProp = Object.defineProperty; | ||
| // src/utils/noop.js | ||
| // src/utilities/noop.js | ||
| var noop = () => { | ||
@@ -754,11 +754,10 @@ }; | ||
| // src/common/end-of-line.js | ||
| function convertEndOfLineToChars(value) { | ||
| switch (value) { | ||
| case "cr": | ||
| return "\r"; | ||
| case "crlf": | ||
| return "\r\n"; | ||
| default: | ||
| return "\n"; | ||
| } | ||
| var OPTION_CR = "cr"; | ||
| var OPTION_CRLF = "crlf"; | ||
| var CHARACTER_CR = "\r"; | ||
| var CHARACTER_CRLF = "\r\n"; | ||
| var CHARACTER_LF = "\n"; | ||
| var DEFAULT_EOL = CHARACTER_LF; | ||
| function convertEndOfLineOptionToCharacter(endOfLineOption) { | ||
| return endOfLineOption === OPTION_CR ? CHARACTER_CR : endOfLineOption === OPTION_CRLF ? CHARACTER_CRLF : DEFAULT_EOL; | ||
| } | ||
@@ -779,6 +778,6 @@ | ||
| // src/utils/narrow-emojis.evaluate.js | ||
| // src/utilities/narrow-emojis.evaluate.js | ||
| var narrow_emojis_evaluate_default = "\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07"; | ||
| // src/utils/get-string-width.js | ||
| // src/utilities/get-string-width.js | ||
| var notAsciiRegex = /[^\x20-\x7F]/u; | ||
@@ -1060,3 +1059,3 @@ var narrowEmojisSet = new Set(narrow_emojis_evaluate_default); | ||
| const width = options.printWidth; | ||
| const newLine = convertEndOfLineToChars(options.endOfLine); | ||
| const newLine = convertEndOfLineOptionToCharacter(options.endOfLine); | ||
| let position = 0; | ||
@@ -1063,0 +1062,0 @@ const commands = [{ |
+65
-48
@@ -68,3 +68,3 @@ "use strict"; | ||
| // src/utils/skip.js | ||
| // src/utilities/skip.js | ||
| function skip(characters) { | ||
@@ -97,3 +97,3 @@ return (text, startIndex, options) => { | ||
| var init_skip = __esm({ | ||
| "src/utils/skip.js"() { | ||
| "src/utilities/skip.js"() { | ||
| skipWhitespace = skip(/\s/u); | ||
@@ -106,3 +106,3 @@ skipSpaces = skip(" "); | ||
| // src/utils/skip-inline-comment.js | ||
| // src/utilities/skip-inline-comment.js | ||
| function skipInlineComment(text, startIndex) { | ||
@@ -123,3 +123,3 @@ if (startIndex === false) { | ||
| var init_skip_inline_comment = __esm({ | ||
| "src/utils/skip-inline-comment.js"() { | ||
| "src/utilities/skip-inline-comment.js"() { | ||
| skip_inline_comment_default = skipInlineComment; | ||
@@ -129,3 +129,3 @@ } | ||
| // src/utils/skip-newline.js | ||
| // src/utilities/skip-newline.js | ||
| function skipNewline(text, startIndex, options) { | ||
@@ -156,3 +156,3 @@ const backwards = Boolean(options?.backwards); | ||
| var init_skip_newline = __esm({ | ||
| "src/utils/skip-newline.js"() { | ||
| "src/utilities/skip-newline.js"() { | ||
| isNewlineCharacter = (character) => character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029"; | ||
@@ -163,3 +163,3 @@ skip_newline_default = skipNewline; | ||
| // src/utils/skip-trailing-comment.js | ||
| // src/utilities/skip-trailing-comment.js | ||
| function skipTrailingComment(text, startIndex) { | ||
@@ -176,3 +176,3 @@ if (startIndex === false) { | ||
| var init_skip_trailing_comment = __esm({ | ||
| "src/utils/skip-trailing-comment.js"() { | ||
| "src/utilities/skip-trailing-comment.js"() { | ||
| init_skip(); | ||
@@ -183,3 +183,3 @@ skip_trailing_comment_default = skipTrailingComment; | ||
| // src/utils/get-next-non-space-non-comment-character-index.js | ||
| // src/utilities/get-next-non-space-non-comment-character-index.js | ||
| function getNextNonSpaceNonCommentCharacterIndex(text, startIndex) { | ||
@@ -199,3 +199,3 @@ let oldIdx = null; | ||
| var init_get_next_non_space_non_comment_character_index = __esm({ | ||
| "src/utils/get-next-non-space-non-comment-character-index.js"() { | ||
| "src/utilities/get-next-non-space-non-comment-character-index.js"() { | ||
| init_skip(); | ||
@@ -209,3 +209,3 @@ init_skip_inline_comment(); | ||
| // src/utils/has-newline.js | ||
| // src/utilities/has-newline.js | ||
| function hasNewline(text, startIndex, options = {}) { | ||
@@ -222,3 +222,3 @@ const idx = skipSpaces( | ||
| var init_has_newline = __esm({ | ||
| "src/utils/has-newline.js"() { | ||
| "src/utilities/has-newline.js"() { | ||
| init_skip(); | ||
@@ -230,3 +230,3 @@ init_skip_newline(); | ||
| // src/utils/is-next-line-empty.js | ||
| // src/utilities/is-next-line-empty.js | ||
| function isNextLineEmpty(text, startIndex) { | ||
@@ -247,3 +247,3 @@ let oldIdx = null; | ||
| var init_is_next_line_empty = __esm({ | ||
| "src/utils/is-next-line-empty.js"() { | ||
| "src/utilities/is-next-line-empty.js"() { | ||
| init_has_newline(); | ||
@@ -258,3 +258,3 @@ init_skip(); | ||
| // src/utils/is-previous-line-empty.js | ||
| // src/utilities/is-previous-line-empty.js | ||
| function isPreviousLineEmpty(text, startIndex) { | ||
@@ -270,3 +270,3 @@ let idx = startIndex - 1; | ||
| var init_is_previous_line_empty = __esm({ | ||
| "src/utils/is-previous-line-empty.js"() { | ||
| "src/utilities/is-previous-line-empty.js"() { | ||
| init_skip(); | ||
@@ -278,3 +278,3 @@ init_skip_newline(); | ||
| // src/main/comments/utils.js | ||
| // src/main/comments/utilities.js | ||
| function describeNodeForDebugging(node) { | ||
@@ -314,8 +314,8 @@ const nodeType = node.type || node.kind || "(unknown type)"; | ||
| } | ||
| var init_utils = __esm({ | ||
| "src/main/comments/utils.js"() { | ||
| var init_utilities = __esm({ | ||
| "src/main/comments/utilities.js"() { | ||
| } | ||
| }); | ||
| // src/utils/get-alignment-size.js | ||
| // src/utilities/get-alignment-size.js | ||
| function getAlignmentSize(text, tabWidth, startIndex = 0) { | ||
@@ -334,3 +334,3 @@ let size = 0; | ||
| var init_get_alignment_size = __esm({ | ||
| "src/utils/get-alignment-size.js"() { | ||
| "src/utilities/get-alignment-size.js"() { | ||
| get_alignment_size_default = getAlignmentSize; | ||
@@ -340,3 +340,3 @@ } | ||
| // src/utils/get-indent-size.js | ||
| // src/utilities/get-indent-size.js | ||
| function getIndentSize(value, tabWidth) { | ||
@@ -355,3 +355,3 @@ const lastNewlineIndex = value.lastIndexOf("\n"); | ||
| var init_get_indent_size = __esm({ | ||
| "src/utils/get-indent-size.js"() { | ||
| "src/utilities/get-indent-size.js"() { | ||
| init_get_alignment_size(); | ||
@@ -374,3 +374,3 @@ get_indent_size_default = getIndentSize; | ||
| // src/utils/get-max-continuous-count.js | ||
| // src/utilities/get-max-continuous-count.js | ||
| function getMaxContinuousCount(text, searchString) { | ||
@@ -390,3 +390,3 @@ let results = text.matchAll( | ||
| var init_get_max_continuous_count = __esm({ | ||
| "src/utils/get-max-continuous-count.js"() { | ||
| "src/utilities/get-max-continuous-count.js"() { | ||
| init_escape_string_regexp(); | ||
@@ -397,3 +397,3 @@ get_max_continuous_count_default = getMaxContinuousCount; | ||
| // src/utils/get-next-non-space-non-comment-character.js | ||
| // src/utilities/get-next-non-space-non-comment-character.js | ||
| function getNextNonSpaceNonCommentCharacter(text, startIndex) { | ||
@@ -405,3 +405,3 @@ const index = get_next_non_space_non_comment_character_index_default(text, startIndex); | ||
| var init_get_next_non_space_non_comment_character = __esm({ | ||
| "src/utils/get-next-non-space-non-comment-character.js"() { | ||
| "src/utilities/get-next-non-space-non-comment-character.js"() { | ||
| init_get_next_non_space_non_comment_character_index(); | ||
@@ -412,22 +412,39 @@ get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter; | ||
| // src/utils/get-preferred-quote.js | ||
| // src/utilities/get-preferred-quote.js | ||
| function getPreferredQuote(text, preferredQuoteOrPreferSingleQuote) { | ||
| const preferred = preferredQuoteOrPreferSingleQuote === true || preferredQuoteOrPreferSingleQuote === SINGLE_QUOTE ? SINGLE_QUOTE : DOUBLE_QUOTE; | ||
| const alternate = preferred === SINGLE_QUOTE ? DOUBLE_QUOTE : SINGLE_QUOTE; | ||
| const { preferred, alternate } = preferredQuoteOrPreferSingleQuote === true || preferredQuoteOrPreferSingleQuote === SINGLE_QUOTE ? SINGLE_QUOTE_SETTINGS : DOUBLE_QUOTE_SETTINGS; | ||
| const { length } = text; | ||
| let preferredQuoteCount = 0; | ||
| let alternateQuoteCount = 0; | ||
| for (const character of text) { | ||
| if (character === preferred) { | ||
| for (let index = 0; index < length; index++) { | ||
| const codePoint = text.charCodeAt(index); | ||
| if (codePoint === preferred.codePoint) { | ||
| preferredQuoteCount++; | ||
| } else if (character === alternate) { | ||
| } else if (codePoint === alternate.codePoint) { | ||
| alternateQuoteCount++; | ||
| } | ||
| } | ||
| return preferredQuoteCount > alternateQuoteCount ? alternate : preferred; | ||
| return (preferredQuoteCount > alternateQuoteCount ? alternate : preferred).character; | ||
| } | ||
| var SINGLE_QUOTE, DOUBLE_QUOTE, get_preferred_quote_default; | ||
| var SINGLE_QUOTE, DOUBLE_QUOTE, SINGLE_QUOTE_DATA, DOUBLE_QUOTE_DATA, SINGLE_QUOTE_SETTINGS, DOUBLE_QUOTE_SETTINGS, get_preferred_quote_default; | ||
| var init_get_preferred_quote = __esm({ | ||
| "src/utils/get-preferred-quote.js"() { | ||
| "src/utilities/get-preferred-quote.js"() { | ||
| SINGLE_QUOTE = "'"; | ||
| DOUBLE_QUOTE = '"'; | ||
| SINGLE_QUOTE_DATA = Object.freeze({ | ||
| character: SINGLE_QUOTE, | ||
| codePoint: 39 | ||
| }); | ||
| DOUBLE_QUOTE_DATA = Object.freeze({ | ||
| character: DOUBLE_QUOTE, | ||
| codePoint: 34 | ||
| }); | ||
| SINGLE_QUOTE_SETTINGS = Object.freeze({ | ||
| preferred: SINGLE_QUOTE_DATA, | ||
| alternate: DOUBLE_QUOTE_DATA | ||
| }); | ||
| DOUBLE_QUOTE_SETTINGS = Object.freeze({ | ||
| preferred: DOUBLE_QUOTE_DATA, | ||
| alternate: SINGLE_QUOTE_DATA | ||
| }); | ||
| get_preferred_quote_default = getPreferredQuote; | ||
@@ -466,6 +483,6 @@ } | ||
| // src/utils/narrow-emojis.evaluate.js | ||
| // src/utilities/narrow-emojis.evaluate.js | ||
| var narrow_emojis_evaluate_default; | ||
| var init_narrow_emojis_evaluate = __esm({ | ||
| "src/utils/narrow-emojis.evaluate.js"() { | ||
| "src/utilities/narrow-emojis.evaluate.js"() { | ||
| narrow_emojis_evaluate_default = "\xA9\xAE\u203C\u2049\u2122\u2139\u2194\u2195\u2196\u2197\u2198\u2199\u21A9\u21AA\u2328\u23CF\u23F1\u23F2\u23F8\u23F9\u23FA\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600\u2601\u2602\u2603\u2604\u260E\u2611\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694\u2695\u2696\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F1\u26F7\u26F8\u26F9\u2702\u2708\u2709\u270C\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u2764\u27A1\u2934\u2935\u2B05\u2B06\u2B07"; | ||
@@ -475,3 +492,3 @@ } | ||
| // src/utils/get-string-width.js | ||
| // src/utilities/get-string-width.js | ||
| function getStringWidth(text) { | ||
@@ -506,3 +523,3 @@ if (!text) { | ||
| var init_get_string_width = __esm({ | ||
| "src/utils/get-string-width.js"() { | ||
| "src/utilities/get-string-width.js"() { | ||
| init_emoji_regex(); | ||
@@ -517,3 +534,3 @@ init_get_east_asian_width(); | ||
| // src/utils/has-newline-in-range.js | ||
| // src/utilities/has-newline-in-range.js | ||
| function hasNewlineInRange(text, startIndex, endIndex) { | ||
@@ -529,3 +546,3 @@ for (let i = startIndex; i < endIndex; ++i) { | ||
| var init_has_newline_in_range = __esm({ | ||
| "src/utils/has-newline-in-range.js"() { | ||
| "src/utilities/has-newline-in-range.js"() { | ||
| has_newline_in_range_default = hasNewlineInRange; | ||
@@ -535,3 +552,3 @@ } | ||
| // src/utils/has-spaces.js | ||
| // src/utilities/has-spaces.js | ||
| function hasSpaces(text, startIndex, options = {}) { | ||
@@ -547,3 +564,3 @@ const idx = skipSpaces( | ||
| var init_has_spaces = __esm({ | ||
| "src/utils/has-spaces.js"() { | ||
| "src/utilities/has-spaces.js"() { | ||
| init_skip(); | ||
@@ -554,3 +571,3 @@ has_spaces_default = hasSpaces; | ||
| // src/utils/public.js | ||
| // src/utilities/public.js | ||
| var public_exports = {}; | ||
@@ -638,3 +655,3 @@ __export(public_exports, { | ||
| var init_public = __esm({ | ||
| "src/utils/public.js"() { | ||
| "src/utilities/public.js"() { | ||
| init_method_replace_all(); | ||
@@ -644,3 +661,3 @@ init_get_next_non_space_non_comment_character_index(); | ||
| init_is_previous_line_empty(); | ||
| init_utils(); | ||
| init_utilities(); | ||
| init_get_alignment_size(); | ||
@@ -670,3 +687,3 @@ init_get_indent_size(); | ||
| "src/main/version.evaluate.js"() { | ||
| version_evaluate_default = "3.7.3"; | ||
| version_evaluate_default = "3.7.4"; | ||
| } | ||
@@ -673,0 +690,0 @@ }); |
+1
-1
@@ -847,3 +847,3 @@ // Copied from `@types/prettier` | ||
| // https://github.com/prettier/prettier/blob/next/src/utils/public.js | ||
| // https://github.com/prettier/prettier/blob/main/src/utilities/public.js | ||
| export namespace util { | ||
@@ -850,0 +850,0 @@ interface SkipOptions { |
+1
-1
| { | ||
| "name": "prettier", | ||
| "version": "3.7.3", | ||
| "version": "3.7.4", | ||
| "description": "Prettier is an opinionated code formatter", | ||
@@ -5,0 +5,0 @@ "bin": "./bin/prettier.cjs", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Mixed license
LicensePackage contains multiple licenses.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
70554
0.17%8575882
-0.13%1
Infinity%