@sentry/craft 2.25.0 → 2.25.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 +156 -60
- package/package.json +3 -1
package/dist/craft
CHANGED
|
@@ -28167,7 +28167,7 @@ var init_esm6 = __esm({
|
|
|
28167
28167
|
}
|
|
28168
28168
|
});
|
|
28169
28169
|
|
|
28170
|
-
// node_modules/.pnpm/brace-expansion@5.0.
|
|
28170
|
+
// node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js
|
|
28171
28171
|
function numeric(str2) {
|
|
28172
28172
|
return !isNaN(str2) ? parseInt(str2, 10) : str2.charCodeAt(0);
|
|
28173
28173
|
}
|
|
@@ -28261,7 +28261,7 @@ function expand_(str2, max, isTop) {
|
|
|
28261
28261
|
const x5 = numeric(n4[0]);
|
|
28262
28262
|
const y4 = numeric(n4[1]);
|
|
28263
28263
|
const width = Math.max(n4[0].length, n4[1].length);
|
|
28264
|
-
let incr = n4.length === 3 && n4[2] !== void 0 ? Math.abs(numeric(n4[2])) : 1;
|
|
28264
|
+
let incr = n4.length === 3 && n4[2] !== void 0 ? Math.max(Math.abs(numeric(n4[2])), 1) : 1;
|
|
28265
28265
|
let test = lte;
|
|
28266
28266
|
const reverse = y4 < x5;
|
|
28267
28267
|
if (reverse) {
|
|
@@ -28312,7 +28312,7 @@ function expand_(str2, max, isTop) {
|
|
|
28312
28312
|
}
|
|
28313
28313
|
var escSlash, escOpen, escClose, escComma, escPeriod, escSlashPattern, escOpenPattern, escClosePattern, escCommaPattern, escPeriodPattern, slashPattern, openPattern, closePattern, commaPattern, periodPattern, EXPANSION_MAX;
|
|
28314
28314
|
var init_esm7 = __esm({
|
|
28315
|
-
"node_modules/.pnpm/brace-expansion@5.0.
|
|
28315
|
+
"node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js"() {
|
|
28316
28316
|
init_import_meta_url();
|
|
28317
28317
|
init_esm6();
|
|
28318
28318
|
escSlash = "\0SLASH" + Math.random() + "\0";
|
|
@@ -114423,7 +114423,11 @@ var init_docker = __esm({
|
|
|
114423
114423
|
init_base5();
|
|
114424
114424
|
DEFAULT_DOCKER_BIN = "docker";
|
|
114425
114425
|
DOCKER_BIN = process.env.DOCKER_BIN || DEFAULT_DOCKER_BIN;
|
|
114426
|
-
DOCKER_HUB_REGISTRIES = [
|
|
114426
|
+
DOCKER_HUB_REGISTRIES = [
|
|
114427
|
+
"docker.io",
|
|
114428
|
+
"index.docker.io",
|
|
114429
|
+
"registry-1.docker.io"
|
|
114430
|
+
];
|
|
114427
114431
|
GCR_REGISTRY_PATTERNS = [
|
|
114428
114432
|
/^gcr\.io$/,
|
|
114429
114433
|
/^[a-z]+-gcr\.io$/,
|
|
@@ -114614,17 +114618,28 @@ Please use ${registryHint}DOCKER_USERNAME and DOCKER_PASSWORD environment variab
|
|
|
114614
114618
|
return false;
|
|
114615
114619
|
}
|
|
114616
114620
|
if (!hasGcloudCredentials()) {
|
|
114617
|
-
this.logger.debug(
|
|
114621
|
+
this.logger.debug(
|
|
114622
|
+
"No gcloud credentials detected, skipping gcloud auth configure-docker"
|
|
114623
|
+
);
|
|
114618
114624
|
return false;
|
|
114619
114625
|
}
|
|
114620
114626
|
if (!await isGcloudAvailable()) {
|
|
114621
|
-
this.logger.debug(
|
|
114627
|
+
this.logger.debug(
|
|
114628
|
+
"gcloud CLI not available, skipping gcloud auth configure-docker"
|
|
114629
|
+
);
|
|
114622
114630
|
return false;
|
|
114623
114631
|
}
|
|
114624
114632
|
const registryList = registries.join(",");
|
|
114625
|
-
this.logger.debug(
|
|
114633
|
+
this.logger.debug(
|
|
114634
|
+
`Configuring Docker for Google Cloud registries: ${registryList}`
|
|
114635
|
+
);
|
|
114626
114636
|
try {
|
|
114627
|
-
await spawnProcess(
|
|
114637
|
+
await spawnProcess(
|
|
114638
|
+
"gcloud",
|
|
114639
|
+
["auth", "configure-docker", registryList, "--quiet"],
|
|
114640
|
+
{},
|
|
114641
|
+
{}
|
|
114642
|
+
);
|
|
114628
114643
|
this.logger.info(`Configured Docker authentication for: ${registryList}`);
|
|
114629
114644
|
return true;
|
|
114630
114645
|
} catch (error3) {
|
|
@@ -114665,7 +114680,9 @@ Please use ${registryHint}DOCKER_USERNAME and DOCKER_PASSWORD environment variab
|
|
|
114665
114680
|
await this.loginToRegistry(source.credentials);
|
|
114666
114681
|
} else if (sourceRegistry && !source.skipLogin && !gcrConfiguredRegistries.has(sourceRegistry) && // Don't warn if source and target share the same registry - target login will cover it
|
|
114667
114682
|
sourceRegistry !== targetRegistry) {
|
|
114668
|
-
this.logger.debug(
|
|
114683
|
+
this.logger.debug(
|
|
114684
|
+
`No credentials for source registry ${sourceRegistry}, assuming public`
|
|
114685
|
+
);
|
|
114669
114686
|
}
|
|
114670
114687
|
if (target.credentials) {
|
|
114671
114688
|
await this.loginToRegistry(target.credentials);
|
|
@@ -116557,6 +116574,14 @@ function parseTokensToEntries(tokens) {
|
|
|
116557
116574
|
prev.nestedContent = prev.nestedContent ? `${prev.nestedContent}
|
|
116558
116575
|
${codeBlock}` : codeBlock;
|
|
116559
116576
|
}
|
|
116577
|
+
} else if (token.type === "html") {
|
|
116578
|
+
const htmlContent = token.raw.trim();
|
|
116579
|
+
if (htmlContent && entries.length > 0) {
|
|
116580
|
+
const indented = htmlContent.split("\n").map((line) => ` ${line}`).join("\n");
|
|
116581
|
+
const prev = entries[entries.length - 1];
|
|
116582
|
+
prev.nestedContent = prev.nestedContent ? `${prev.nestedContent}
|
|
116583
|
+
${indented}` : indented;
|
|
116584
|
+
}
|
|
116560
116585
|
}
|
|
116561
116586
|
}
|
|
116562
116587
|
return entries.length > 0 ? entries : null;
|
|
@@ -125210,24 +125235,22 @@ function castChecksums(checksums) {
|
|
|
125210
125235
|
'Invalid type of "checksums": should be an array'
|
|
125211
125236
|
);
|
|
125212
125237
|
}
|
|
125213
|
-
return checksums.map(
|
|
125214
|
-
(item)
|
|
125215
|
-
|
|
125216
|
-
|
|
125217
|
-
|
|
125218
|
-
);
|
|
125219
|
-
}
|
|
125220
|
-
if (!Object.values(HashAlgorithm).includes(item.algorithm) || !Object.values(HashOutputFormat).includes(item.format)) {
|
|
125221
|
-
throw new ConfigurationError(
|
|
125222
|
-
`Invalid checksum type: ${JSON.stringify(item)}`
|
|
125223
|
-
);
|
|
125224
|
-
}
|
|
125225
|
-
return {
|
|
125226
|
-
algorithm: item.algorithm,
|
|
125227
|
-
format: item.format
|
|
125228
|
-
};
|
|
125238
|
+
return checksums.map((item) => {
|
|
125239
|
+
if (typeof item !== "object" || !item.algorithm || !item.format) {
|
|
125240
|
+
throw new ConfigurationError(
|
|
125241
|
+
`Invalid checksum type: ${JSON.stringify(item)}`
|
|
125242
|
+
);
|
|
125229
125243
|
}
|
|
125230
|
-
|
|
125244
|
+
if (!Object.values(HashAlgorithm).includes(item.algorithm) || !Object.values(HashOutputFormat).includes(item.format)) {
|
|
125245
|
+
throw new ConfigurationError(
|
|
125246
|
+
`Invalid checksum type: ${JSON.stringify(item)}`
|
|
125247
|
+
);
|
|
125248
|
+
}
|
|
125249
|
+
return {
|
|
125250
|
+
algorithm: item.algorithm,
|
|
125251
|
+
format: item.format
|
|
125252
|
+
};
|
|
125253
|
+
});
|
|
125231
125254
|
}
|
|
125232
125255
|
async function getArtifactChecksums(checksums, artifact, artifactProvider) {
|
|
125233
125256
|
const fileChecksums = {};
|
|
@@ -156223,7 +156246,9 @@ async function getRegionsFromAws() {
|
|
|
156223
156246
|
path: "/?Action=DescribeRegions&Version=2013-10-15"
|
|
156224
156247
|
});
|
|
156225
156248
|
const url2 = `https://${hostname3}${path19}`;
|
|
156226
|
-
const response = await (0, import_node_fetch4.default)(url2, {
|
|
156249
|
+
const response = await (0, import_node_fetch4.default)(url2, {
|
|
156250
|
+
headers
|
|
156251
|
+
});
|
|
156227
156252
|
if (!response.ok) {
|
|
156228
156253
|
throw new Error(
|
|
156229
156254
|
`Unexpected HTTP response from ${url2}: ${response.status} (${response.statusText})`
|
|
@@ -159052,7 +159077,7 @@ var require_package6 = __commonJS({
|
|
|
159052
159077
|
"package.json"(exports2, module2) {
|
|
159053
159078
|
module2.exports = {
|
|
159054
159079
|
name: "@sentry/craft",
|
|
159055
|
-
version: "2.25.
|
|
159080
|
+
version: "2.25.2",
|
|
159056
159081
|
description: "The universal sentry workflow CLI",
|
|
159057
159082
|
main: "dist/craft",
|
|
159058
159083
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -159134,6 +159159,8 @@ var require_package6 = __commonJS({
|
|
|
159134
159159
|
clean: "rm -rf dist coverage",
|
|
159135
159160
|
lint: "eslint --cache --cache-strategy content",
|
|
159136
159161
|
fix: "pnpm lint --fix",
|
|
159162
|
+
format: "prettier --write .",
|
|
159163
|
+
"format:check": "prettier --check .",
|
|
159137
159164
|
test: "vitest run",
|
|
159138
159165
|
"test:watch": "vitest",
|
|
159139
159166
|
typecheck: "tsc --noEmit",
|
|
@@ -159221,7 +159248,7 @@ function getPackage() {
|
|
|
159221
159248
|
}
|
|
159222
159249
|
function getPackageVersion() {
|
|
159223
159250
|
const { version: version2 } = getPackage();
|
|
159224
|
-
const buildInfo = "
|
|
159251
|
+
const buildInfo = "ba01e596c4a4c07692f0de10b0d4fe05f3dd0292";
|
|
159225
159252
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
159226
159253
|
}
|
|
159227
159254
|
function semVerToString(s6) {
|
|
@@ -167200,7 +167227,9 @@ async function calculateCalVer(git, config3) {
|
|
|
167200
167227
|
const date2 = /* @__PURE__ */ new Date();
|
|
167201
167228
|
date2.setDate(date2.getDate() - config3.offset);
|
|
167202
167229
|
const datePart = formatCalVerDate(date2, config3.format);
|
|
167203
|
-
logger.debug(
|
|
167230
|
+
logger.debug(
|
|
167231
|
+
`CalVer: using date ${date2.toISOString()}, date part: ${datePart}`
|
|
167232
|
+
);
|
|
167204
167233
|
const gitTagPrefix = getGitTagPrefix();
|
|
167205
167234
|
const searchPrefix = `${gitTagPrefix}${datePart}.`;
|
|
167206
167235
|
logger.debug(`CalVer: searching for tags with prefix: ${searchPrefix}`);
|
|
@@ -167897,15 +167926,30 @@ async function pushReleaseBranch(git, branchName, remoteName, pushFlag = true) {
|
|
|
167897
167926
|
);
|
|
167898
167927
|
}
|
|
167899
167928
|
}
|
|
167900
|
-
async function
|
|
167929
|
+
async function commitChanges(git, newVersion, preReleaseCommandRan) {
|
|
167901
167930
|
const message = `release: ${newVersion}`;
|
|
167931
|
+
if (preReleaseCommandRan) {
|
|
167932
|
+
const repoStatus2 = await git.status();
|
|
167933
|
+
if (!(repoStatus2.created.length || repoStatus2.modified.length || repoStatus2.staged.length)) {
|
|
167934
|
+
reportError(
|
|
167935
|
+
"Nothing to commit: has the pre-release command done its job?"
|
|
167936
|
+
);
|
|
167937
|
+
}
|
|
167938
|
+
logger.debug("Committing the release changes...");
|
|
167939
|
+
logger.trace(`Commit message: "${message}"`);
|
|
167940
|
+
await git.commit(message, ["--all"]);
|
|
167941
|
+
return;
|
|
167942
|
+
}
|
|
167902
167943
|
const repoStatus = await git.status();
|
|
167903
|
-
if (!(repoStatus.
|
|
167904
|
-
|
|
167944
|
+
if (!(repoStatus.staged.length || repoStatus.created.length)) {
|
|
167945
|
+
logger.debug(
|
|
167946
|
+
"Nothing to commit: no changelog changes and no version bumping occurred."
|
|
167947
|
+
);
|
|
167948
|
+
return;
|
|
167905
167949
|
}
|
|
167906
167950
|
logger.debug("Committing the release changes...");
|
|
167907
167951
|
logger.trace(`Commit message: "${message}"`);
|
|
167908
|
-
await git.commit(message
|
|
167952
|
+
await git.commit(message);
|
|
167909
167953
|
}
|
|
167910
167954
|
async function runPreReleaseCommand(options) {
|
|
167911
167955
|
const { oldVersion, newVersion, preReleaseCommand, targets, rootDir } = options;
|
|
@@ -167914,7 +167958,11 @@ async function runPreReleaseCommand(options) {
|
|
|
167914
167958
|
return false;
|
|
167915
167959
|
}
|
|
167916
167960
|
if (preReleaseCommand) {
|
|
167917
|
-
return runCustomPreReleaseCommand(
|
|
167961
|
+
return runCustomPreReleaseCommand(
|
|
167962
|
+
oldVersion,
|
|
167963
|
+
newVersion,
|
|
167964
|
+
preReleaseCommand
|
|
167965
|
+
);
|
|
167918
167966
|
}
|
|
167919
167967
|
if (requiresMinVersion(AUTO_BUMP_MIN_VERSION) && targets && targets.length > 0) {
|
|
167920
167968
|
logger.info("Running automatic version bumping from targets...");
|
|
@@ -167959,10 +168007,15 @@ function checkGitStatus(repoStatus, rev) {
|
|
|
167959
168007
|
logger.info("Checking the local repository status...");
|
|
167960
168008
|
logger.debug("Repository status:", formatJson(repoStatus));
|
|
167961
168009
|
if (isRepoDirty(repoStatus)) {
|
|
167962
|
-
reportError(
|
|
168010
|
+
reportError(
|
|
168011
|
+
"Your repository is in a dirty state. Please stash or commit the pending changes.",
|
|
168012
|
+
logger
|
|
168013
|
+
);
|
|
167963
168014
|
}
|
|
167964
168015
|
if (repoStatus.current !== rev) {
|
|
167965
|
-
logger.warn(
|
|
168016
|
+
logger.warn(
|
|
168017
|
+
`You are releasing from '${rev}', not '${repoStatus.current}' which you are currently on.`
|
|
168018
|
+
);
|
|
167966
168019
|
}
|
|
167967
168020
|
}
|
|
167968
168021
|
async function execPublish(remote, newVersion, noGitChecks) {
|
|
@@ -167976,7 +168029,9 @@ async function execPublish(remote, newVersion, noGitChecks) {
|
|
|
167976
168029
|
noStatusCheck: false,
|
|
167977
168030
|
noGitChecks
|
|
167978
168031
|
};
|
|
167979
|
-
logger.info(
|
|
168032
|
+
logger.info(
|
|
168033
|
+
`Sleeping for ${SLEEP_BEFORE_PUBLISH_SECONDS} seconds before publishing...`
|
|
168034
|
+
);
|
|
167980
168035
|
if (!isDryRun()) {
|
|
167981
168036
|
await sleep(SLEEP_BEFORE_PUBLISH_SECONDS * 1e3);
|
|
167982
168037
|
} else {
|
|
@@ -167996,11 +168051,15 @@ async function execPublish(remote, newVersion, noGitChecks) {
|
|
|
167996
168051
|
}
|
|
167997
168052
|
async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "none" /* None */, changelogPath = DEFAULT_CHANGELOG_PATH) {
|
|
167998
168053
|
if (changelogPolicy === "none" /* None */) {
|
|
167999
|
-
logger.debug(
|
|
168054
|
+
logger.debug(
|
|
168055
|
+
`Changelog policy is set to "${changelogPolicy}", nothing to do.`
|
|
168056
|
+
);
|
|
168000
168057
|
return void 0;
|
|
168001
168058
|
}
|
|
168002
168059
|
if (changelogPolicy !== "auto" /* Auto */ && changelogPolicy !== "simple" /* Simple */) {
|
|
168003
|
-
throw new ConfigurationError(
|
|
168060
|
+
throw new ConfigurationError(
|
|
168061
|
+
`Invalid changelog policy: "${changelogPolicy}"`
|
|
168062
|
+
);
|
|
168004
168063
|
}
|
|
168005
168064
|
logger.info("Checking the changelog...");
|
|
168006
168065
|
logger.debug(`Changelog policy: "${changelogPolicy}".`);
|
|
@@ -168014,11 +168073,17 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
168014
168073
|
logger.info(`Creating changelog file: ${relativePath}`);
|
|
168015
168074
|
await safeFs.writeFile(relativePath, "# Changelog\n");
|
|
168016
168075
|
} else {
|
|
168017
|
-
throw new ConfigurationError(
|
|
168076
|
+
throw new ConfigurationError(
|
|
168077
|
+
`Changelog does not exist: "${changelogPath}"`
|
|
168078
|
+
);
|
|
168018
168079
|
}
|
|
168019
168080
|
}
|
|
168020
168081
|
let changelogString = (await import_fs30.promises.readFile(relativePath)).toString();
|
|
168021
|
-
let changeset = findChangeset(
|
|
168082
|
+
let changeset = findChangeset(
|
|
168083
|
+
changelogString,
|
|
168084
|
+
newVersion,
|
|
168085
|
+
changelogPolicy === "auto" /* Auto */
|
|
168086
|
+
);
|
|
168022
168087
|
switch (changelogPolicy) {
|
|
168023
168088
|
case "auto" /* Auto */:
|
|
168024
168089
|
let replaceSection;
|
|
@@ -168034,7 +168099,9 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
168034
168099
|
replaceSection = changeset.name;
|
|
168035
168100
|
changeset.name = newVersion;
|
|
168036
168101
|
}
|
|
168037
|
-
logger.debug(
|
|
168102
|
+
logger.debug(
|
|
168103
|
+
`Updating the changelog file for the new version: ${newVersion}`
|
|
168104
|
+
);
|
|
168038
168105
|
if (replaceSection) {
|
|
168039
168106
|
changelogString = removeChangeset(changelogString, replaceSection);
|
|
168040
168107
|
changelogString = prependChangeset(changelogString, changeset);
|
|
@@ -168043,7 +168110,9 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
168043
168110
|
break;
|
|
168044
168111
|
default:
|
|
168045
168112
|
if (!changeset?.body) {
|
|
168046
|
-
throw new ConfigurationError(
|
|
168113
|
+
throw new ConfigurationError(
|
|
168114
|
+
`No changelog entry found for version "${newVersion}"`
|
|
168115
|
+
);
|
|
168047
168116
|
}
|
|
168048
168117
|
}
|
|
168049
168118
|
logger.debug("Changelog entry found:", changeset.name);
|
|
@@ -168054,7 +168123,9 @@ async function getChangelogLineRange(git, changelogPath, version2) {
|
|
|
168054
168123
|
try {
|
|
168055
168124
|
const content = await git.show([`HEAD:${changelogPath}`]);
|
|
168056
168125
|
const lines = content.split("\n");
|
|
168057
|
-
const startIdx = lines.findIndex(
|
|
168126
|
+
const startIdx = lines.findIndex(
|
|
168127
|
+
(l4) => l4.trimEnd() === `## ${version2}` || l4.trimEnd() === version2
|
|
168128
|
+
);
|
|
168058
168129
|
if (startIdx < 0) {
|
|
168059
168130
|
return "";
|
|
168060
168131
|
}
|
|
@@ -168132,7 +168203,9 @@ async function resolveVersion(git, options) {
|
|
|
168132
168203
|
}
|
|
168133
168204
|
const currentVersion = latestTag && getVersion(latestTag) || "0.0.0";
|
|
168134
168205
|
const newVersion = calculateNextVersion(currentVersion, bumpType);
|
|
168135
|
-
logger.info(
|
|
168206
|
+
logger.info(
|
|
168207
|
+
`Version bump: ${currentVersion} -> ${newVersion} (${bumpType} bump)`
|
|
168208
|
+
);
|
|
168136
168209
|
return newVersion;
|
|
168137
168210
|
}
|
|
168138
168211
|
return version2;
|
|
@@ -168143,7 +168216,9 @@ async function prepareMain(argv) {
|
|
|
168143
168216
|
logger.info(`Loading configuration from remote branch: ${argv.configFrom}`);
|
|
168144
168217
|
try {
|
|
168145
168218
|
await git.fetch([argv.remote, argv.configFrom]);
|
|
168146
|
-
const configContent = await git.show([
|
|
168219
|
+
const configContent = await git.show([
|
|
168220
|
+
`${argv.remote}/${argv.configFrom}:${CONFIG_FILE_NAME}`
|
|
168221
|
+
]);
|
|
168147
168222
|
loadConfigurationFromString(configContent);
|
|
168148
168223
|
} catch (error3) {
|
|
168149
168224
|
throw new ConfigurationError(
|
|
@@ -168176,7 +168251,13 @@ async function prepareMain(argv) {
|
|
|
168176
168251
|
const isolation = await createDryRunIsolation(git, rev);
|
|
168177
168252
|
git = isolation.git;
|
|
168178
168253
|
try {
|
|
168179
|
-
const branchName = await createReleaseBranch(
|
|
168254
|
+
const branchName = await createReleaseBranch(
|
|
168255
|
+
git,
|
|
168256
|
+
rev,
|
|
168257
|
+
newVersion,
|
|
168258
|
+
argv.remote,
|
|
168259
|
+
config3.releaseBranchPrefix
|
|
168260
|
+
);
|
|
168180
168261
|
const oldVersion = await getLatestTag(git);
|
|
168181
168262
|
const changelogPath = typeof config3.changelog === "string" ? config3.changelog : config3.changelog?.filePath;
|
|
168182
168263
|
const changelogPolicy = typeof config3.changelog === "object" && config3.changelog?.policy ? config3.changelog.policy : config3.changelogPolicy;
|
|
@@ -168187,6 +168268,13 @@ async function prepareMain(argv) {
|
|
|
168187
168268
|
argv.noChangelog ? "none" /* None */ : changelogPolicy,
|
|
168188
168269
|
changelogPath
|
|
168189
168270
|
);
|
|
168271
|
+
if (changelogBody) {
|
|
168272
|
+
const resolvedChangelogPath = (0, import_path28.relative)(
|
|
168273
|
+
"",
|
|
168274
|
+
changelogPath || DEFAULT_CHANGELOG_PATH
|
|
168275
|
+
);
|
|
168276
|
+
await git.add(resolvedChangelogPath);
|
|
168277
|
+
}
|
|
168190
168278
|
const rootDir = getConfigFileDir() || process.cwd();
|
|
168191
168279
|
const preReleaseCommandRan = await runPreReleaseCommand({
|
|
168192
168280
|
oldVersion,
|
|
@@ -168195,11 +168283,7 @@ async function prepareMain(argv) {
|
|
|
168195
168283
|
targets: config3.targets,
|
|
168196
168284
|
rootDir
|
|
168197
168285
|
});
|
|
168198
|
-
|
|
168199
|
-
await commitNewVersion(git, newVersion);
|
|
168200
|
-
} else {
|
|
168201
|
-
logger.debug("Not committing anything since preReleaseCommand is empty.");
|
|
168202
|
-
}
|
|
168286
|
+
await commitChanges(git, newVersion, preReleaseCommandRan);
|
|
168203
168287
|
await isolation.showDiff();
|
|
168204
168288
|
await pushReleaseBranch(git, branchName, argv.remote, !argv.noPush);
|
|
168205
168289
|
const releaseSha = await git.revparse(["HEAD"]);
|
|
@@ -168211,11 +168295,20 @@ async function prepareMain(argv) {
|
|
|
168211
168295
|
const issueChangelog = isCalVer ? disableChangelogMentions(changelogBody) : changelogBody;
|
|
168212
168296
|
writeGitHubActionsFile("changelog", issueChangelog);
|
|
168213
168297
|
const resolvedChangelogPath = changelogPath || DEFAULT_CHANGELOG_PATH;
|
|
168214
|
-
const lineRange = await getChangelogLineRange(
|
|
168298
|
+
const lineRange = await getChangelogLineRange(
|
|
168299
|
+
git,
|
|
168300
|
+
resolvedChangelogPath,
|
|
168301
|
+
newVersion
|
|
168302
|
+
);
|
|
168215
168303
|
const changelogFileUrl = `https://github.com/${githubConfig.owner}/${githubConfig.repo}/blob/${branchName}/${resolvedChangelogPath}` + lineRange;
|
|
168216
|
-
setGitHubActionsOutput(
|
|
168304
|
+
setGitHubActionsOutput(
|
|
168305
|
+
"changelog",
|
|
168306
|
+
truncateForOutput(issueChangelog, changelogFileUrl)
|
|
168307
|
+
);
|
|
168217
168308
|
}
|
|
168218
|
-
logger.info(
|
|
168309
|
+
logger.info(
|
|
168310
|
+
`View diff at: https://github.com/${githubConfig.owner}/${githubConfig.repo}/compare/${branchName}`
|
|
168311
|
+
);
|
|
168219
168312
|
if (argv.publish) {
|
|
168220
168313
|
if (isolation.isIsolated) {
|
|
168221
168314
|
logger.info(`[dry-run] Would run: craft publish ${newVersion}`);
|
|
@@ -168372,10 +168465,13 @@ async function handlerMain(argv) {
|
|
|
168372
168465
|
return void 0;
|
|
168373
168466
|
}
|
|
168374
168467
|
const filesToDownload = argv.all ? artifacts.map((ar2) => ar2.filename) : argv.names;
|
|
168375
|
-
const nameToArtifact = artifacts.reduce(
|
|
168376
|
-
dict
|
|
168377
|
-
|
|
168378
|
-
|
|
168468
|
+
const nameToArtifact = artifacts.reduce(
|
|
168469
|
+
(dict, artifact) => {
|
|
168470
|
+
dict[artifact.filename] = artifact;
|
|
168471
|
+
return dict;
|
|
168472
|
+
},
|
|
168473
|
+
{}
|
|
168474
|
+
);
|
|
168379
168475
|
logger.info(`Fetching artifacts for revision: ${revision}`);
|
|
168380
168476
|
for (const name of filesToDownload) {
|
|
168381
168477
|
logger.info(`Artifact to fetch: "${name}"`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/craft",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.2",
|
|
4
4
|
"description": "The universal sentry workflow CLI",
|
|
5
5
|
"main": "dist/craft",
|
|
6
6
|
"repository": "https://github.com/getsentry/craft",
|
|
@@ -82,6 +82,8 @@
|
|
|
82
82
|
"clean": "rm -rf dist coverage",
|
|
83
83
|
"lint": "eslint --cache --cache-strategy content",
|
|
84
84
|
"fix": "pnpm lint --fix",
|
|
85
|
+
"format": "prettier --write .",
|
|
86
|
+
"format:check": "prettier --check .",
|
|
85
87
|
"test": "vitest run",
|
|
86
88
|
"test:watch": "vitest",
|
|
87
89
|
"typecheck": "tsc --noEmit",
|