prettier-plugin-embed 0.4.10 → 0.4.11

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 (34) hide show
  1. package/README.md +578 -89
  2. package/dist/embedded/css/options.d.ts +36 -11
  3. package/dist/embedded/es/options.d.ts +36 -11
  4. package/dist/embedded/glsl/options.d.ts +36 -11
  5. package/dist/embedded/graphql/options.d.ts +36 -10
  6. package/dist/embedded/html/options.d.ts +36 -11
  7. package/dist/embedded/index.d.ts +2 -2
  8. package/dist/embedded/ini/options.d.ts +36 -10
  9. package/dist/embedded/java/options.d.ts +36 -5
  10. package/dist/embedded/json/options.d.ts +37 -11
  11. package/dist/embedded/jsonata/options.d.ts +36 -5
  12. package/dist/embedded/latex/options.d.ts +36 -10
  13. package/dist/embedded/markdown/options.d.ts +36 -11
  14. package/dist/embedded/nginx/options.d.ts +36 -5
  15. package/dist/embedded/noop/options.d.ts +29 -3
  16. package/dist/embedded/pegjs/options.d.ts +36 -5
  17. package/dist/embedded/php/options.d.ts +36 -11
  18. package/dist/embedded/prisma/options.d.ts +36 -5
  19. package/dist/embedded/properties/options.d.ts +36 -10
  20. package/dist/embedded/pug/options.d.ts +36 -5
  21. package/dist/embedded/ruby/options.d.ts +36 -10
  22. package/dist/embedded/sh/options.d.ts +36 -10
  23. package/dist/embedded/sql/options.d.ts +36 -11
  24. package/dist/embedded/toml/options.d.ts +36 -10
  25. package/dist/embedded/ts/options.d.ts +37 -12
  26. package/dist/embedded/types.d.ts +8 -2
  27. package/dist/embedded/utils.d.ts +3 -1
  28. package/dist/embedded/xml/options.d.ts +36 -11
  29. package/dist/embedded/yaml/options.d.ts +36 -10
  30. package/dist/index.js +1537 -1068
  31. package/dist/options.d.ts +509 -11
  32. package/dist/types.d.ts +36 -6
  33. package/dist/utils.d.ts +136 -5
  34. package/package.json +5 -6
package/dist/types.d.ts CHANGED
@@ -1,16 +1,46 @@
1
1
  import type { TemplateLiteral } from "estree";
2
2
  import type { AstPath, Doc, Options } from "prettier";
3
+ import type { printer } from "prettier/doc";
3
4
  import type { OmitIndexSignature } from "type-fest";
4
- import type { AutocompleteStringList, EmbeddedDefaultIdentifier, EmbeddedLanguage, PluginEmbedOptions, makeIdentifiersOptionName } from "./embedded/index.js";
5
+ import type { AutocompleteStringList, EmbeddedDefaultComment, EmbeddedDefaultTag, EmbeddedLanguage, PluginEmbedOptions, makeCommentsOptionName, makeIdentifiersOptionName, makeTagsOptionName } from "./embedded/index.js";
5
6
  import type { PluginEmbedLanguageAgnosticOptions } from "./options.js";
6
7
  export type InternalPrintFun = (selector?: string | number | (string | number)[] | AstPath<TemplateLiteral>) => Doc;
7
8
  export interface EmbedderPayload {
8
- identifier: string;
9
- identifiers: string[];
9
+ commentOrTag: string;
10
+ kind: "comment" | "tag";
10
11
  embeddedOverrideOptions: EmbeddedOverride["options"] | undefined;
11
12
  }
12
13
  export type Embedder<T extends Options = Options> = (textToDoc: (text: string, options: T) => Promise<Doc>, print: InternalPrintFun, path: AstPath<TemplateLiteral>, options: T, embedderPayload: EmbedderPayload) => Promise<Doc>;
