@qualcomm-ui/changesets-cli 1.0.1 → 1.0.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/README.md +12 -12
- package/dist/cli.cjs +150 -206
- package/dist/cli.cjs.map +3 -3
- package/dist/create-github-releases.d.ts.map +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/dist/utils.d.ts +5 -19
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -10919,7 +10919,7 @@ var require_doc = __commonJS({
|
|
|
10919
10919
|
type: "cursor",
|
|
10920
10920
|
placeholder: Symbol("cursor")
|
|
10921
10921
|
};
|
|
10922
|
-
function
|
|
10922
|
+
function join5(sep, arr) {
|
|
10923
10923
|
const res = [];
|
|
10924
10924
|
for (let i = 0; i < arr.length; i++) {
|
|
10925
10925
|
if (i !== 0) {
|
|
@@ -10949,7 +10949,7 @@ var require_doc = __commonJS({
|
|
|
10949
10949
|
}
|
|
10950
10950
|
module22.exports = {
|
|
10951
10951
|
concat,
|
|
10952
|
-
join:
|
|
10952
|
+
join: join5,
|
|
10953
10953
|
line,
|
|
10954
10954
|
softline,
|
|
10955
10955
|
hardline,
|
|
@@ -11141,7 +11141,7 @@ var require_doc = __commonJS({
|
|
|
11141
11141
|
var getLast = require_get_last();
|
|
11142
11142
|
var {
|
|
11143
11143
|
literalline,
|
|
11144
|
-
join:
|
|
11144
|
+
join: join5
|
|
11145
11145
|
} = require_doc_builders();
|
|
11146
11146
|
var isConcat = (doc) => Array.isArray(doc) || doc && doc.type === "concat";
|
|
11147
11147
|
var getDocParts = (doc) => {
|
|
@@ -11454,7 +11454,7 @@ var require_doc = __commonJS({
|
|
|
11454
11454
|
}
|
|
11455
11455
|
function replaceTextEndOfLine(text) {
|
|
11456
11456
|
let replacement = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : literalline;
|
|
11457
|
-
return
|
|
11457
|
+
return join5(replacement, text.split("\n")).parts;
|
|
11458
11458
|
}
|
|
11459
11459
|
function canBreakFn(doc) {
|
|
11460
11460
|
if (doc.type === "line") {
|
|
@@ -121791,7 +121791,7 @@ var require_prettier = __commonJS({
|
|
|
121791
121791
|
tokenize: function tokenize(value) {
|
|
121792
121792
|
return value.split("");
|
|
121793
121793
|
},
|
|
121794
|
-
join: function
|
|
121794
|
+
join: function join5(chars) {
|
|
121795
121795
|
return chars.join("");
|
|
121796
121796
|
}
|
|
121797
121797
|
};
|
|
@@ -127710,7 +127710,7 @@ ${frame}`;
|
|
|
127710
127710
|
breakParent,
|
|
127711
127711
|
indent,
|
|
127712
127712
|
lineSuffix,
|
|
127713
|
-
join:
|
|
127713
|
+
join: join5,
|
|
127714
127714
|
cursor
|
|
127715
127715
|
}
|
|
127716
127716
|
} = require_doc();
|
|
@@ -128092,9 +128092,9 @@ ${frame}`;
|
|
|
128092
128092
|
return "";
|
|
128093
128093
|
}
|
|
128094
128094
|
if (sameIndent) {
|
|
128095
|
-
return
|
|
128095
|
+
return join5(hardline, parts);
|
|
128096
128096
|
}
|
|
128097
|
-
return indent([hardline,
|
|
128097
|
+
return indent([hardline, join5(hardline, parts)]);
|
|
128098
128098
|
}
|
|
128099
128099
|
function printCommentsSeparately(path3, options, ignored) {
|
|
128100
128100
|
const value = path3.getValue();
|
|
@@ -142439,7 +142439,7 @@ ${fromBody}`;
|
|
|
142439
142439
|
} = require_util();
|
|
142440
142440
|
var {
|
|
142441
142441
|
builders: {
|
|
142442
|
-
join:
|
|
142442
|
+
join: join5,
|
|
142443
142443
|
hardline,
|
|
142444
142444
|
softline,
|
|
142445
142445
|
group,
|
|
@@ -142552,7 +142552,7 @@ ${fromBody}`;
|
|
|
142552
142552
|
maxColumnWidths[index] = Math.max(maxColumnWidths[index], getStringWidth(cell));
|
|
142553
142553
|
}
|
|
142554
142554
|
}
|
|
142555
|
-
parts.push(lineSuffixBoundary, "`", indent([hardline,
|
|
142555
|
+
parts.push(lineSuffixBoundary, "`", indent([hardline, join5(hardline, table.map((row) => join5(" | ", row.cells.map((cell, index) => row.hasLineBreak ? cell : cell + " ".repeat(maxColumnWidths[index] - getStringWidth(cell))))))]), hardline, "`");
|
|
142556
142556
|
return parts;
|
|
142557
142557
|
}
|
|
142558
142558
|
}
|
|
@@ -142696,7 +142696,7 @@ ${fromBody}`;
|
|
|
142696
142696
|
var {
|
|
142697
142697
|
builders: {
|
|
142698
142698
|
indent,
|
|
142699
|
-
join:
|
|
142699
|
+
join: join5,
|
|
142700
142700
|
hardline
|
|
142701
142701
|
}
|
|
142702
142702
|
} = require_doc();
|
|
@@ -142752,7 +142752,7 @@ ${fromBody}`;
|
|
|
142752
142752
|
parts.push(expressionDoc);
|
|
142753
142753
|
}
|
|
142754
142754
|
}
|
|
142755
|
-
return ["`", indent([hardline,
|
|
142755
|
+
return ["`", indent([hardline, join5(hardline, parts)]), hardline, "`"];
|
|
142756
142756
|
}
|
|
142757
142757
|
function printGraphqlComments(lines) {
|
|
142758
142758
|
const parts = [];
|
|
@@ -142769,7 +142769,7 @@ ${fromBody}`;
|
|
|
142769
142769
|
}
|
|
142770
142770
|
seenComment = true;
|
|
142771
142771
|
}
|
|
142772
|
-
return parts.length === 0 ? null :
|
|
142772
|
+
return parts.length === 0 ? null : join5(hardline, parts);
|
|
142773
142773
|
}
|
|
142774
142774
|
module22.exports = format2;
|
|
142775
142775
|
}
|
|
@@ -144429,7 +144429,7 @@ ${fromBody}`;
|
|
|
144429
144429
|
"use strict";
|
|
144430
144430
|
var {
|
|
144431
144431
|
builders: {
|
|
144432
|
-
join:
|
|
144432
|
+
join: join5,
|
|
144433
144433
|
line,
|
|
144434
144434
|
group,
|
|
144435
144435
|
softline,
|
|
@@ -144446,7 +144446,7 @@ ${fromBody}`;
|
|
|
144446
144446
|
}
|
|
144447
144447
|
if (options.__isVueForBindingLeft) {
|
|
144448
144448
|
return path3.call((functionDeclarationPath) => {
|
|
144449
|
-
const printed =
|
|
144449
|
+
const printed = join5([",", line], functionDeclarationPath.map(print, "params"));
|
|
144450
144450
|
const {
|
|
144451
144451
|
params
|
|
144452
144452
|
} = functionDeclarationPath.getValue();
|
|
@@ -144457,7 +144457,7 @@ ${fromBody}`;
|
|
|
144457
144457
|
}, "program", "body", 0);
|
|
144458
144458
|
}
|
|
144459
144459
|
if (options.__isVueBindings) {
|
|
144460
|
-
return path3.call((functionDeclarationPath) =>
|
|
144460
|
+
return path3.call((functionDeclarationPath) => join5([",", line], functionDeclarationPath.map(print, "params")), "program", "body", 0);
|
|
144461
144461
|
}
|
|
144462
144462
|
}
|
|
144463
144463
|
function isVueEventBindingExpression(node) {
|
|
@@ -144493,7 +144493,7 @@ ${fromBody}`;
|
|
|
144493
144493
|
} = require_util();
|
|
144494
144494
|
var {
|
|
144495
144495
|
builders: {
|
|
144496
|
-
join:
|
|
144496
|
+
join: join5,
|
|
144497
144497
|
line,
|
|
144498
144498
|
softline,
|
|
144499
144499
|
group,
|
|
@@ -144575,7 +144575,7 @@ ${fromBody}`;
|
|
|
144575
144575
|
const shouldInline = shouldInlineLogicalExpression(node);
|
|
144576
144576
|
const lineBeforeOperator = (node.operator === "|>" || node.type === "NGPipeExpression" || node.operator === "|" && options.parser === "__vue_expression") && !hasLeadingOwnLineComment(options.originalText, node.right);
|
|
144577
144577
|
const operator = node.type === "NGPipeExpression" ? "|" : node.operator;
|
|
144578
|
-
const rightSuffix = node.type === "NGPipeExpression" && node.arguments.length > 0 ? group(indent([line, ": ",
|
|
144578
|
+
const rightSuffix = node.type === "NGPipeExpression" && node.arguments.length > 0 ? group(indent([line, ": ", join5([line, ": "], path3.map(print, "arguments").map((arg) => align(2, group(arg))))])) : "";
|
|
144579
144579
|
let right;
|
|
144580
144580
|
if (shouldInline) {
|
|
144581
144581
|
right = [operator, " ", print("right"), rightSuffix];
|
|
@@ -144625,7 +144625,7 @@ ${fromBody}`;
|
|
|
144625
144625
|
"use strict";
|
|
144626
144626
|
var {
|
|
144627
144627
|
builders: {
|
|
144628
|
-
join:
|
|
144628
|
+
join: join5,
|
|
144629
144629
|
line,
|
|
144630
144630
|
group
|
|
144631
144631
|
}
|
|
@@ -144649,7 +144649,7 @@ ${fromBody}`;
|
|
|
144649
144649
|
case "NGPipeExpression":
|
|
144650
144650
|
return printBinaryishExpression(path3, options, print);
|
|
144651
144651
|
case "NGChainedExpression":
|
|
144652
|
-
return group(
|
|
144652
|
+
return group(join5([";", line], path3.map((childPath) => hasNgSideEffect(childPath) ? print() : ["(", print(), ")"], "expressions")));
|
|
144653
144653
|
case "NGEmptyExpression":
|
|
144654
144654
|
return "";
|
|
144655
144655
|
case "NGQuotedExpression":
|
|
@@ -144713,7 +144713,7 @@ ${fromBody}`;
|
|
|
144713
144713
|
fill,
|
|
144714
144714
|
ifBreak,
|
|
144715
144715
|
lineSuffixBoundary,
|
|
144716
|
-
join:
|
|
144716
|
+
join: join5
|
|
144717
144717
|
},
|
|
144718
144718
|
utils: {
|
|
144719
144719
|
willBreak
|
|
@@ -145051,9 +145051,9 @@ ${fromBody}`;
|
|
|
145051
145051
|
case "JSXIdentifier":
|
|
145052
145052
|
return String(node.name);
|
|
145053
145053
|
case "JSXNamespacedName":
|
|
145054
|
-
return
|
|
145054
|
+
return join5(":", [print("namespace"), print("name")]);
|
|
145055
145055
|
case "JSXMemberExpression":
|
|
145056
|
-
return
|
|
145056
|
+
return join5(".", [print("object"), print("property")]);
|
|
145057
145057
|
case "JSXSpreadAttribute":
|
|
145058
145058
|
return printJsxSpreadAttribute(path3, options, print);
|
|
145059
145059
|
case "JSXSpreadChild": {
|
|
@@ -145260,7 +145260,7 @@ ${fromBody}`;
|
|
|
145260
145260
|
type: "cursor",
|
|
145261
145261
|
placeholder: Symbol("cursor")
|
|
145262
145262
|
};
|
|
145263
|
-
function
|
|
145263
|
+
function join5(sep, arr) {
|
|
145264
145264
|
const res = [];
|
|
145265
145265
|
for (let i = 0; i < arr.length; i++) {
|
|
145266
145266
|
if (i !== 0) {
|
|
@@ -145290,7 +145290,7 @@ ${fromBody}`;
|
|
|
145290
145290
|
}
|
|
145291
145291
|
module22.exports = {
|
|
145292
145292
|
concat,
|
|
145293
|
-
join:
|
|
145293
|
+
join: join5,
|
|
145294
145294
|
line,
|
|
145295
145295
|
softline,
|
|
145296
145296
|
hardline,
|
|
@@ -145323,7 +145323,7 @@ ${fromBody}`;
|
|
|
145323
145323
|
var getLast = require_get_last();
|
|
145324
145324
|
var {
|
|
145325
145325
|
literalline,
|
|
145326
|
-
join:
|
|
145326
|
+
join: join5
|
|
145327
145327
|
} = require_doc_builders();
|
|
145328
145328
|
var isConcat = (doc2) => Array.isArray(doc2) || doc2 && doc2.type === "concat";
|
|
145329
145329
|
var getDocParts = (doc2) => {
|
|
@@ -145635,7 +145635,7 @@ ${fromBody}`;
|
|
|
145635
145635
|
return mapDoc(doc2, (currentDoc) => typeof currentDoc === "string" && currentDoc.includes("\n") ? replaceTextEndOfLine(currentDoc) : currentDoc);
|
|
145636
145636
|
}
|
|
145637
145637
|
function replaceTextEndOfLine(text, replacement = literalline) {
|
|
145638
|
-
return
|
|
145638
|
+
return join5(replacement, text.split("\n")).parts;
|
|
145639
145639
|
}
|
|
145640
145640
|
function canBreakFn(doc2) {
|
|
145641
145641
|
if (doc2.type === "line") {
|
|
@@ -145673,7 +145673,7 @@ ${fromBody}`;
|
|
|
145673
145673
|
var {
|
|
145674
145674
|
builders: {
|
|
145675
145675
|
indent,
|
|
145676
|
-
join:
|
|
145676
|
+
join: join5,
|
|
145677
145677
|
line
|
|
145678
145678
|
}
|
|
145679
145679
|
} = require_doc();
|
|
@@ -145723,7 +145723,7 @@ ${fromBody}`;
|
|
|
145723
145723
|
if (!isNonEmptyArray(node.modifiers)) {
|
|
145724
145724
|
return "";
|
|
145725
145725
|
}
|
|
145726
|
-
return [
|
|
145726
|
+
return [join5(" ", path3.map(print, "modifiers")), " "];
|
|
145727
145727
|
}
|
|
145728
145728
|
function adjustClause(node, clause, forceSpace) {
|
|
145729
145729
|
if (node.type === "EmptyStatement") {
|
|
@@ -146106,7 +146106,7 @@ ${fromBody}`;
|
|
|
146106
146106
|
} = require_loc();
|
|
146107
146107
|
var {
|
|
146108
146108
|
builders: {
|
|
146109
|
-
join:
|
|
146109
|
+
join: join5,
|
|
146110
146110
|
hardline,
|
|
146111
146111
|
group,
|
|
146112
146112
|
indent,
|
|
@@ -146250,7 +146250,7 @@ ${fromBody}`;
|
|
|
146250
146250
|
if (groups2.length === 0) {
|
|
146251
146251
|
return "";
|
|
146252
146252
|
}
|
|
146253
|
-
return indent(group([hardline,
|
|
146253
|
+
return indent(group([hardline, join5(hardline, groups2.map(printGroup))]));
|
|
146254
146254
|
}
|
|
146255
146255
|
const printedGroups = groups.map(printGroup);
|
|
146256
146256
|
const oneLine = printedGroups;
|
|
@@ -146290,7 +146290,7 @@ ${fromBody}`;
|
|
|
146290
146290
|
"use strict";
|
|
146291
146291
|
var {
|
|
146292
146292
|
builders: {
|
|
146293
|
-
join:
|
|
146293
|
+
join: join5,
|
|
146294
146294
|
group
|
|
146295
146295
|
}
|
|
146296
146296
|
} = require_doc();
|
|
@@ -146323,7 +146323,7 @@ ${fromBody}`;
|
|
|
146323
146323
|
iterateCallArgumentsPath(path3, () => {
|
|
146324
146324
|
printed.push(print());
|
|
146325
146325
|
});
|
|
146326
|
-
return [isNew ? "new " : "", print("callee"), optional, printFunctionTypeParameters(path3, options, print), "(",
|
|
146326
|
+
return [isNew ? "new " : "", print("callee"), optional, printFunctionTypeParameters(path3, options, print), "(", join5(", ", printed), ")"];
|
|
146327
146327
|
}
|
|
146328
146328
|
const isIdentifierWithFlowAnnotation = (options.parser === "babel" || options.parser === "babel-flow") && node.callee && node.callee.type === "Identifier" && hasFlowAnnotationComment(node.callee.trailingComments);
|
|
146329
146329
|
if (isIdentifierWithFlowAnnotation) {
|
|
@@ -146805,7 +146805,7 @@ ${fromBody}`;
|
|
|
146805
146805
|
var {
|
|
146806
146806
|
builders: {
|
|
146807
146807
|
group,
|
|
146808
|
-
join:
|
|
146808
|
+
join: join5,
|
|
146809
146809
|
line,
|
|
146810
146810
|
softline,
|
|
146811
146811
|
indent,
|
|
@@ -146906,10 +146906,10 @@ ${fromBody}`;
|
|
|
146906
146906
|
return printComments(typePath, printedType, options);
|
|
146907
146907
|
}, "types");
|
|
146908
146908
|
if (shouldHug) {
|
|
146909
|
-
return
|
|
146909
|
+
return join5(" | ", printed);
|
|
146910
146910
|
}
|
|
146911
146911
|
const shouldAddStartLine = shouldIndent && !hasLeadingOwnLineComment(options.originalText, node);
|
|
146912
|
-
const code = [ifBreak([shouldAddStartLine ? line : "", "| "]),
|
|
146912
|
+
const code = [ifBreak([shouldAddStartLine ? line : "", "| "]), join5([line, "| "], printed)];
|
|
146913
146913
|
if (pathNeedsParens(path3, options)) {
|
|
146914
146914
|
return group([indent(code), softline]);
|
|
146915
146915
|
}
|
|
@@ -146984,7 +146984,7 @@ ${fromBody}`;
|
|
|
146984
146984
|
} = require_comments();
|
|
146985
146985
|
var {
|
|
146986
146986
|
builders: {
|
|
146987
|
-
join:
|
|
146987
|
+
join: join5,
|
|
146988
146988
|
line,
|
|
146989
146989
|
hardline,
|
|
146990
146990
|
softline,
|
|
@@ -147026,10 +147026,10 @@ ${fromBody}`;
|
|
|
147026
147026
|
const isArrowFunctionVariable = path3.match((node2) => !(node2[paramsKey].length === 1 && isObjectType(node2[paramsKey][0])), void 0, (node2, name) => name === "typeAnnotation", (node2) => node2.type === "Identifier", isArrowFunctionVariableDeclarator);
|
|
147027
147027
|
const shouldInline = node[paramsKey].length === 0 || !isArrowFunctionVariable && (isParameterInTestCall || node[paramsKey].length === 1 && (node[paramsKey][0].type === "NullableTypeAnnotation" || shouldHugType(node[paramsKey][0])));
|
|
147028
147028
|
if (shouldInline) {
|
|
147029
|
-
return ["<",
|
|
147029
|
+
return ["<", join5(", ", path3.map(print, paramsKey)), printDanglingCommentsForInline(path3, options), ">"];
|
|
147030
147030
|
}
|
|
147031
147031
|
const trailingComma = node.type === "TSTypeParameterInstantiation" ? "" : getFunctionParameters(node).length === 1 && isTSXFile(options) && !node[paramsKey][0].constraint && path3.getParentNode().type === "ArrowFunctionExpression" ? "," : shouldPrintComma(options, "all") ? ifBreak(",") : "";
|
|
147032
|
-
return group(["<", indent([softline,
|
|
147032
|
+
return group(["<", indent([softline, join5([",", line], path3.map(print, paramsKey))]), trailingComma, softline, ">"], {
|
|
147033
147033
|
id: getTypeParametersGroupId(node)
|
|
147034
147034
|
});
|
|
147035
147035
|
}
|
|
@@ -147167,7 +147167,7 @@ ${fromBody}`;
|
|
|
147167
147167
|
indent,
|
|
147168
147168
|
ifBreak,
|
|
147169
147169
|
hardline,
|
|
147170
|
-
join:
|
|
147170
|
+
join: join5,
|
|
147171
147171
|
indentIfBreak
|
|
147172
147172
|
},
|
|
147173
147173
|
utils: {
|
|
@@ -147323,7 +147323,7 @@ ${fromBody}`;
|
|
|
147323
147323
|
if (tailNode.body.type === "SequenceExpression") {
|
|
147324
147324
|
bodyDoc = group(["(", indent([softline, bodyDoc]), softline, ")"]);
|
|
147325
147325
|
}
|
|
147326
|
-
return group([group(indent([isCallee || isAssignmentRhs ? softline : "", group(
|
|
147326
|
+
return group([group(indent([isCallee || isAssignmentRhs ? softline : "", group(join5([" =>", line], signatures), {
|
|
147327
147327
|
shouldBreak
|
|
147328
147328
|
})]), {
|
|
147329
147329
|
id: groupId,
|
|
@@ -147475,7 +147475,7 @@ ${fromBody}`;
|
|
|
147475
147475
|
builders: {
|
|
147476
147476
|
line,
|
|
147477
147477
|
hardline,
|
|
147478
|
-
join:
|
|
147478
|
+
join: join5,
|
|
147479
147479
|
breakParent,
|
|
147480
147480
|
group
|
|
147481
147481
|
}
|
|
@@ -147489,10 +147489,10 @@ ${fromBody}`;
|
|
|
147489
147489
|
} = require_utils7();
|
|
147490
147490
|
function printClassMemberDecorators(path3, options, print) {
|
|
147491
147491
|
const node = path3.getValue();
|
|
147492
|
-
return group([
|
|
147492
|
+
return group([join5(line, path3.map(print, "decorators")), hasNewlineBetweenOrAfterDecorators(node, options) ? hardline : line]);
|
|
147493
147493
|
}
|
|
147494
147494
|
function printDecoratorsBeforeExport(path3, options, print) {
|
|
147495
|
-
return [
|
|
147495
|
+
return [join5(hardline, path3.map(print, "declaration", "decorators")), hardline];
|
|
147496
147496
|
}
|
|
147497
147497
|
function printDecorators(path3, options, print) {
|
|
147498
147498
|
const node = path3.getValue();
|
|
@@ -147503,7 +147503,7 @@ ${fromBody}`;
|
|
|
147503
147503
|
return;
|
|
147504
147504
|
}
|
|
147505
147505
|
const shouldBreak = node.type === "ClassExpression" || node.type === "ClassDeclaration" || hasNewlineBetweenOrAfterDecorators(node, options);
|
|
147506
|
-
return [getParentExportDeclaration(path3) ? hardline : shouldBreak ? breakParent : "",
|
|
147506
|
+
return [getParentExportDeclaration(path3) ? hardline : shouldBreak ? breakParent : "", join5(line, path3.map(print, "decorators")), line];
|
|
147507
147507
|
}
|
|
147508
147508
|
function hasNewlineBetweenOrAfterDecorators(node, options) {
|
|
147509
147509
|
return node.decorators.some((decorator) => hasNewline(options.originalText, locEnd(decorator)));
|
|
@@ -147536,7 +147536,7 @@ ${fromBody}`;
|
|
|
147536
147536
|
} = require_comments();
|
|
147537
147537
|
var {
|
|
147538
147538
|
builders: {
|
|
147539
|
-
join:
|
|
147539
|
+
join: join5,
|
|
147540
147540
|
line,
|
|
147541
147541
|
hardline,
|
|
147542
147542
|
softline,
|
|
@@ -147636,7 +147636,7 @@ ${fromBody}`;
|
|
|
147636
147636
|
}) => marker === listName);
|
|
147637
147637
|
return [shouldIndentOnlyHeritageClauses(node) ? ifBreak(" ", line, {
|
|
147638
147638
|
groupId: getTypeParametersGroupId(node.typeParameters)
|
|
147639
|
-
}) : line, printedLeadingComments, printedLeadingComments && hardline, listName, group(indent([line,
|
|
147639
|
+
}) : line, printedLeadingComments, printedLeadingComments && hardline, listName, group(indent([line, join5([",", line], path3.map(print, listName))]))];
|
|
147640
147640
|
}
|
|
147641
147641
|
function printSuperClass(path3, options, print) {
|
|
147642
147642
|
const printed = print("superClass");
|
|
@@ -147723,7 +147723,7 @@ ${fromBody}`;
|
|
|
147723
147723
|
} = require_util();
|
|
147724
147724
|
var {
|
|
147725
147725
|
builders: {
|
|
147726
|
-
join:
|
|
147726
|
+
join: join5,
|
|
147727
147727
|
line,
|
|
147728
147728
|
group,
|
|
147729
147729
|
indent,
|
|
@@ -147760,7 +147760,7 @@ ${fromBody}`;
|
|
|
147760
147760
|
if (isNonEmptyArray(node.extends)) {
|
|
147761
147761
|
extendsParts.push(shouldIndentOnlyHeritageClauses ? ifBreak(" ", line, {
|
|
147762
147762
|
groupId: getTypeParametersGroupId(node.typeParameters)
|
|
147763
|
-
}) : line, "extends ", (node.extends.length === 1 ? identity : indent)(
|
|
147763
|
+
}) : line, "extends ", (node.extends.length === 1 ? identity : indent)(join5([",", line], path3.map(print, "extends"))));
|
|
147764
147764
|
}
|
|
147765
147765
|
if (node.id && hasComment(node.id, CommentCheckFlags.Trailing) || isNonEmptyArray(node.extends)) {
|
|
147766
147766
|
if (shouldIndentOnlyHeritageClauses) {
|
|
@@ -147790,7 +147790,7 @@ ${fromBody}`;
|
|
|
147790
147790
|
softline,
|
|
147791
147791
|
group,
|
|
147792
147792
|
indent,
|
|
147793
|
-
join:
|
|
147793
|
+
join: join5,
|
|
147794
147794
|
line,
|
|
147795
147795
|
ifBreak,
|
|
147796
147796
|
hardline
|
|
@@ -147931,14 +147931,14 @@ ${fromBody}`;
|
|
|
147931
147931
|
throw new Error(`Unknown specifier type ${JSON.stringify(specifierType)}`);
|
|
147932
147932
|
}
|
|
147933
147933
|
}, "specifiers");
|
|
147934
|
-
parts.push(
|
|
147934
|
+
parts.push(join5(", ", standaloneSpecifiers));
|
|
147935
147935
|
if (groupedSpecifiers.length > 0) {
|
|
147936
147936
|
if (standaloneSpecifiers.length > 0) {
|
|
147937
147937
|
parts.push(", ");
|
|
147938
147938
|
}
|
|
147939
147939
|
const canBreak = groupedSpecifiers.length > 1 || standaloneSpecifiers.length > 0 || node.specifiers.some((node2) => hasComment(node2));
|
|
147940
147940
|
if (canBreak) {
|
|
147941
|
-
parts.push(group(["{", indent([options.bracketSpacing ? line : softline,
|
|
147941
|
+
parts.push(group(["{", indent([options.bracketSpacing ? line : softline, join5([",", line], groupedSpecifiers)]), ifBreak(shouldPrintComma(options) ? "," : ""), options.bracketSpacing ? line : softline, "}"]));
|
|
147942
147942
|
} else {
|
|
147943
147943
|
parts.push(["{", options.bracketSpacing ? " " : "", ...groupedSpecifiers, options.bracketSpacing ? " " : "", "}"]);
|
|
147944
147944
|
}
|
|
@@ -147963,7 +147963,7 @@ ${fromBody}`;
|
|
|
147963
147963
|
function printImportAssertions(path3, options, print) {
|
|
147964
147964
|
const node = path3.getNode();
|
|
147965
147965
|
if (isNonEmptyArray(node.assertions)) {
|
|
147966
|
-
return [" assert {", options.bracketSpacing ? " " : "",
|
|
147966
|
+
return [" assert {", options.bracketSpacing ? " " : "", join5(", ", path3.map(print, "assertions")), options.bracketSpacing ? " " : "", "}"];
|
|
147967
147967
|
}
|
|
147968
147968
|
return "";
|
|
147969
147969
|
}
|
|
@@ -148874,7 +148874,7 @@ ${fromBody}`;
|
|
|
148874
148874
|
} = require_util();
|
|
148875
148875
|
var {
|
|
148876
148876
|
builders: {
|
|
148877
|
-
join:
|
|
148877
|
+
join: join5,
|
|
148878
148878
|
line,
|
|
148879
148879
|
hardline,
|
|
148880
148880
|
softline,
|
|
@@ -148982,7 +148982,7 @@ ${fromBody}`;
|
|
|
148982
148982
|
case "TSTypeAliasDeclaration":
|
|
148983
148983
|
return printTypeAlias(path3, options, print);
|
|
148984
148984
|
case "TSQualifiedName":
|
|
148985
|
-
return
|
|
148985
|
+
return join5(".", [print("left"), print("right")]);
|
|
148986
148986
|
case "TSAbstractMethodDefinition":
|
|
148987
148987
|
case "TSDeclareMethod":
|
|
148988
148988
|
return printClassMethod(path3, options, print);
|
|
@@ -149061,7 +149061,7 @@ ${fromBody}`;
|
|
|
149061
149061
|
case "TSIndexSignature": {
|
|
149062
149062
|
const parent = path3.getParentNode();
|
|
149063
149063
|
const trailingComma = node.parameters.length > 1 ? ifBreak(shouldPrintComma(options) ? "," : "") : "";
|
|
149064
|
-
const parametersGroup = group([indent([softline,
|
|
149064
|
+
const parametersGroup = group([indent([softline, join5([", ", softline], path3.map(print, "parameters"))]), trailingComma, softline]);
|
|
149065
149065
|
return [node.export ? "export " : "", node.accessibility ? [node.accessibility, " "] : "", node.static ? "static " : "", node.readonly ? "readonly " : "", node.declare ? "declare " : "", "[", node.parameters ? parametersGroup : "", node.typeAnnotation ? "]: " : "]", node.typeAnnotation ? print("typeAnnotation") : "", parent.type === "ClassBody" ? semi : ""];
|
|
149066
149066
|
}
|
|
149067
149067
|
case "TSTypePredicate":
|
|
@@ -149233,7 +149233,7 @@ ${fromBody}`;
|
|
|
149233
149233
|
} = require_util();
|
|
149234
149234
|
var {
|
|
149235
149235
|
builders: {
|
|
149236
|
-
join:
|
|
149236
|
+
join: join5,
|
|
149237
149237
|
hardline
|
|
149238
149238
|
},
|
|
149239
149239
|
utils: {
|
|
@@ -149275,7 +149275,7 @@ ${fromBody}`;
|
|
|
149275
149275
|
}
|
|
149276
149276
|
function printIndentableBlockComment(comment) {
|
|
149277
149277
|
const lines = comment.value.split("\n");
|
|
149278
|
-
return ["/*",
|
|
149278
|
+
return ["/*", join5(hardline, lines.map((line, index) => index === 0 ? line.trimEnd() : " " + (index < lines.length - 1 ? line.trim() : line.trimStart()))), "*/"];
|
|
149279
149279
|
}
|
|
149280
149280
|
module22.exports = {
|
|
149281
149281
|
printComment
|
|
@@ -149368,7 +149368,7 @@ ${fromBody}`;
|
|
|
149368
149368
|
} = require_util();
|
|
149369
149369
|
var {
|
|
149370
149370
|
builders: {
|
|
149371
|
-
join:
|
|
149371
|
+
join: join5,
|
|
149372
149372
|
line,
|
|
149373
149373
|
hardline,
|
|
149374
149374
|
softline,
|
|
@@ -149715,7 +149715,7 @@ ${fromBody}`;
|
|
|
149715
149715
|
}, "expressions");
|
|
149716
149716
|
return group(parts2);
|
|
149717
149717
|
}
|
|
149718
|
-
return group(
|
|
149718
|
+
return group(join5([",", line], path3.map(print, "expressions")));
|
|
149719
149719
|
}
|
|
149720
149720
|
case "ThisExpression":
|
|
149721
149721
|
return "this";
|
|
@@ -149838,7 +149838,7 @@ ${fromBody}`;
|
|
|
149838
149838
|
}
|
|
149839
149839
|
return ["catch ", print("body")];
|
|
149840
149840
|
case "SwitchStatement":
|
|
149841
|
-
return [group(["switch (", indent([softline, print("discriminant")]), softline, ")"]), " {", node.cases.length > 0 ? indent([hardline,
|
|
149841
|
+
return [group(["switch (", indent([softline, print("discriminant")]), softline, ")"]), " {", node.cases.length > 0 ? indent([hardline, join5(hardline, path3.map((casePath, index, cases) => {
|
|
149842
149842
|
const caseNode = casePath.getValue();
|
|
149843
149843
|
return [print(), index !== cases.length - 1 && isNextLineEmpty(caseNode, options) ? hardline : ""];
|
|
149844
149844
|
}, "cases"))]) : "", hardline, "}"];
|
|
@@ -149939,7 +149939,7 @@ ${fromBody}`;
|
|
|
149939
149939
|
builders: {
|
|
149940
149940
|
hardline,
|
|
149941
149941
|
indent,
|
|
149942
|
-
join:
|
|
149942
|
+
join: join5
|
|
149943
149943
|
}
|
|
149944
149944
|
} = require_doc();
|
|
149945
149945
|
var preprocess = require_print_preprocess();
|
|
@@ -149953,10 +149953,10 @@ ${fromBody}`;
|
|
|
149953
149953
|
return "[]";
|
|
149954
149954
|
}
|
|
149955
149955
|
const printed = path3.map(() => path3.getValue() === null ? "null" : print(), "elements");
|
|
149956
|
-
return ["[", indent([hardline,
|
|
149956
|
+
return ["[", indent([hardline, join5([",", hardline], printed)]), hardline, "]"];
|
|
149957
149957
|
}
|
|
149958
149958
|
case "ObjectExpression":
|
|
149959
|
-
return node.properties.length === 0 ? "{}" : ["{", indent([hardline,
|
|
149959
|
+
return node.properties.length === 0 ? "{}" : ["{", indent([hardline, join5([",", hardline], path3.map(print, "properties"))]), hardline, "}"];
|
|
149960
149960
|
case "ObjectProperty":
|
|
149961
149961
|
return [print("key"), ": ", print("value")];
|
|
149962
149962
|
case "UnaryExpression":
|
|
@@ -151242,7 +151242,7 @@ ${fromBody}`;
|
|
|
151242
151242
|
} = require_util();
|
|
151243
151243
|
var {
|
|
151244
151244
|
builders: {
|
|
151245
|
-
join:
|
|
151245
|
+
join: join5,
|
|
151246
151246
|
line,
|
|
151247
151247
|
hardline,
|
|
151248
151248
|
softline,
|
|
@@ -151385,10 +151385,10 @@ ${fromBody}`;
|
|
|
151385
151385
|
}
|
|
151386
151386
|
parts.push(print());
|
|
151387
151387
|
}, "nodes");
|
|
151388
|
-
return group(indent(
|
|
151388
|
+
return group(indent(join5(line, parts)));
|
|
151389
151389
|
}
|
|
151390
151390
|
case "media-query": {
|
|
151391
|
-
return [
|
|
151391
|
+
return [join5(" ", path3.map(print, "nodes")), isLastNode(path3, node) ? "" : ","];
|
|
151392
151392
|
}
|
|
151393
151393
|
case "media-type": {
|
|
151394
151394
|
return adjustNumbers(adjustStrings(node.value, options));
|
|
@@ -151418,7 +151418,7 @@ ${fromBody}`;
|
|
|
151418
151418
|
return node.value;
|
|
151419
151419
|
}
|
|
151420
151420
|
case "selector-root": {
|
|
151421
|
-
return group([insideAtRuleNode(path3, "custom-selector") ? [getAncestorNode(path3, "css-atrule").customSelector, line] : "",
|
|
151421
|
+
return group([insideAtRuleNode(path3, "custom-selector") ? [getAncestorNode(path3, "css-atrule").customSelector, line] : "", join5([",", insideAtRuleNode(path3, ["extend", "custom-selector", "nest"]) ? line : hardline], path3.map(print, "nodes"))]);
|
|
151422
151422
|
}
|
|
151423
151423
|
case "selector-selector": {
|
|
151424
151424
|
return group(indent(path3.map(print, "nodes")));
|
|
@@ -151459,7 +151459,7 @@ ${fromBody}`;
|
|
|
151459
151459
|
return [node.namespace ? [node.namespace === true ? "" : node.namespace.trim(), "|"] : "", node.value];
|
|
151460
151460
|
}
|
|
151461
151461
|
case "selector-pseudo": {
|
|
151462
|
-
return [maybeToLowerCase(node.value), isNonEmptyArray(node.nodes) ? group(["(", indent([softline,
|
|
151462
|
+
return [maybeToLowerCase(node.value), isNonEmptyArray(node.nodes) ? group(["(", indent([softline, join5([",", line], path3.map(print, "nodes"))]), softline, ")"]) : ""];
|
|
151463
151463
|
}
|
|
151464
151464
|
case "selector-nesting": {
|
|
151465
151465
|
return node.value;
|
|
@@ -151655,7 +151655,7 @@ ${fromBody}`;
|
|
|
151655
151655
|
case "value-paren_group": {
|
|
151656
151656
|
const parentNode = path3.getParentNode();
|
|
151657
151657
|
if (parentNode && isURLFunctionNode(parentNode) && (node.groups.length === 1 || node.groups.length > 0 && node.groups[0].type === "value-comma_group" && node.groups[0].groups.length > 0 && node.groups[0].groups[0].type === "value-word" && node.groups[0].groups[0].value.startsWith("data:"))) {
|
|
151658
|
-
return [node.open ? print("open") : "",
|
|
151658
|
+
return [node.open ? print("open") : "", join5(",", path3.map(print, "groups")), node.close ? print("close") : ""];
|
|
151659
151659
|
}
|
|
151660
151660
|
if (!node.open) {
|
|
151661
151661
|
const printed2 = path3.map(print, "groups");
|
|
@@ -151675,7 +151675,7 @@ ${fromBody}`;
|
|
|
151675
151675
|
const isConfiguration = isConfigurationNode(node, parentNode);
|
|
151676
151676
|
const shouldBreak = isConfiguration || isSCSSMapItem && !isKey;
|
|
151677
151677
|
const shouldDedent = isConfiguration || isKey;
|
|
151678
|
-
const printed = group([node.open ? print("open") : "", indent([softline,
|
|
151678
|
+
const printed = group([node.open ? print("open") : "", indent([softline, join5([line], path3.map((childPath, index) => {
|
|
151679
151679
|
const child = childPath.getValue();
|
|
151680
151680
|
const isLast = index === node.groups.length - 1;
|
|
151681
151681
|
let printed2 = [print(), isLast ? "" : ","];
|
|
@@ -152047,7 +152047,7 @@ ${fromBody}`;
|
|
|
152047
152047
|
hardline,
|
|
152048
152048
|
ifBreak,
|
|
152049
152049
|
indent,
|
|
152050
|
-
join:
|
|
152050
|
+
join: join5,
|
|
152051
152051
|
line,
|
|
152052
152052
|
softline
|
|
152053
152053
|
},
|
|
@@ -152139,7 +152139,7 @@ ${fromBody}`;
|
|
|
152139
152139
|
return path3.map(print2, "parts");
|
|
152140
152140
|
}
|
|
152141
152141
|
case "Hash": {
|
|
152142
|
-
return
|
|
152142
|
+
return join5(line, path3.map(print2, "pairs"));
|
|
152143
152143
|
}
|
|
152144
152144
|
case "HashPair": {
|
|
152145
152145
|
return [node.key, "=", print2("value")];
|
|
@@ -152375,7 +152375,7 @@ ${fromBody}`;
|
|
|
152375
152375
|
if (isNonEmptyArray(node.program.blockParams)) {
|
|
152376
152376
|
parts.push(printBlockParams(node.program));
|
|
152377
152377
|
}
|
|
152378
|
-
return group([printOpeningBlockOpeningMustache(node), printPath(path3, print2), parts.length > 0 ? indent([line,
|
|
152378
|
+
return group([printOpeningBlockOpeningMustache(node), printPath(path3, print2), parts.length > 0 ? indent([line, join5(line, parts)]) : "", softline, printOpeningBlockClosingMustache(node)]);
|
|
152379
152379
|
}
|
|
152380
152380
|
function printElseBlock(node, options) {
|
|
152381
152381
|
return [options.htmlWhitespaceSensitivity === "ignore" ? hardline : "", printInverseBlockOpeningMustache(node), "else", printInverseBlockClosingMustache(node)];
|
|
@@ -152426,7 +152426,7 @@ ${fromBody}`;
|
|
|
152426
152426
|
return "";
|
|
152427
152427
|
}
|
|
152428
152428
|
function getTextValueParts(value) {
|
|
152429
|
-
return getDocParts(
|
|
152429
|
+
return getDocParts(join5(line, splitByHtmlWhitespace(value)));
|
|
152430
152430
|
}
|
|
152431
152431
|
function splitByHtmlWhitespace(string) {
|
|
152432
152432
|
return string.split(/[\t\n\f\r ]+/);
|
|
@@ -152510,7 +152510,7 @@ ${fromBody}`;
|
|
|
152510
152510
|
if (parts.length === 0) {
|
|
152511
152511
|
return "";
|
|
152512
152512
|
}
|
|
152513
|
-
return
|
|
152513
|
+
return join5(line, parts);
|
|
152514
152514
|
}
|
|
152515
152515
|
function printBlockParams(node) {
|
|
152516
152516
|
return ["as |", node.blockParams.join(" "), "|"];
|
|
@@ -152607,7 +152607,7 @@ ${fromBody}`;
|
|
|
152607
152607
|
"use strict";
|
|
152608
152608
|
var {
|
|
152609
152609
|
builders: {
|
|
152610
|
-
join:
|
|
152610
|
+
join: join5,
|
|
152611
152611
|
hardline,
|
|
152612
152612
|
line,
|
|
152613
152613
|
softline,
|
|
@@ -152652,16 +152652,16 @@ ${fromBody}`;
|
|
|
152652
152652
|
case "OperationDefinition": {
|
|
152653
152653
|
const hasOperation = options.originalText[locStart(node)] !== "{";
|
|
152654
152654
|
const hasName = Boolean(node.name);
|
|
152655
|
-
return [hasOperation ? node.operation : "", hasOperation && hasName ? [" ", print("name")] : "", hasOperation && !hasName && isNonEmptyArray(node.variableDefinitions) ? " " : "", isNonEmptyArray(node.variableDefinitions) ? group(["(", indent([softline,
|
|
152655
|
+
return [hasOperation ? node.operation : "", hasOperation && hasName ? [" ", print("name")] : "", hasOperation && !hasName && isNonEmptyArray(node.variableDefinitions) ? " " : "", isNonEmptyArray(node.variableDefinitions) ? group(["(", indent([softline, join5([ifBreak("", ", "), softline], path3.map(print, "variableDefinitions"))]), softline, ")"]) : "", printDirectives(path3, print, node), node.selectionSet ? !hasOperation && !hasName ? "" : " " : "", print("selectionSet")];
|
|
152656
152656
|
}
|
|
152657
152657
|
case "FragmentDefinition": {
|
|
152658
|
-
return ["fragment ", print("name"), isNonEmptyArray(node.variableDefinitions) ? group(["(", indent([softline,
|
|
152658
|
+
return ["fragment ", print("name"), isNonEmptyArray(node.variableDefinitions) ? group(["(", indent([softline, join5([ifBreak("", ", "), softline], path3.map(print, "variableDefinitions"))]), softline, ")"]) : "", " on ", print("typeCondition"), printDirectives(path3, print, node), " ", print("selectionSet")];
|
|
152659
152659
|
}
|
|
152660
152660
|
case "SelectionSet": {
|
|
152661
|
-
return ["{", indent([hardline,
|
|
152661
|
+
return ["{", indent([hardline, join5(hardline, printSequence(path3, options, print, "selections"))]), hardline, "}"];
|
|
152662
152662
|
}
|
|
152663
152663
|
case "Field": {
|
|
152664
|
-
return group([node.alias ? [print("alias"), ": "] : "", print("name"), node.arguments.length > 0 ? group(["(", indent([softline,
|
|
152664
|
+
return group([node.alias ? [print("alias"), ": "] : "", print("name"), node.arguments.length > 0 ? group(["(", indent([softline, join5([ifBreak("", ", "), softline], printSequence(path3, options, print, "arguments"))]), softline, ")"]) : "", printDirectives(path3, print, node), node.selectionSet ? " " : "", print("selectionSet")]);
|
|
152665
152665
|
}
|
|
152666
152666
|
case "Name": {
|
|
152667
152667
|
return node.value;
|
|
@@ -152675,7 +152675,7 @@ ${fromBody}`;
|
|
|
152675
152675
|
if (lines.every((line2) => line2 === "")) {
|
|
152676
152676
|
lines.length = 0;
|
|
152677
152677
|
}
|
|
152678
|
-
return
|
|
152678
|
+
return join5(hardline, ['"""', ...lines, '"""']);
|
|
152679
152679
|
}
|
|
152680
152680
|
return ['"', node.value.replace(/["\\]/g, "\\$&").replace(/\n/g, "\\n"), '"'];
|
|
152681
152681
|
}
|
|
@@ -152694,17 +152694,17 @@ ${fromBody}`;
|
|
|
152694
152694
|
return ["$", print("name")];
|
|
152695
152695
|
}
|
|
152696
152696
|
case "ListValue": {
|
|
152697
|
-
return group(["[", indent([softline,
|
|
152697
|
+
return group(["[", indent([softline, join5([ifBreak("", ", "), softline], path3.map(print, "values"))]), softline, "]"]);
|
|
152698
152698
|
}
|
|
152699
152699
|
case "ObjectValue": {
|
|
152700
|
-
return group(["{", options.bracketSpacing && node.fields.length > 0 ? " " : "", indent([softline,
|
|
152700
|
+
return group(["{", options.bracketSpacing && node.fields.length > 0 ? " " : "", indent([softline, join5([ifBreak("", ", "), softline], path3.map(print, "fields"))]), softline, ifBreak("", options.bracketSpacing && node.fields.length > 0 ? " " : ""), "}"]);
|
|
152701
152701
|
}
|
|
152702
152702
|
case "ObjectField":
|
|
152703
152703
|
case "Argument": {
|
|
152704
152704
|
return [print("name"), ": ", print("value")];
|
|
152705
152705
|
}
|
|
152706
152706
|
case "Directive": {
|
|
152707
|
-
return ["@", print("name"), node.arguments.length > 0 ? group(["(", indent([softline,
|
|
152707
|
+
return ["@", print("name"), node.arguments.length > 0 ? group(["(", indent([softline, join5([ifBreak("", ", "), softline], printSequence(path3, options, print, "arguments"))]), softline, ")"]) : ""];
|
|
152708
152708
|
}
|
|
152709
152709
|
case "NamedType": {
|
|
152710
152710
|
return print("name");
|
|
@@ -152714,17 +152714,17 @@ ${fromBody}`;
|
|
|
152714
152714
|
}
|
|
152715
152715
|
case "ObjectTypeExtension":
|
|
152716
152716
|
case "ObjectTypeDefinition": {
|
|
152717
|
-
return [print("description"), node.description ? hardline : "", node.kind === "ObjectTypeExtension" ? "extend " : "", "type ", print("name"), node.interfaces.length > 0 ? [" implements ", ...printInterfaces(path3, options, print)] : "", printDirectives(path3, print, node), node.fields.length > 0 ? [" {", indent([hardline,
|
|
152717
|
+
return [print("description"), node.description ? hardline : "", node.kind === "ObjectTypeExtension" ? "extend " : "", "type ", print("name"), node.interfaces.length > 0 ? [" implements ", ...printInterfaces(path3, options, print)] : "", printDirectives(path3, print, node), node.fields.length > 0 ? [" {", indent([hardline, join5(hardline, printSequence(path3, options, print, "fields"))]), hardline, "}"] : ""];
|
|
152718
152718
|
}
|
|
152719
152719
|
case "FieldDefinition": {
|
|
152720
|
-
return [print("description"), node.description ? hardline : "", print("name"), node.arguments.length > 0 ? group(["(", indent([softline,
|
|
152720
|
+
return [print("description"), node.description ? hardline : "", print("name"), node.arguments.length > 0 ? group(["(", indent([softline, join5([ifBreak("", ", "), softline], printSequence(path3, options, print, "arguments"))]), softline, ")"]) : "", ": ", print("type"), printDirectives(path3, print, node)];
|
|
152721
152721
|
}
|
|
152722
152722
|
case "DirectiveDefinition": {
|
|
152723
|
-
return [print("description"), node.description ? hardline : "", "directive ", "@", print("name"), node.arguments.length > 0 ? group(["(", indent([softline,
|
|
152723
|
+
return [print("description"), node.description ? hardline : "", "directive ", "@", print("name"), node.arguments.length > 0 ? group(["(", indent([softline, join5([ifBreak("", ", "), softline], printSequence(path3, options, print, "arguments"))]), softline, ")"]) : "", node.repeatable ? " repeatable" : "", " on ", join5(" | ", path3.map(print, "locations"))];
|
|
152724
152724
|
}
|
|
152725
152725
|
case "EnumTypeExtension":
|
|
152726
152726
|
case "EnumTypeDefinition": {
|
|
152727
|
-
return [print("description"), node.description ? hardline : "", node.kind === "EnumTypeExtension" ? "extend " : "", "enum ", print("name"), printDirectives(path3, print, node), node.values.length > 0 ? [" {", indent([hardline,
|
|
152727
|
+
return [print("description"), node.description ? hardline : "", node.kind === "EnumTypeExtension" ? "extend " : "", "enum ", print("name"), printDirectives(path3, print, node), node.values.length > 0 ? [" {", indent([hardline, join5(hardline, printSequence(path3, options, print, "values"))]), hardline, "}"] : ""];
|
|
152728
152728
|
}
|
|
152729
152729
|
case "EnumValueDefinition": {
|
|
152730
152730
|
return [print("description"), node.description ? hardline : "", print("name"), printDirectives(path3, print, node)];
|
|
@@ -152734,20 +152734,20 @@ ${fromBody}`;
|
|
|
152734
152734
|
}
|
|
152735
152735
|
case "InputObjectTypeExtension":
|
|
152736
152736
|
case "InputObjectTypeDefinition": {
|
|
152737
|
-
return [print("description"), node.description ? hardline : "", node.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", print("name"), printDirectives(path3, print, node), node.fields.length > 0 ? [" {", indent([hardline,
|
|
152737
|
+
return [print("description"), node.description ? hardline : "", node.kind === "InputObjectTypeExtension" ? "extend " : "", "input ", print("name"), printDirectives(path3, print, node), node.fields.length > 0 ? [" {", indent([hardline, join5(hardline, printSequence(path3, options, print, "fields"))]), hardline, "}"] : ""];
|
|
152738
152738
|
}
|
|
152739
152739
|
case "SchemaExtension": {
|
|
152740
|
-
return ["extend schema", printDirectives(path3, print, node), ...node.operationTypes.length > 0 ? [" {", indent([hardline,
|
|
152740
|
+
return ["extend schema", printDirectives(path3, print, node), ...node.operationTypes.length > 0 ? [" {", indent([hardline, join5(hardline, printSequence(path3, options, print, "operationTypes"))]), hardline, "}"] : []];
|
|
152741
152741
|
}
|
|
152742
152742
|
case "SchemaDefinition": {
|
|
152743
|
-
return [print("description"), node.description ? hardline : "", "schema", printDirectives(path3, print, node), " {", node.operationTypes.length > 0 ? indent([hardline,
|
|
152743
|
+
return [print("description"), node.description ? hardline : "", "schema", printDirectives(path3, print, node), " {", node.operationTypes.length > 0 ? indent([hardline, join5(hardline, printSequence(path3, options, print, "operationTypes"))]) : "", hardline, "}"];
|
|
152744
152744
|
}
|
|
152745
152745
|
case "OperationTypeDefinition": {
|
|
152746
152746
|
return [print("operation"), ": ", print("type")];
|
|
152747
152747
|
}
|
|
152748
152748
|
case "InterfaceTypeExtension":
|
|
152749
152749
|
case "InterfaceTypeDefinition": {
|
|
152750
|
-
return [print("description"), node.description ? hardline : "", node.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", print("name"), node.interfaces.length > 0 ? [" implements ", ...printInterfaces(path3, options, print)] : "", printDirectives(path3, print, node), node.fields.length > 0 ? [" {", indent([hardline,
|
|
152750
|
+
return [print("description"), node.description ? hardline : "", node.kind === "InterfaceTypeExtension" ? "extend " : "", "interface ", print("name"), node.interfaces.length > 0 ? [" implements ", ...printInterfaces(path3, options, print)] : "", printDirectives(path3, print, node), node.fields.length > 0 ? [" {", indent([hardline, join5(hardline, printSequence(path3, options, print, "fields"))]), hardline, "}"] : ""];
|
|
152751
152751
|
}
|
|
152752
152752
|
case "FragmentSpread": {
|
|
152753
152753
|
return ["...", print("name"), printDirectives(path3, print, node)];
|
|
@@ -152757,7 +152757,7 @@ ${fromBody}`;
|
|
|
152757
152757
|
}
|
|
152758
152758
|
case "UnionTypeExtension":
|
|
152759
152759
|
case "UnionTypeDefinition": {
|
|
152760
|
-
return group([print("description"), node.description ? hardline : "", group([node.kind === "UnionTypeExtension" ? "extend " : "", "union ", print("name"), printDirectives(path3, print, node), node.types.length > 0 ? [" =", ifBreak("", " "), indent([ifBreak([line, " "]),
|
|
152760
|
+
return group([print("description"), node.description ? hardline : "", group([node.kind === "UnionTypeExtension" ? "extend " : "", "union ", print("name"), printDirectives(path3, print, node), node.types.length > 0 ? [" =", ifBreak("", " "), indent([ifBreak([line, " "]), join5([line, "| "], path3.map(print, "types"))])] : ""])]);
|
|
152761
152761
|
}
|
|
152762
152762
|
case "ScalarTypeExtension":
|
|
152763
152763
|
case "ScalarTypeDefinition": {
|
|
@@ -152777,7 +152777,7 @@ ${fromBody}`;
|
|
|
152777
152777
|
if (node.directives.length === 0) {
|
|
152778
152778
|
return "";
|
|
152779
152779
|
}
|
|
152780
|
-
const printed =
|
|
152780
|
+
const printed = join5(line, path3.map(print, "directives"));
|
|
152781
152781
|
if (node.kind === "FragmentDefinition" || node.kind === "OperationDefinition") {
|
|
152782
152782
|
return group([line, printed]);
|
|
152783
152783
|
}
|
|
@@ -153413,7 +153413,7 @@ ${extracted.content}`;
|
|
|
153413
153413
|
var {
|
|
153414
153414
|
builders: {
|
|
153415
153415
|
breakParent,
|
|
153416
|
-
join:
|
|
153416
|
+
join: join5,
|
|
153417
153417
|
line,
|
|
153418
153418
|
literalline,
|
|
153419
153419
|
markAsRoot,
|
|
@@ -153714,9 +153714,9 @@ ${extracted.content}`;
|
|
|
153714
153714
|
function printTableContents(isCompact) {
|
|
153715
153715
|
const parts = [printRow(contents[0], isCompact), printAlign(isCompact)];
|
|
153716
153716
|
if (contents.length > 1) {
|
|
153717
|
-
parts.push(
|
|
153717
|
+
parts.push(join5(hardlineWithoutBreakParent, contents.slice(1).map((rowContents) => printRow(rowContents, isCompact))));
|
|
153718
153718
|
}
|
|
153719
|
-
return
|
|
153719
|
+
return join5(hardlineWithoutBreakParent, parts);
|
|
153720
153720
|
}
|
|
153721
153721
|
function printAlign(isCompact) {
|
|
153722
153722
|
const align2 = columnMaxWidths.map((width, index) => {
|
|
@@ -154167,7 +154167,7 @@ ${extracted.content}`;
|
|
|
154167
154167
|
builders: {
|
|
154168
154168
|
line,
|
|
154169
154169
|
hardline,
|
|
154170
|
-
join:
|
|
154170
|
+
join: join5
|
|
154171
154171
|
},
|
|
154172
154172
|
utils: {
|
|
154173
154173
|
getDocParts,
|
|
@@ -154521,7 +154521,7 @@ ${extracted.content}`;
|
|
|
154521
154521
|
return tagName === "script" && attributeName === "setup" || tagName === "style" && attributeName === "vars";
|
|
154522
154522
|
}
|
|
154523
154523
|
function getTextValueParts(node, value = node.value) {
|
|
154524
|
-
return node.parent.isWhitespaceSensitive ? node.parent.isIndentationSensitive ? replaceTextEndOfLine(value) : replaceTextEndOfLine(dedentString(htmlTrimPreserveIndentation(value)), hardline) : getDocParts(
|
|
154524
|
+
return node.parent.isWhitespaceSensitive ? node.parent.isIndentationSensitive ? replaceTextEndOfLine(value) : replaceTextEndOfLine(dedentString(htmlTrimPreserveIndentation(value)), hardline) : getDocParts(join5(line, splitByHtmlWhitespace(value)));
|
|
154525
154525
|
}
|
|
154526
154526
|
function isVueScriptTag(node, options) {
|
|
154527
154527
|
return isVueSfcBlock(node, options) && node.name === "script";
|
|
@@ -155816,7 +155816,7 @@ ${extracted.content}`;
|
|
|
155816
155816
|
var {
|
|
155817
155817
|
builders: {
|
|
155818
155818
|
indent,
|
|
155819
|
-
join:
|
|
155819
|
+
join: join5,
|
|
155820
155820
|
line,
|
|
155821
155821
|
softline,
|
|
155822
155822
|
hardline
|
|
@@ -155930,7 +155930,7 @@ ${extracted.content}`;
|
|
|
155930
155930
|
const forceNotToBreakAttrContent = node.type === "element" && node.fullName === "script" && node.attrs.length === 1 && node.attrs[0].fullName === "src" && node.children.length === 0;
|
|
155931
155931
|
const shouldPrintAttributePerLine = options.singleAttributePerLine && node.attrs.length > 1 && !isVueSfcBlock(node, options);
|
|
155932
155932
|
const attributeLine = shouldPrintAttributePerLine ? hardline : line;
|
|
155933
|
-
const parts = [indent([forceNotToBreakAttrContent ? " " : line,
|
|
155933
|
+
const parts = [indent([forceNotToBreakAttrContent ? " " : line, join5(attributeLine, printedAttributes)])];
|
|
155934
155934
|
if (node.firstChild && needsToBorrowParentOpeningTagEndMarker(node.firstChild) || node.isSelfClosing && needsToBorrowLastChildClosingTagEndMarker(node.parent) || forceNotToBreakAttrContent) {
|
|
155935
155935
|
parts.push(node.isSelfClosing ? " " : "");
|
|
155936
155936
|
} else {
|
|
@@ -156164,7 +156164,7 @@ ${extracted.content}`;
|
|
|
156164
156164
|
var {
|
|
156165
156165
|
builders: {
|
|
156166
156166
|
ifBreak,
|
|
156167
|
-
join:
|
|
156167
|
+
join: join5,
|
|
156168
156168
|
line
|
|
156169
156169
|
}
|
|
156170
156170
|
} = require_doc();
|
|
@@ -156199,7 +156199,7 @@ ${extracted.content}`;
|
|
|
156199
156199
|
return index === -1 ? descriptor.length : index;
|
|
156200
156200
|
});
|
|
156201
156201
|
const maxDescriptorLeftLength = getMax(descriptorLeftLengths);
|
|
156202
|
-
return
|
|
156202
|
+
return join5([",", line], urls.map((url, index) => {
|
|
156203
156203
|
const parts = [url];
|
|
156204
156204
|
const descriptor = descriptors[index];
|
|
156205
156205
|
if (descriptor) {
|
|
@@ -157373,7 +157373,7 @@ ${text}`;
|
|
|
157373
157373
|
line,
|
|
157374
157374
|
softline,
|
|
157375
157375
|
hardline,
|
|
157376
|
-
join:
|
|
157376
|
+
join: join5
|
|
157377
157377
|
}
|
|
157378
157378
|
} = require_doc();
|
|
157379
157379
|
var {
|
|
@@ -157396,7 +157396,7 @@ ${text}`;
|
|
|
157396
157396
|
}
|
|
157397
157397
|
const lastItem = getLast(node.children);
|
|
157398
157398
|
const isLastItemEmptyMappingItem = lastItem && lastItem.type === "flowMappingItem" && isEmptyNode(lastItem.key) && isEmptyNode(lastItem.value);
|
|
157399
|
-
return [openMarker, alignWithSpaces(options.tabWidth, [bracketSpacing, printChildren(path3, print, options), options.trailingComma === "none" ? "" : ifBreak(","), hasEndComments(node) ? [hardline,
|
|
157399
|
+
return [openMarker, alignWithSpaces(options.tabWidth, [bracketSpacing, printChildren(path3, print, options), options.trailingComma === "none" ? "" : ifBreak(","), hasEndComments(node) ? [hardline, join5(hardline, path3.map(print, "endComments"))] : ""]), isLastItemEmptyMappingItem ? "" : bracketSpacing, closeMarker];
|
|
157400
157400
|
}
|
|
157401
157401
|
function printChildren(path3, print, options) {
|
|
157402
157402
|
const node = path3.getValue();
|
|
@@ -157418,7 +157418,7 @@ ${text}`;
|
|
|
157418
157418
|
group,
|
|
157419
157419
|
hardline,
|
|
157420
157420
|
ifBreak,
|
|
157421
|
-
join:
|
|
157421
|
+
join: join5,
|
|
157422
157422
|
line
|
|
157423
157423
|
}
|
|
157424
157424
|
} = require_doc();
|
|
@@ -157460,7 +157460,7 @@ ${text}`;
|
|
|
157460
157460
|
return [": ", alignWithSpaces(2, printedValue)];
|
|
157461
157461
|
}
|
|
157462
157462
|
if (hasLeadingComments(value) || !isInlineNode(key.content)) {
|
|
157463
|
-
return ["? ", alignWithSpaces(2, printedKey), hardline,
|
|
157463
|
+
return ["? ", alignWithSpaces(2, printedKey), hardline, join5("", path3.map(print, "value", "leadingComments").map((comment) => [comment, hardline])), ": ", alignWithSpaces(2, printedValue)];
|
|
157464
157464
|
}
|
|
157465
157465
|
if (isSingleLineNode(key.content) && !hasLeadingComments(key.content) && !hasMiddleComments(key.content) && !hasTrailingComment(key.content) && !hasEndComments(key) && !hasLeadingComments(value.content) && !hasMiddleComments(value.content) && !hasEndComments(value) && isAbsolutelyPrintedAsSingleLineNode(value.content, options)) {
|
|
157466
157466
|
return [printedKey, spaceBeforeColon, ": ", printedValue];
|
|
@@ -157544,7 +157544,7 @@ ${text}`;
|
|
|
157544
157544
|
dedentToRoot,
|
|
157545
157545
|
fill,
|
|
157546
157546
|
hardline,
|
|
157547
|
-
join:
|
|
157547
|
+
join: join5,
|
|
157548
157548
|
line,
|
|
157549
157549
|
literalline,
|
|
157550
157550
|
markAsRoot
|
|
@@ -157587,7 +157587,7 @@ ${text}`;
|
|
|
157587
157587
|
if (index === 0) {
|
|
157588
157588
|
contentsParts.push(hardline);
|
|
157589
157589
|
}
|
|
157590
|
-
contentsParts.push(fill(getDocParts(
|
|
157590
|
+
contentsParts.push(fill(getDocParts(join5(line, lineWords))));
|
|
157591
157591
|
if (index !== lineContents.length - 1) {
|
|
157592
157592
|
contentsParts.push(lineWords.length === 0 ? hardline : markAsRoot(literalline));
|
|
157593
157593
|
} else if (node.chomping === "keep" && isLastDescendant) {
|
|
@@ -157613,7 +157613,7 @@ ${text}`;
|
|
|
157613
157613
|
fill,
|
|
157614
157614
|
group,
|
|
157615
157615
|
hardline,
|
|
157616
|
-
join:
|
|
157616
|
+
join: join5,
|
|
157617
157617
|
line,
|
|
157618
157618
|
lineSuffix,
|
|
157619
157619
|
literalline
|
|
@@ -157662,7 +157662,7 @@ ${text}`;
|
|
|
157662
157662
|
const node = path3.getValue();
|
|
157663
157663
|
const parts = [];
|
|
157664
157664
|
if (node.type !== "mappingValue" && hasLeadingComments(node)) {
|
|
157665
|
-
parts.push([
|
|
157665
|
+
parts.push([join5(hardline, path3.map(print, "leadingComments")), hardline]);
|
|
157666
157666
|
}
|
|
157667
157667
|
const {
|
|
157668
157668
|
tag,
|
|
@@ -157689,7 +157689,7 @@ ${text}`;
|
|
|
157689
157689
|
}
|
|
157690
157690
|
}
|
|
157691
157691
|
if (hasMiddleComments(node)) {
|
|
157692
|
-
parts.push([node.middleComments.length === 1 ? "" : hardline,
|
|
157692
|
+
parts.push([node.middleComments.length === 1 ? "" : hardline, join5(hardline, path3.map(print, "middleComments")), hardline]);
|
|
157693
157693
|
}
|
|
157694
157694
|
const parentNode = path3.getParentNode();
|
|
157695
157695
|
if (hasPrettierIgnore(path3)) {
|
|
@@ -157701,7 +157701,7 @@ ${text}`;
|
|
|
157701
157701
|
parts.push(lineSuffix([node.type === "mappingValue" && !node.content ? "" : " ", parentNode.type === "mappingKey" && path3.getParentNode(2).type === "mapping" && isInlineNode(node) ? "" : breakParent, print("trailingComment")]));
|
|
157702
157702
|
}
|
|
157703
157703
|
if (shouldPrintEndComments(node)) {
|
|
157704
|
-
parts.push(alignWithSpaces(node.type === "sequenceItem" ? 2 : 0, [hardline,
|
|
157704
|
+
parts.push(alignWithSpaces(node.type === "sequenceItem" ? 2 : 0, [hardline, join5(hardline, path3.map((path22) => [isPreviousLineEmpty(options.originalText, path22.getValue(), locStart) ? hardline : "", print()], "endComments"))]));
|
|
157705
157705
|
}
|
|
157706
157706
|
parts.push(nextEmptyLine);
|
|
157707
157707
|
return parts;
|
|
@@ -157751,10 +157751,10 @@ ${text}`;
|
|
|
157751
157751
|
if (shouldPrintDocumentBody(node)) {
|
|
157752
157752
|
parts.push(print("body"));
|
|
157753
157753
|
}
|
|
157754
|
-
return
|
|
157754
|
+
return join5(hardline, parts);
|
|
157755
157755
|
}
|
|
157756
157756
|
case "documentHead":
|
|
157757
|
-
return
|
|
157757
|
+
return join5(hardline, [...path3.map(print, "children"), ...path3.map(print, "endComments")]);
|
|
157758
157758
|
case "documentBody": {
|
|
157759
157759
|
const {
|
|
157760
157760
|
children,
|
|
@@ -157771,10 +157771,10 @@ ${text}`;
|
|
|
157771
157771
|
separator = hardline;
|
|
157772
157772
|
}
|
|
157773
157773
|
}
|
|
157774
|
-
return [
|
|
157774
|
+
return [join5(hardline, path3.map(print, "children")), separator, join5(hardline, path3.map(print, "endComments"))];
|
|
157775
157775
|
}
|
|
157776
157776
|
case "directive":
|
|
157777
|
-
return ["%",
|
|
157777
|
+
return ["%", join5(" ", [node.name, ...node.parameters])];
|
|
157778
157778
|
case "comment":
|
|
157779
157779
|
return ["#", node.value];
|
|
157780
157780
|
case "alias":
|
|
@@ -157809,7 +157809,7 @@ ${text}`;
|
|
|
157809
157809
|
}
|
|
157810
157810
|
case "mapping":
|
|
157811
157811
|
case "sequence":
|
|
157812
|
-
return
|
|
157812
|
+
return join5(hardline, path3.map(print, "children"));
|
|
157813
157813
|
case "sequenceItem":
|
|
157814
157814
|
return ["- ", alignWithSpaces(2, node.content ? print("content") : "")];
|
|
157815
157815
|
case "mappingKey":
|
|
@@ -157846,7 +157846,7 @@ ${text}`;
|
|
|
157846
157846
|
}
|
|
157847
157847
|
function printFlowScalarContent(nodeType, content, options) {
|
|
157848
157848
|
const lineContents = getFlowScalarLineContents(nodeType, content, options);
|
|
157849
|
-
return
|
|
157849
|
+
return join5(hardline, lineContents.map((lineContentWords) => fill(getDocParts(join5(line, lineContentWords)))));
|
|
157850
157850
|
}
|
|
157851
157851
|
function clean(node, newNode) {
|
|
157852
157852
|
if (isNode(newNode)) {
|
|
@@ -158809,6 +158809,7 @@ var source_default = chalk;
|
|
|
158809
158809
|
// src/create-github-releases.ts
|
|
158810
158810
|
var import_node_child_process2 = require("node:child_process");
|
|
158811
158811
|
var import_promises3 = require("node:fs/promises");
|
|
158812
|
+
var import_node_path2 = require("node:path");
|
|
158812
158813
|
async function parseChangelog(path3) {
|
|
158813
158814
|
const content = await (0, import_promises3.readFile)(path3, "utf-8");
|
|
158814
158815
|
const lines = content.split("\n");
|
|
@@ -158847,7 +158848,7 @@ async function createGitHubReleases(options) {
|
|
|
158847
158848
|
const repoOpts = options.repo ? { owner: options.repo.split("/")[0], repo: options.repo.split("/")[1] } : getRepoFromGitRemote();
|
|
158848
158849
|
const packages = await getPublishablePackages(options.configPath);
|
|
158849
158850
|
for (const pkg of packages) {
|
|
158850
|
-
const changelogPath =
|
|
158851
|
+
const changelogPath = (0, import_node_path2.join)(pkg.dir, "CHANGELOG.md");
|
|
158851
158852
|
const changelog = await parseChangelog(changelogPath).catch(() => null);
|
|
158852
158853
|
if (!changelog) {
|
|
158853
158854
|
console.warn(
|
|
@@ -158886,7 +158887,7 @@ async function createGitHubReleases(options) {
|
|
|
158886
158887
|
// src/generate-release-notes.ts
|
|
158887
158888
|
var import_promises4 = require("node:fs/promises");
|
|
158888
158889
|
var import_node_os2 = require("node:os");
|
|
158889
|
-
var
|
|
158890
|
+
var import_node_path3 = require("node:path");
|
|
158890
158891
|
var RELEASE_NOTES_FILENAME = "release-notes.md";
|
|
158891
158892
|
function extractLatestEntry(content, fallbackName) {
|
|
158892
158893
|
const lines = content.split("\n");
|
|
@@ -158923,7 +158924,7 @@ function isDepsOnlyEntry(sections) {
|
|
|
158923
158924
|
return hasOnlyChoresHeader && allDepsBullets && bulletLines.length > 0;
|
|
158924
158925
|
}
|
|
158925
158926
|
function getReleaseNotesPath() {
|
|
158926
|
-
return (0,
|
|
158927
|
+
return (0, import_node_path3.join)((0, import_node_os2.tmpdir)(), RELEASE_NOTES_FILENAME);
|
|
158927
158928
|
}
|
|
158928
158929
|
async function generateReleaseNotes() {
|
|
158929
158930
|
const changedChangelogs = getChangedChangelogs();
|
|
@@ -161891,7 +161892,7 @@ ${summary}
|
|
|
161891
161892
|
var import_get_packages3 = require("@manypkg/get-packages");
|
|
161892
161893
|
var import_node_child_process4 = require("node:child_process");
|
|
161893
161894
|
var import_node_fs = require("node:fs");
|
|
161894
|
-
var
|
|
161895
|
+
var import_node_path4 = require("node:path");
|
|
161895
161896
|
|
|
161896
161897
|
// src/utils.ts
|
|
161897
161898
|
var import_node_child_process3 = require("node:child_process");
|
|
@@ -161959,6 +161960,7 @@ function extractConventionalCommits(commitMessage) {
|
|
|
161959
161960
|
}
|
|
161960
161961
|
function conventionalMessagesWithCommitsToChangesets(conventionalMessagesToCommits, options) {
|
|
161961
161962
|
const { ignoredFiles = [], includeCommitLinks, packages } = options;
|
|
161963
|
+
const repoRoot = getRepoRoot();
|
|
161962
161964
|
return conventionalMessagesToCommits.flatMap((entry) => {
|
|
161963
161965
|
const filesChanged = getFilesChangedSince({
|
|
161964
161966
|
from: entry.commitHashes[0],
|
|
@@ -161969,7 +161971,7 @@ function conventionalMessagesWithCommitsToChangesets(conventionalMessagesToCommi
|
|
|
161969
161971
|
);
|
|
161970
161972
|
});
|
|
161971
161973
|
const packagesChanged = packages.filter((pkg) => {
|
|
161972
|
-
const pkgPath = pkg.dir.replace(`${
|
|
161974
|
+
const pkgPath = pkg.dir.replace(/\\/g, "/").replace(`${repoRoot}/`, "");
|
|
161973
161975
|
return filesChanged.some((file) => file.startsWith(`${pkgPath}/`));
|
|
161974
161976
|
});
|
|
161975
161977
|
if (packagesChanged.length === 0) {
|
|
@@ -162004,42 +162006,14 @@ commit: ${hash.slice(0, 7)}` : conventionalCommit
|
|
|
162004
162006
|
function gitFetch(branch) {
|
|
162005
162007
|
(0, import_node_child_process3.execSync)(`git fetch origin ${branch}`);
|
|
162006
162008
|
}
|
|
162007
|
-
function
|
|
162008
|
-
return (0, import_node_child_process3.execSync)(
|
|
162009
|
+
function getCommitsSinceCommit(sha) {
|
|
162010
|
+
return (0, import_node_child_process3.execSync)(`git rev-list ${sha}..HEAD`).toString().split("\n").filter(Boolean).reverse();
|
|
162009
162011
|
}
|
|
162010
|
-
function
|
|
162012
|
+
function getCommitsSinceBranch(branch) {
|
|
162011
162013
|
gitFetch(branch);
|
|
162012
|
-
const
|
|
162013
|
-
let sinceRef = `origin/${branch}`;
|
|
162014
|
-
if (currentBranch === branch) {
|
|
162015
|
-
try {
|
|
162016
|
-
sinceRef = (0, import_node_child_process3.execSync)("git describe --tags --abbrev=0").toString();
|
|
162017
|
-
} catch (e) {
|
|
162018
|
-
console.log(
|
|
162019
|
-
"No git tags found, using repo's first commit for automated change detection. Note: this may take a while."
|
|
162020
|
-
);
|
|
162021
|
-
sinceRef = (0, import_node_child_process3.execSync)("git rev-list --max-parents=0 HEAD").toString();
|
|
162022
|
-
}
|
|
162023
|
-
}
|
|
162024
|
-
sinceRef = sinceRef.trim();
|
|
162014
|
+
const sinceRef = `origin/${branch}`;
|
|
162025
162015
|
return (0, import_node_child_process3.execSync)(`git rev-list ${sinceRef}..HEAD`).toString().split("\n").filter(Boolean).reverse();
|
|
162026
162016
|
}
|
|
162027
|
-
function tagExists(tag) {
|
|
162028
|
-
try {
|
|
162029
|
-
(0, import_node_child_process3.execSync)(`git rev-parse --verify refs/tags/${tag}`, { stdio: "pipe" });
|
|
162030
|
-
return true;
|
|
162031
|
-
} catch {
|
|
162032
|
-
return false;
|
|
162033
|
-
}
|
|
162034
|
-
}
|
|
162035
|
-
function getCommitsSincePackageRelease(packageName, version, baseBranch) {
|
|
162036
|
-
const releaseTag = `${packageName}@${version}`;
|
|
162037
|
-
if (tagExists(releaseTag)) {
|
|
162038
|
-
return (0, import_node_child_process3.execSync)(`git rev-list ${releaseTag}..HEAD`).toString().split("\n").filter(Boolean).reverse();
|
|
162039
|
-
}
|
|
162040
|
-
gitFetch(baseBranch);
|
|
162041
|
-
return (0, import_node_child_process3.execSync)(`git rev-list origin/${baseBranch}..HEAD`).toString().split("\n").filter(Boolean).reverse();
|
|
162042
|
-
}
|
|
162043
162017
|
function compareChangeSet(a, b) {
|
|
162044
162018
|
return a.summary.replace(/\n$/, "") === b.summary && JSON.stringify(a.releases) === JSON.stringify(b.releases);
|
|
162045
162019
|
}
|
|
@@ -162050,7 +162024,7 @@ function difference(a, b) {
|
|
|
162050
162024
|
}
|
|
162051
162025
|
|
|
162052
162026
|
// src/main.ts
|
|
162053
|
-
var CHANGESET_CONFIG_LOCATION = (0,
|
|
162027
|
+
var CHANGESET_CONFIG_LOCATION = (0, import_node_path4.join)(".changeset", "config.json");
|
|
162054
162028
|
function getCommitsWithMessages(commitHashes) {
|
|
162055
162029
|
return commitHashes.map((commitHash) => {
|
|
162056
162030
|
const commitMessage = (0, import_node_child_process4.execSync)(
|
|
@@ -162065,53 +162039,25 @@ function getCommitsWithMessages(commitHashes) {
|
|
|
162065
162039
|
async function conventionalCommitChangeset(options, cwd = process.cwd()) {
|
|
162066
162040
|
const configLocation = options.configPath ?? CHANGESET_CONFIG_LOCATION;
|
|
162067
162041
|
const changesetConfig = JSON.parse(
|
|
162068
|
-
(0, import_node_fs.readFileSync)((0,
|
|
162042
|
+
(0, import_node_fs.readFileSync)((0, import_node_path4.join)(cwd, configLocation)).toString()
|
|
162069
162043
|
);
|
|
162070
162044
|
const ignored = changesetConfig.ignore ?? [];
|
|
162071
162045
|
const packages = (0, import_get_packages3.getPackagesSync)(cwd).packages.filter(
|
|
162072
162046
|
(pkg) => Boolean(pkg.packageJson.version) && !ignored.includes(pkg.packageJson.name)
|
|
162073
162047
|
);
|
|
162074
162048
|
const { baseBranch = "main" } = changesetConfig;
|
|
162075
|
-
const {
|
|
162076
|
-
|
|
162077
|
-
|
|
162078
|
-
|
|
162079
|
-
|
|
162080
|
-
|
|
162081
|
-
|
|
162082
|
-
|
|
162083
|
-
|
|
162084
|
-
|
|
162085
|
-
|
|
162086
|
-
|
|
162087
|
-
baseBranch
|
|
162088
|
-
);
|
|
162089
|
-
const commitsWithMessages = getCommitsWithMessages(commitsSinceRelease);
|
|
162090
|
-
const changelogMessages = translateCommitsToConventionalCommitMessages(commitsWithMessages);
|
|
162091
|
-
return conventionalMessagesWithCommitsToChangesets(changelogMessages, {
|
|
162092
|
-
ignoredFiles: ignored,
|
|
162093
|
-
includeCommitLinks,
|
|
162094
|
-
packages: [pkg]
|
|
162095
|
-
});
|
|
162096
|
-
});
|
|
162097
|
-
changesets = allChangesets.filter(
|
|
162098
|
-
(changeset, index, self2) => index === self2.findIndex(
|
|
162099
|
-
(c) => c.summary === changeset.summary && JSON.stringify(c.releases) === JSON.stringify(changeset.releases)
|
|
162100
|
-
)
|
|
162101
|
-
);
|
|
162102
|
-
} else {
|
|
162103
|
-
const commitsSinceBase = getCommitsSinceRef(baseBranch);
|
|
162104
|
-
const commitsWithMessages = getCommitsWithMessages(commitsSinceBase);
|
|
162105
|
-
const changelogMessagesWithAssociatedCommits = translateCommitsToConventionalCommitMessages(commitsWithMessages);
|
|
162106
|
-
changesets = conventionalMessagesWithCommitsToChangesets(
|
|
162107
|
-
changelogMessagesWithAssociatedCommits,
|
|
162108
|
-
{
|
|
162109
|
-
ignoredFiles: ignored,
|
|
162110
|
-
includeCommitLinks,
|
|
162111
|
-
packages
|
|
162112
|
-
}
|
|
162113
|
-
);
|
|
162114
|
-
}
|
|
162049
|
+
const { commitSha, includeCommitLinks } = options;
|
|
162050
|
+
const commitsSinceRef = commitSha ? getCommitsSinceCommit(commitSha) : getCommitsSinceBranch(baseBranch);
|
|
162051
|
+
const commitsWithMessages = getCommitsWithMessages(commitsSinceRef);
|
|
162052
|
+
const changelogMessages = translateCommitsToConventionalCommitMessages(commitsWithMessages);
|
|
162053
|
+
const changesets = conventionalMessagesWithCommitsToChangesets(
|
|
162054
|
+
changelogMessages,
|
|
162055
|
+
{
|
|
162056
|
+
ignoredFiles: ignored,
|
|
162057
|
+
includeCommitLinks,
|
|
162058
|
+
packages
|
|
162059
|
+
}
|
|
162060
|
+
);
|
|
162115
162061
|
const currentChangesets = await getChangesets(cwd);
|
|
162116
162062
|
const newChangesets = currentChangesets.length === 0 ? changesets : difference(changesets, currentChangesets);
|
|
162117
162063
|
await Promise.all(
|
|
@@ -162127,8 +162073,8 @@ function buildSteps(options) {
|
|
|
162127
162073
|
description: "Generate changesets from conventional commits",
|
|
162128
162074
|
name: "changeset-generate",
|
|
162129
162075
|
run: () => conventionalCommitChangeset({
|
|
162076
|
+
commitSha: options.commitSha,
|
|
162130
162077
|
configPath: options.config,
|
|
162131
|
-
fromReleaseTags: options.fromReleaseTags,
|
|
162132
162078
|
includeCommitLinks: options.includeCommitLinks
|
|
162133
162079
|
})
|
|
162134
162080
|
},
|
|
@@ -162196,9 +162142,8 @@ program.command("prep-release").description("Run all prep-release steps sequenti
|
|
|
162196
162142
|
"Pause after each step and wait for confirmation before continuing",
|
|
162197
162143
|
false
|
|
162198
162144
|
).option(
|
|
162199
|
-
"--
|
|
162200
|
-
"Diff each package
|
|
162201
|
-
false
|
|
162145
|
+
"--commit-sha <sha>",
|
|
162146
|
+
"Diff each package against the target commit instead of the repository's base branch"
|
|
162202
162147
|
).option(
|
|
162203
162148
|
"--include-commit-links",
|
|
162204
162149
|
"Embed commit hashes in changeset summaries for changelog links",
|
|
@@ -162212,9 +162157,8 @@ program.command("prep-release").description("Run all prep-release steps sequenti
|
|
|
162212
162157
|
"Path to the changesets config file, relative to the project root"
|
|
162213
162158
|
).action((options) => run(options));
|
|
162214
162159
|
program.command("changeset-generate").description("Generate changesets from conventional commits").option(
|
|
162215
|
-
"--
|
|
162216
|
-
"Diff each package
|
|
162217
|
-
false
|
|
162160
|
+
"--commit-sha <sha>",
|
|
162161
|
+
"Diff each package against the target commit instead of the repository's base branch"
|
|
162218
162162
|
).option(
|
|
162219
162163
|
"--include-commit-links",
|
|
162220
162164
|
"Embed commit hashes in changeset summaries for changelog links",
|