@sentry/craft 3.11.0 → 3.11.2
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/dist/craft +62 -27
- package/package.json +1 -1
package/dist/craft
CHANGED
|
@@ -61025,24 +61025,28 @@ async function getDefaultBranch(git, remoteName) {
|
|
|
61025
61025
|
);
|
|
61026
61026
|
}
|
|
61027
61027
|
async function getLatestTag(git, tagPrefix = "") {
|
|
61028
|
-
return
|
|
61028
|
+
return findLatestTag(git, tagPrefix, () => true);
|
|
61029
61029
|
}
|
|
61030
61030
|
async function getLatestStableTag(git, tagPrefix = "") {
|
|
61031
|
-
return findLatestTag(git, tagPrefix, (tagVersion) => !tagVersion
|
|
61031
|
+
return findLatestTag(git, tagPrefix, (tagVersion) => !tagVersion.pre);
|
|
61032
61032
|
}
|
|
61033
61033
|
async function getChangelogBaseTag(git, version2, tagPrefix = "") {
|
|
61034
61034
|
const release3 = parseVersion(version2);
|
|
61035
61035
|
return findLatestTag(
|
|
61036
61036
|
git,
|
|
61037
61037
|
tagPrefix,
|
|
61038
|
-
(tagVersion) => !tagVersion
|
|
61038
|
+
(tagVersion) => !tagVersion.pre || !!release3?.pre && tagVersion.major === release3.major && tagVersion.minor === release3.minor && tagVersion.patch === release3.patch
|
|
61039
61039
|
);
|
|
61040
61040
|
}
|
|
61041
61041
|
async function findLatestTag(git, tagPrefix, accept) {
|
|
61042
61042
|
const skippedTags = [];
|
|
61043
61043
|
for (; ; ) {
|
|
61044
61044
|
const tag2 = await describeLatestTag(git, tagPrefix, skippedTags);
|
|
61045
|
-
if (!tag2
|
|
61045
|
+
if (!tag2) {
|
|
61046
|
+
return tag2;
|
|
61047
|
+
}
|
|
61048
|
+
const tagVersion = parseVersion(tag2.slice(tagPrefix.length));
|
|
61049
|
+
if (tagVersion && accept(tagVersion)) {
|
|
61046
61050
|
return tag2;
|
|
61047
61051
|
}
|
|
61048
61052
|
skippedTags.push(tag2);
|
|
@@ -121857,13 +121861,13 @@ async function fetchPRFiles(prNumber) {
|
|
|
121857
121861
|
function authorLogins(nodes = []) {
|
|
121858
121862
|
return nodes.map((node3) => node3.user?.login).filter((login) => Boolean(login));
|
|
121859
121863
|
}
|
|
121860
|
-
async function fetchPRCoAuthors(
|
|
121864
|
+
async function fetchPRCoAuthors(prNumbers) {
|
|
121861
121865
|
const { repo, owner } = await getGlobalGitHubConfig();
|
|
121862
|
-
|
|
121863
|
-
|
|
121864
|
-
|
|
121865
|
-
|
|
121866
|
-
|
|
121866
|
+
const coAuthors = {};
|
|
121867
|
+
for (let start = 0; start < prNumbers.length; start += MAX_PRS_PER_QUERY) {
|
|
121868
|
+
const subset = prNumbers.slice(start, start + MAX_PRS_PER_QUERY);
|
|
121869
|
+
const prsQuery = subset.map(
|
|
121870
|
+
(number2) => `P${number2}: pullRequest(number: ${Number(number2)}) {
|
|
121867
121871
|
commits(first: ${MAX_PR_COMMITS}) {
|
|
121868
121872
|
nodes {
|
|
121869
121873
|
commit {
|
|
@@ -121871,20 +121875,34 @@ async function fetchPRCoAuthors(prNumber) {
|
|
|
121871
121875
|
}
|
|
121872
121876
|
}
|
|
121873
121877
|
}
|
|
121878
|
+
}`
|
|
121879
|
+
).join("\n");
|
|
121880
|
+
let response;
|
|
121881
|
+
try {
|
|
121882
|
+
response = await getGitHubClient().graphql(
|
|
121883
|
+
`query($owner: String!, $repo: String!) {
|
|
121884
|
+
repository(owner: $owner, name: $repo) {
|
|
121885
|
+
${prsQuery}
|
|
121874
121886
|
}
|
|
121875
|
-
}
|
|
121876
|
-
|
|
121877
|
-
|
|
121878
|
-
)
|
|
121879
|
-
|
|
121880
|
-
|
|
121881
|
-
|
|
121882
|
-
|
|
121883
|
-
|
|
121884
|
-
|
|
121885
|
-
|
|
121886
|
-
|
|
121887
|
+
}`,
|
|
121888
|
+
{ owner, repo }
|
|
121889
|
+
);
|
|
121890
|
+
} catch (error3) {
|
|
121891
|
+
logger.warn(
|
|
121892
|
+
`Failed to fetch co-authors for PRs ${subset.map((n5) => `#${n5}`).join(", ")}: ${error3.message || error3}`
|
|
121893
|
+
);
|
|
121894
|
+
response = error3.data;
|
|
121895
|
+
}
|
|
121896
|
+
for (const number2 of subset) {
|
|
121897
|
+
const pr3 = response?.repository?.[`P${number2}`];
|
|
121898
|
+
if (pr3) {
|
|
121899
|
+
coAuthors[number2] = pr3.commits.nodes.flatMap(
|
|
121900
|
+
(node3) => authorLogins(node3.commit.authors.nodes)
|
|
121901
|
+
);
|
|
121902
|
+
}
|
|
121903
|
+
}
|
|
121887
121904
|
}
|
|
121905
|
+
return coAuthors;
|
|
121888
121906
|
}
|
|
121889
121907
|
function isBumpType(value) {
|
|
121890
121908
|
return BUMP_TYPES.has(value);
|
|
@@ -122559,7 +122577,7 @@ async function generateChangelogWithHighlight(git, rev, currentPRNumber) {
|
|
|
122559
122577
|
body: prInfo.body,
|
|
122560
122578
|
author: prInfo.author,
|
|
122561
122579
|
authorIsBot: prInfo.authorIsBot,
|
|
122562
|
-
coAuthors: await fetchPRCoAuthors(
|
|
122580
|
+
coAuthors: (await fetchPRCoAuthors([currentPRStr]))[currentPRStr],
|
|
122563
122581
|
pr: currentPRStr,
|
|
122564
122582
|
prTitle: prInfo.title,
|
|
122565
122583
|
prBody: prInfo.body,
|
|
@@ -122635,6 +122653,15 @@ async function fetchRawCommitInfo(git, rev, until) {
|
|
|
122635
122653
|
}
|
|
122636
122654
|
result.push(commit);
|
|
122637
122655
|
}
|
|
122656
|
+
const withoutCoAuthors = [...seenPRs.values()].filter(
|
|
122657
|
+
(commit) => !commit.coAuthors?.length
|
|
122658
|
+
);
|
|
122659
|
+
const prCoAuthors = await fetchPRCoAuthors(
|
|
122660
|
+
withoutCoAuthors.map((commit) => String(commit.pr))
|
|
122661
|
+
);
|
|
122662
|
+
for (const commit of withoutCoAuthors) {
|
|
122663
|
+
commit.coAuthors = prCoAuthors[String(commit.pr)] ?? commit.coAuthors;
|
|
122664
|
+
}
|
|
122638
122665
|
return result;
|
|
122639
122666
|
}
|
|
122640
122667
|
function categorizeCommits(rawCommits) {
|
|
@@ -123057,7 +123084,7 @@ async function getPRAndLabelsFromCommit(hashes) {
|
|
|
123057
123084
|
})
|
|
123058
123085
|
);
|
|
123059
123086
|
}
|
|
123060
|
-
var import_fs12, import_path12, BUMP_TYPES, DEFAULT_CHANGELOG_PATH, DEFAULT_UNRELEASED_TITLE, SKIP_CHANGELOG_MAGIC_WORD, DEFAULT_CHANGESET_BODY, VERSION_HEADER_LEVEL, SUBSECTION_HEADER_LEVEL, SCOPE_HEADER_LEVEL, MAX_COMMITS_PER_QUERY, MAX_PR_COMMITS, MAX_COMMIT_AUTHORS, MAX_CREDITED_AUTHORS, MAX_LEFTOVERS, DEFAULT_RELEASE_CONFIG, releaseConfigCache, SHORT_SHA_LENGTH, changesetCache, rawChangesetCache;
|
|
123087
|
+
var import_fs12, import_path12, BUMP_TYPES, DEFAULT_CHANGELOG_PATH, DEFAULT_UNRELEASED_TITLE, SKIP_CHANGELOG_MAGIC_WORD, DEFAULT_CHANGESET_BODY, VERSION_HEADER_LEVEL, SUBSECTION_HEADER_LEVEL, SCOPE_HEADER_LEVEL, MAX_COMMITS_PER_QUERY, MAX_PR_COMMITS, MAX_PRS_PER_QUERY, MAX_COMMIT_AUTHORS, MAX_CREDITED_AUTHORS, MAX_LEFTOVERS, DEFAULT_RELEASE_CONFIG, releaseConfigCache, SHORT_SHA_LENGTH, changesetCache, rawChangesetCache;
|
|
123061
123088
|
var init_changelog = __esm({
|
|
123062
123089
|
"src/utils/changelog.ts"() {
|
|
123063
123090
|
"use strict";
|
|
@@ -123087,6 +123114,7 @@ var init_changelog = __esm({
|
|
|
123087
123114
|
SCOPE_HEADER_LEVEL = SUBSECTION_HEADER_LEVEL + 1;
|
|
123088
123115
|
MAX_COMMITS_PER_QUERY = 50;
|
|
123089
123116
|
MAX_PR_COMMITS = 100;
|
|
123117
|
+
MAX_PRS_PER_QUERY = 25;
|
|
123090
123118
|
MAX_COMMIT_AUTHORS = 10;
|
|
123091
123119
|
MAX_CREDITED_AUTHORS = 3;
|
|
123092
123120
|
MAX_LEFTOVERS = 24;
|
|
@@ -123629,7 +123657,8 @@ _This changelog has been truncated. See the [full changelog](${permalink}) for a
|
|
|
123629
123657
|
* Creates or updates floating tags for the release.
|
|
123630
123658
|
*
|
|
123631
123659
|
* Floating tags (like "v2") point to the latest release in a major version line.
|
|
123632
|
-
* They are force-updated if they already exist.
|
|
123660
|
+
* They are force-updated if they already exist. Prereleases leave them
|
|
123661
|
+
* unchanged, so users pinned to a floating tag only get stable releases.
|
|
123633
123662
|
*
|
|
123634
123663
|
* @param version The version being released
|
|
123635
123664
|
* @param revision Git commit SHA to point the tags to
|
|
@@ -123646,6 +123675,12 @@ _This changelog has been truncated. See the [full changelog](${permalink}) for a
|
|
|
123646
123675
|
);
|
|
123647
123676
|
return;
|
|
123648
123677
|
}
|
|
123678
|
+
if (parsedVersion.pre) {
|
|
123679
|
+
this.logger.info(
|
|
123680
|
+
`Not updating floating tags because "${version2}" is a prerelease.`
|
|
123681
|
+
);
|
|
123682
|
+
return;
|
|
123683
|
+
}
|
|
123649
123684
|
for (const pattern of floatingTags) {
|
|
123650
123685
|
const tag2 = this.resolveFloatingTag(pattern, parsedVersion);
|
|
123651
123686
|
const tagRef = `refs/tags/${tag2}`;
|
|
@@ -230887,7 +230922,7 @@ var require_package7 = __commonJS({
|
|
|
230887
230922
|
"package.json"(exports2, module2) {
|
|
230888
230923
|
module2.exports = {
|
|
230889
230924
|
name: "@sentry/craft",
|
|
230890
|
-
version: "3.11.
|
|
230925
|
+
version: "3.11.2",
|
|
230891
230926
|
description: "The universal sentry workflow CLI",
|
|
230892
230927
|
main: "dist/craft",
|
|
230893
230928
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -231095,7 +231130,7 @@ function getPackage() {
|
|
|
231095
231130
|
}
|
|
231096
231131
|
function getPackageVersion3() {
|
|
231097
231132
|
const { version: version2 } = getPackage();
|
|
231098
|
-
const buildInfo = "
|
|
231133
|
+
const buildInfo = "9567926a606072678ef367b02445c4f99f374795";
|
|
231099
231134
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
231100
231135
|
}
|
|
231101
231136
|
function semVerToString(s8) {
|