13
- export interface EmbeddedOverride {
14
- identifiers: AutocompleteStringList<EmbeddedDefaultIdentifier>;
15
- options: Omit<Omit<OmitIndexSignature<Options>, keyof PluginEmbedOptions> & Omit<PluginEmbedOptions, keyof PluginEmbedLanguageAgnosticOptions | ReturnType<typeof makeIdentifiersOptionName<EmbeddedLanguage>>>, "printWidth" | "endOfLine" | "useTabs" | "tabWidth" | "parser" | "filepath" | "embeddedLanguageFormatting" | `__${string}`>;
14
+ type EmbeddedCommentsOrTags = AutocompleteStringList<EmbeddedDefaultComment | EmbeddedDefaultTag>;
15
+ type EmbeddedComments = AutocompleteStringList<EmbeddedDefaultComment>;
16
+ type EmbeddedTags = AutocompleteStringList<EmbeddedDefaultTag>;
17
+ type EmbeddedOverrideOptions = Omit<Omit<OmitIndexSignature<Options>, keyof PluginEmbedOptions> & Omit<PluginEmbedOptions, keyof PluginEmbedLanguageAgnosticOptions | ReturnType<typeof makeIdentifiersOptionName<EmbeddedLanguage>> | ReturnType<typeof makeCommentsOptionName<EmbeddedLanguage>> | ReturnType<typeof makeTagsOptionName<EmbeddedLanguage>>>, keyof printer.Options | "endOfLine" | "parser" | "filepath" | "embeddedLanguageFormatting" | `__${string}`>;
18
+ interface EmbeddedOverrideWithIdentifiers {
19
+ /**
20
+ * @deprecated Please use `comments` or `tags`.
21
+ */
22
+ identifiers: EmbeddedCommentsOrTags;
23
+ comments?: EmbeddedComments;
24
+ tags?: EmbeddedTags;
25
+ options: EmbeddedOverrideOptions;
16
26
  }
27
+ interface EmbeddedOverrideWithComments {
28
+ /**
29
+ * @deprecated Please use `comments` or `tags`.
30
+ */
31
+ identifiers?: EmbeddedCommentsOrTags;
32
+ comments: EmbeddedComments;
33
+ tags?: EmbeddedTags;
34
+ options: EmbeddedOverrideOptions;
35
+ }
36
+ interface EmbeddedOverrideWithTags {
37
+ /**
38
+ * @deprecated Please use `comments` or `tags`.
39
+ */
40
+ identifiers?: EmbeddedCommentsOrTags;
41
+ comments?: EmbeddedComments;
42
+ tags: EmbeddedTags;
43
+ options: EmbeddedOverrideOptions;
44
+ }
45
+ export type EmbeddedOverride = EmbeddedOverrideWithComments | EmbeddedOverrideWithTags | EmbeddedOverrideWithIdentifiers;
46
+ export {};
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,136 @@
1
- import type { Node } from "estree";
2
- import { type AstPath, type Options } from "prettier";
3
- export declare const resolveEmbeddedOverrideOptions: (embeddedOverridesString: string | undefined, identifier: string, sourceFilePath?: string) => Promise<Omit<Omit<import("type-fest").OmitIndexSignature<Options>, keyof import("./index.js").PluginEmbedOptions> & Omit<import("./index.js").PluginEmbedOptions, "embeddedNoopIdentifiers" | "embeddedCssIdentifiers" | "embeddedEsIdentifiers" | "embeddedGlslIdentifiers" | "embeddedGraphqlIdentifiers" | "embeddedHtmlIdentifiers" | "embeddedIniIdentifiers" | "embeddedJavaIdentifiers" | "embeddedJsonIdentifiers" | "embeddedJsonataIdentifiers" | "embeddedLatexIdentifiers" | "embeddedMarkdownIdentifiers" | "embeddedNginxIdentifiers" | "embeddedPegjsIdentifiers" | "embeddedTsIdentifiers" | "embeddedPhpIdentifiers" | "embeddedPrismaIdentifiers" | "embeddedPropertiesIdentifiers" | "embeddedPugIdentifiers" | "embeddedRubyIdentifiers" | "embeddedShIdentifiers" | "embeddedSqlIdentifiers" | "embeddedTomlIdentifiers" | "embeddedXmlIdentifiers" | "embeddedYamlIdentifiers" | keyof import("./options.js").PluginEmbedLanguageAgnosticOptions>, "parser" | "filepath" | "endOfLine" | "embeddedLanguageFormatting" | "printWidth" | "tabWidth" | "useTabs" | `__${string}`> | undefined>;
4
- export declare function getIdentifierFromComment({ node, parent }: AstPath<Node>, comments: string[], options: Options): string | undefined;
5
- export declare function getIdentifierFromTag({ node, parent }: AstPath<Node>, tags: string[], options: Options): string | undefined;
1
+ import type { Expression, Node, TemplateLiteral } from "estree";
2
+ import { type AstPath, type Options, type Printer } from "prettier";
3
+ import { type EmbeddedComment, type EmbeddedLanguage, type EmbeddedTag } from "./embedded/index.js";
4
+ export declare function resolveEmbeddedOverrideOptions(embeddedOverridesString: string | undefined, { commentOrTag, kind, filepath, }: {
5
+ commentOrTag: EmbeddedComment | EmbeddedTag;
6
+ kind: "comment" | "tag";
7
+ filepath?: string;
8
+ }): Promise<{
9
+ embeddedCssParser?: "css" | "less" | "scss" | undefined;
10
+ embeddedEsParser?: "babel" | "babel-flow" | "acorn" | "espree" | "flow" | "meriyah" | undefined;
11
+ embeddedHtmlParser?: "html" | "vue" | "angular" | "lwc" | undefined;
12
+ embeddedJsonParser?: "json" | "json5" | "jsonc" | "json-stringify" | undefined;
13
+ embeddedMarkdownParser?: "markdown" | "mdx" | "remark" | undefined;
14
+ embeddedTsParser?: "typescript" | "babel-ts" | undefined;
15
+ embeddedRubyParser?: "ruby" | "rbs" | "haml" | undefined;
16
+ embeddedSqlPlugin?: "prettier-plugin-sql" | "prettier-plugin-sql-cst" | undefined;
17
+ embeddedSqlParser?: "bigquery" | "mariadb" | "mysql" | "postgresql" | "sqlite" | undefined;
18
+ semi?: boolean | undefined;
19
+ singleQuote?: boolean | undefined;
20
+ jsxSingleQuote?: boolean | undefined;
21
+ trailingComma?: "none" | "es5" | "all" | undefined;
22
+ bracketSpacing?: boolean | undefined;
23
+ bracketSameLine?: boolean | undefined;
24
+ rangeStart?: number | undefined;
25
+ rangeEnd?: number | undefined;
26
+ requirePragma?: boolean | undefined;
27
+ insertPragma?: boolean | undefined;
28
+ proseWrap?: "preserve" | "always" | "never" | undefined;
29
+ arrowParens?: "always" | "avoid" | undefined;
30
+ plugins?: (string | import("prettier").Plugin<any>)[] | undefined;
31
+ htmlWhitespaceSensitivity?: "css" | "strict" | "ignore" | undefined;
32
+ quoteProps?: "preserve" | "as-needed" | "consistent" | undefined;
33
+ vueIndentScriptAndStyle?: boolean | undefined;
34
+ singleAttributePerLine?: boolean | undefined;
35
+ experimentalTernaries?: boolean | undefined;
36
+ jsxBracketSameLine?: boolean | undefined;
37
+ alignDirectives?: boolean | undefined;
38
+ alignUniversally?: boolean | undefined;
39
+ wrapParameters?: boolean | undefined;
40
+ continuationIndent?: number | undefined;
41
+ locStart?: ((node: any) => number) | undefined;
42
+ locEnd?: ((node: any) => number) | undefined;
43
+ originalText?: string | undefined;
44
+ keepComments?: boolean | undefined;
45
+ stopAt?: string | undefined;
46
+ variant?: import("sh-syntax").LangVariant | undefined;
47
+ indent?: number | undefined;
48
+ binaryNextLine?: boolean | undefined;
49
+ switchCaseIndent?: boolean | undefined;
50
+ spaceRedirects?: boolean | undefined;
51
+ keepPadding?: boolean | undefined;
52
+ minify?: boolean | undefined;
53
+ functionNextLine?: boolean | undefined;
54
+ experimentalWasm?: boolean | undefined;
55
+ sqlKeywordCase?: "preserve" | "upper" | "lower" | undefined;
56
+ sqlParamTypes?: import("sql-parser-cst/lib/ParserOptions.js").ParamType[] | undefined;
57
+ keywordCase?: import("sql-formatter").KeywordCase | undefined;
58
+ identifierCase?: import("sql-formatter").KeywordCase | undefined;
59
+ dataTypeCase?: import("sql-formatter").KeywordCase | undefined;
60
+ functionCase?: import("sql-formatter").KeywordCase | undefined;
61
+ indentStyle?: import("sql-formatter").IndentStyle | undefined;
62
+ logicalOperatorNewline?: import("sql-formatter").LogicalOperatorNewline | undefined;
63
+ expressionWidth?: number | undefined;
64
+ linesBetweenQueries?: number | undefined;
65
+ denseOperators?: boolean | undefined;
66
+ newlineBeforeSemicolon?: boolean | undefined;
67
+ params?: ((import("sql-formatter").ParamItems | string[]) & string) | undefined;
68
+ paramTypes?: (import("sql-formatter").ParamTypes & string) | undefined;
69
+ dialect?: string | undefined;
70
+ language?: "bigquery" | "db2" | "db2i" | "hive" | "mariadb" | "mysql" | "n1ql" | "plsql" | "postgresql" | "redshift" | "singlestoredb" | "snowflake" | "spark" | "sql" | "sqlite" | "transactsql" | "trino" | "tsql" | undefined;
71
+ database?: string | undefined;
72
+ type?: string | undefined;
73
+ formatter?: "node-sql-parser" | "sql-cst" | "sql-formatter" | undefined;
74
+ alignEntries?: boolean | undefined;
75
+ alignComments?: boolean | undefined;
76
+ arrayAutoExpand?: boolean | undefined;
77
+ arrayAutoCollapse?: boolean | undefined;
78
+ compactArrays?: boolean | undefined;
79
+ compactInlineTables?: boolean | undefined;
80
+ compactEntries?: boolean | undefined;
81
+ indentTables?: boolean | undefined;
82
+ indentEntries?: boolean | undefined;
83
+ reorderKeys?: boolean | undefined;
84
+ allowedBlankLines?: number | undefined;
85
+ iniSpaceAroundEquals?: boolean | undefined;
86
+ entrypoint?: "arrayInitializer" | "variableInitializerList" | "block" | "blockStatements" | "blockStatement" | "localVariableDeclarationStatement" | "localVariableDeclaration" | "localVariableType" | "statement" | "statementWithoutTrailingSubstatement" | "emptyStatement" | "labeledStatement" | "expressionStatement" | "statementExpression" | "ifStatement" | "assertStatement" | "switchStatement" | "switchBlock" | "switchBlockStatementGroup" | "switchLabel" | "switchRule" | "caseConstant" | "whileStatement" | "doStatement" | "forStatement" | "basicForStatement" | "forInit" | "forUpdate" | "statementExpressionList" | "enhancedForStatement" | "breakStatement" | "continueStatement" | "returnStatement" | "throwStatement" | "synchronizedStatement" | "tryStatement" | "catches" | "catchClause" | "catchFormalParameter" | "catchType" | "finally" | "tryWithResourcesStatement" | "resourceSpecification" | "resourceList" | "resource" | "yieldStatement" | "variableAccess" | "classDeclaration" | "normalClassDeclaration" | "classModifier" | "typeParameters" | "typeParameterList" | "superclass" | "superinterfaces" | "interfaceTypeList" | "classPermits" | "classBody" | "classBodyDeclaration" | "classMemberDeclaration" | "fieldDeclaration" | "fieldModifier" | "variableDeclaratorList" | "variableDeclarator" | "variableDeclaratorId" | "variableInitializer" | "unannType" | "unannPrimitiveTypeWithOptionalDimsSuffix" | "unannPrimitiveType" | "unannReferenceType" | "unannClassOrInterfaceType" | "unannClassType" | "unannInterfaceType" | "unannTypeVariable" | "methodDeclaration" | "methodModifier" | "methodHeader" | "result" | "methodDeclarator" | "receiverParameter" | "formalParameterList" | "formalParameter" | "variableParaRegularParameter" | "variableArityParameter" | "variableModifier" | "throws" | "exceptionTypeList" | "exceptionType" | "methodBody" | "instanceInitializer" | "staticInitializer" | "constructorDeclaration" | "constructorModifier" | "constructorDeclarator" | "simpleTypeName" | "constructorBody" | "explicitConstructorInvocation" | "unqualifiedExplicitConstructorInvocation" | "qualifiedExplicitConstructorInvocation" | "enumDeclaration" | "enumBody" | "enumConstantList" | "enumConstant" | "enumConstantModifier" | "enumBodyDeclarations" | "recordDeclaration" | "recordHeader" | "recordComponentList" | "recordComponent" | "variableArityRecordComponent" | "recordComponentModifier" | "recordBody" | "recordBodyDeclaration" | "compactConstructorDeclaration" | "isDims" | "expression" | "lambdaExpression" | "lambdaParameters" | "lambdaParametersWithBraces" | "lambdaParameterList" | "inferredLambdaParameterList" | "explicitLambdaParameterList" | "lambdaParameter" | "regularLambdaParameter" | "lambdaParameterType" | "lambdaBody" | "ternaryExpression" | "binaryExpression" | "unaryExpression" | "unaryExpressionNotPlusMinus" | "primary" | "primaryPrefix" | "primarySuffix" | "fqnOrRefType" | "fqnOrRefTypePartRest" | "fqnOrRefTypePartCommon" | "fqnOrRefTypePartFirst" | "parenthesisExpression" | "castExpression" | "primitiveCastExpression" | "referenceTypeCastExpression" | "newExpression" | "unqualifiedClassInstanceCreationExpression" | "classOrInterfaceTypeToInstantiate" | "typeArgumentsOrDiamond" | "diamond" | "methodInvocationSuffix" | "argumentList" | "arrayCreationExpression" | "arrayCreationDefaultInitSuffix" | "arrayCreationExplicitInitSuffix" | "dimExprs" | "dimExpr" | "classLiteralSuffix" | "arrayAccessSuffix" | "methodReferenceSuffix" | "pattern" | "typePattern" | "recordPattern" | "componentPatternList" | "componentPattern" | "unnamedPattern" | "guard" | "isRefTypeInMethodRef" | "interfaceDeclaration" | "normalInterfaceDeclaration" | "interfaceModifier" | "extendsInterfaces" | "interfacePermits" | "interfaceBody" | "interfaceMemberDeclaration" | "constantDeclaration" | "constantModifier" | "interfaceMethodDeclaration" | "interfaceMethodModifier" | "annotationTypeDeclaration" | "annotationTypeBody" | "annotationTypeMemberDeclaration" | "annotationTypeElementDeclaration" | "annotationTypeElementModifier" | "defaultValue" | "annotation" | "elementValuePairList" | "elementValuePair" | "elementValue" | "elementValueArrayInitializer" | "elementValueList" | "literal" | "integerLiteral" | "floatingPointLiteral" | "booleanLiteral" | "moduleName" | "packageName" | "typeName" | "expressionName" | "methodName" | "packageOrTypeName" | "ambiguousName" | "compilationUnit" | "ordinaryCompilationUnit" | "modularCompilationUnit" | "packageDeclaration" | "packageModifier" | "importDeclaration" | "typeDeclaration" | "moduleDeclaration" | "moduleDirective" | "requiresModuleDirective" | "exportsModuleDirective" | "opensModuleDirective" | "usesModuleDirective" | "providesModuleDirective" | "requiresModifier" | "primitiveType" | "numericType" | "integralType" | "floatingPointType" | "referenceType" | "classOrInterfaceType" | "classType" | "interfaceType" | "typeVariable" | "dims" | "typeParameter" | "typeParameterModifier" | "typeBound" | "additionalBound" | "typeArguments" | "typeArgumentList" | "typeArgument" | "wildcard" | "wildcardBounds" | undefined;
87
+ actionParser?: "typescript" | "babel" | "babel-flow" | "acorn" | "espree" | "flow" | "meriyah" | "babel-ts" | undefined;
88
+ phpVersion?: "5.0" | "5.1" | "5.2" | "5.3" | "5.4" | "5.5" | "5.6" | "7.0" | "7.1" | "7.2" | "7.3" | "7.4" | "8.0" | "8.1" | "8.2" | undefined;
89
+ trailingCommaPHP?: boolean | undefined;
90
+ braceStyle?: "psr-2" | "per-cs" | "1tbs" | undefined;
91
+ escapeNonLatin1?: boolean | undefined;
92
+ keySeparator?: ":" | " " | "=" | ": " | "= " | " : " | " = " | undefined;
93
+ pugPrintWidth?: number | undefined;
94
+ pugSingleQuote?: boolean | undefined;
95
+ pugTabWidth?: number | undefined;
96
+ pugUseTabs?: boolean | undefined;
97
+ pugBracketSpacing?: boolean | undefined;
98
+ pugArrowParens?: "always" | "avoid" | undefined;
99
+ pugSemi?: boolean | undefined;
100
+ pugBracketSameLine?: boolean | undefined;
101
+ pugAttributeSeparator?: "none" | "always" | "as-needed" | undefined;
102
+ pugCommentPreserveSpaces?: "keep-all" | "keep-leading" | "trim-all" | undefined;
103
+ pugSortAttributes?: "asc" | "desc" | "as-is" | undefined;
104
+ pugSortAttributesBeginning?: string[] | undefined;
105
+ pugSortAttributesEnd?: string[] | undefined;
106
+ pugWrapAttributesThreshold?: number | undefined;
107
+ pugWrapAttributesPattern?: string | undefined;
108
+ pugClassLocation?: "before-attributes" | "after-attributes" | undefined;
109
+ pugClassNotation?: "literal" | "as-is" | "attribute" | undefined;
110
+ pugIdNotation?: "literal" | "as-is" | undefined;
111
+ pugEmptyAttributes?: "none" | "all" | "as-is" | undefined;
112
+ pugEmptyAttributesForceQuotes?: "none" | "all" | "as-is" | undefined;
113
+ pugSingleFileComponentIndentation?: boolean | undefined;
114
+ pugFramework?: "vue" | "angular" | "auto" | "svelte" | undefined;
115
+ pugExplicitDiv?: boolean | undefined;
116
+ pugPreserveAttributeBrackets?: boolean | undefined;
117
+ rubyPlugins?: import("./embedded/utils.js").AutocompleteStringList<"plugin/single_quotes" | "plugin/trailing_comma" | "plugin/disable_auto_ternary"> | undefined;
118
+ rubySingleQuote?: boolean | undefined;
119
+ rubyExecutablePath?: string | undefined;
120
+ xmlSelfClosingSpace?: boolean | undefined;
121
+ xmlWhitespaceSensitivity?: "preserve" | "strict" | "ignore" | undefined;
122
+ xmlSortAttributesByKey?: boolean | undefined;
123
+ xmlQuoteAttributes?: "preserve" | "single" | "double" | undefined;
124
+ } | undefined>;
125
+ export declare const compareTagExpressionToTagString: (tagExpression: Expression, tagString: string, parse: (text: string) => Node | Promise<Node>) => boolean;
126
+ export declare function parseCommentFromTemplateLiteralAstPath({ node, parent, }: AstPath<Node> & {
127
+ node: TemplateLiteral;
128
+ }): string | undefined;
129
+ export declare function parseTagFromTemplateLiteralAstPath({ parent, }: AstPath<Node> & {
130
+ node: TemplateLiteral;
131
+ }): string | TemplateLiteral | import("estree").ArrayExpression | import("estree").ArrowFunctionExpression | import("estree").AssignmentExpression | import("estree").AwaitExpression | import("estree").BinaryExpression | import("estree").CallExpression | import("estree").ChainExpression | import("estree").ClassExpression | import("estree").ConditionalExpression | import("estree").FunctionExpression | import("estree").ImportExpression | import("estree").Literal | import("estree").LogicalExpression | import("estree").MemberExpression | import("estree").MetaProperty | import("estree").ObjectExpression | import("estree").SequenceExpression | import("estree").TaggedTemplateExpression | import("estree").ThisExpression | import("estree").UnaryExpression | import("estree").UpdateExpression | import("estree").YieldExpression | undefined;
132
+ export declare function createCommentsInOptionsGenerator(options: Options, comment: string): (embeddedLanguage: EmbeddedLanguage) => Generator<import("type-fest").LiteralUnion<"sql" | "css" | "js" | "jsx" | "es" | "es6" | "mjs" | "cjs" | "pac" | "javascript" | "glsl" | "shader" | "graphql" | "gql" | "html" | "xhtml" | "ini" | "cfg" | "pro" | "java" | "json" | "jsonl" | "jsonata" | "latex" | "tex" | "aux" | "cls" | "bbl" | "bib" | "toc" | "sty" | "md" | "markdown" | "nginx" | "pegjs" | "peggy" | "peg" | "ts" | "tsx" | "cts" | "mts" | "typescript" | "php" | "php5" | "prisma" | "properties" | "pug" | "jade" | "ruby" | "sh" | "toml" | "xml" | "opml" | "rss" | "svg" | "yaml" | "yml", string>, void, undefined>;
133
+ export declare function createTagsInOptionsGenerator(options: Options, tag?: string): (embeddedLanguage: EmbeddedLanguage) => Generator<import("type-fest").LiteralUnion<"sql" | "css" | "js" | "jsx" | "es" | "es6" | "mjs" | "cjs" | "pac" | "javascript" | "glsl" | "shader" | "graphql" | "gql" | "html" | "xhtml" | "ini" | "cfg" | "pro" | "java" | "json" | "jsonl" | "jsonata" | "latex" | "tex" | "aux" | "cls" | "bbl" | "bib" | "toc" | "sty" | "md" | "markdown" | "nginx" | "pegjs" | "peggy" | "peg" | "ts" | "tsx" | "cts" | "mts" | "typescript" | "php" | "php5" | "prisma" | "properties" | "pug" | "jade" | "ruby" | "sh" | "toml" | "xml" | "opml" | "rss" | "svg" | "yaml" | "yml", string>, void, undefined>;
134
+ export declare function createEmbeddedDoc(embeddedLanguage: EmbeddedLanguage, commentOrTag: EmbeddedComment | EmbeddedTag, kind: "comment" | "tag", options: Options): ReturnType<Exclude<Printer["embed"], undefined>>;
135
+ export declare function assumeAs<T>(_: unknown): asserts _ is T;
136
+ export declare function compareObjects<T1 extends Record<string | number | symbol, unknown>, T2 extends Record<string | number | symbol, unknown>>(value1: T1, value2: T2, ignoreSet?: Set<keyof T1 | keyof T2>): boolean;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "prettier-plugin-embed",
3
- "description": "A configurable Prettier plugin to format embedded languages in js/ts files.",
3
+ "description": "A configurable Prettier plugin to format embedded languages in JS/TS files.",
4
4
  "private": false,
5
- "version": "0.4.10",
5
+ "version": "0.4.11",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "./dist"
@@ -58,9 +58,9 @@
58
58
  "access": "public"
59
59
  },
60
60
  "scripts": {
61
- "prepare": "patch-package",
62
61
  "update-hooks": "simple-git-hooks",
63
- "bump": "bumpp",
62
+ "changeset": "changeset",
63
+ "bump": "changeset version 2>/dev/null | grep . && npm i",
64
64
  "dev": "vite",
65
65
  "lint": "biome lint .",
66
66
  "type-check": "tsc --noEmit --emitDeclarationOnly false",
@@ -88,6 +88,7 @@
88
88
  },
89
89
  "devDependencies": {
90
90
  "@biomejs/biome": "1.5.3",
91
+ "@changesets/cli": "^2.27.1",
91
92
  "@commitlint/cli": "^18.4.4",
92
93
  "@commitlint/config-conventional": "^18.4.4",
93
94
  "@prettier/plugin-php": "^0.22.1",
@@ -99,7 +100,6 @@
99
100
  "@vitest/coverage-istanbul": "^1.2.1",
100
101
  "@vitest/ui": "^1.2.1",
101
102
  "@xml-tools/parser": "^1.0.11",
102
- "bumpp": "^9.3.0",
103
103
  "chevrotain": "7.1.1",
104
104
  "concurrently": "^8.2.2",
105
105
  "copy-files-from-to": "^3.9.1",
@@ -107,7 +107,6 @@
107
107
  "fast-glob": "^3.3.2",
108
108
  "lint-staged": "^15.2.0",
109
109
  "npm-check-updates": "^16.14.12",
110
- "patch-package": "^8.0.0",
111
110
  "prettier": "^3.2.4",
112
111
  "prettier-plugin-glsl": "^0.1.3",
113
112
  "prettier-plugin-ini": "^1.1.0",