@sentry/craft 2.32.0 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/craft +31 -15
  2. package/package.json +1 -1
package/dist/craft CHANGED
@@ -126966,8 +126966,7 @@ var init_github3 = __esm({
126966
126966
  const typedConfig = this.config;
126967
126967
  const owner = typedConfig.owner || githubRepo.owner;
126968
126968
  const repo = typedConfig.repo || githubRepo.repo;
126969
- const configChangelog = getConfiguration().changelog;
126970
- const changelog = typeof configChangelog === "string" ? configChangelog : configChangelog?.filePath || DEFAULT_CHANGELOG_PATH;
126969
+ const changelog = getChangelogConfig().filePath;
126971
126970
  this.githubConfig = {
126972
126971
  owner,
126973
126972
  repo,
@@ -127453,9 +127452,8 @@ _This changelog has been truncated. See the [full changelog](${permalink}) for a
127453
127452
  await this.updateFloatingTags(version2, revision);
127454
127453
  return;
127455
127454
  }
127456
- const config3 = getConfiguration();
127457
127455
  let changelog;
127458
- if (config3.changelogPolicy !== "none" /* None */) {
127456
+ if (getConfiguration().changelogPolicy !== "none" /* None */) {
127459
127457
  changelog = await this.getChangelog(version2);
127460
127458
  }
127461
127459
  const artifacts = await this.getArtifactsForRevision(revision);
@@ -233193,9 +233191,31 @@ async function getStatusProviderFromConfig() {
233193
233191
  }
233194
233192
  }
233195
233193
  }
233194
+ function getDefaultChangelogFilePath() {
233195
+ const workspace = getActiveWorkspace();
233196
+ if (!workspace) {
233197
+ return DEFAULT_CHANGELOG_FILE_PATH;
233198
+ }
233199
+ if (!isSafeWorkspacePath(workspace)) {
233200
+ throw new ConfigurationError(`Invalid workspace path: "${workspace}"`);
233201
+ }
233202
+ const root = getConfigFileDir() || process.cwd();
233203
+ const directory = import_path24.default.resolve(root, workspace);
233204
+ if (!(0, import_fs24.existsSync)(directory) || !(0, import_fs24.lstatSync)(directory).isDirectory()) {
233205
+ return DEFAULT_CHANGELOG_FILE_PATH;
233206
+ }
233207
+ const realRoot = (0, import_fs24.realpathSync)(root);
233208
+ const realDirectory = (0, import_fs24.realpathSync)(directory);
233209
+ if (!realDirectory.startsWith(`${realRoot}${import_path24.default.sep}`)) {
233210
+ throw new ConfigurationError(
233211
+ `Workspace directory escapes the repository: "${workspace}"`
233212
+ );
233213
+ }
233214
+ return import_path24.default.posix.join(workspace, DEFAULT_CHANGELOG_FILE_PATH);
233215
+ }
233196
233216
  function getChangelogConfig() {
233197
233217
  const config3 = getConfiguration();
233198
- let filePath = DEFAULT_CHANGELOG_FILE_PATH;
233218
+ let filePath;
233199
233219
  let policy = "none" /* None */;
233200
233220
  let scopeGrouping = true;
233201
233221
  let includePaths = [];
@@ -233224,7 +233244,7 @@ function getChangelogConfig() {
233224
233244
  }
233225
233245
  }
233226
233246
  return {
233227
- filePath,
233247
+ filePath: filePath ?? getDefaultChangelogFilePath(),
233228
233248
  policy,
233229
233249
  scopeGrouping,
233230
233250
  includePaths
@@ -233305,7 +233325,7 @@ var require_package7 = __commonJS({
233305
233325
  "package.json"(exports2, module2) {
233306
233326
  module2.exports = {
233307
233327
  name: "@sentry/craft",
233308
- version: "2.32.0",
233328
+ version: "2.33.0",
233309
233329
  description: "The universal sentry workflow CLI",
233310
233330
  main: "dist/craft",
233311
233331
  repository: "https://github.com/getsentry/craft",
@@ -233497,7 +233517,7 @@ function getPackage() {
233497
233517
  }
233498
233518
  function getPackageVersion() {
233499
233519
  const { version: version2 } = getPackage();
233500
- const buildInfo = "177c278ebf946da378659e3b5dfe7d5e4a4d383a";
233520
+ const buildInfo = "8c1d36f152366f100b3178cffefd777ce59b3c0e";
233501
233521
  return buildInfo ? `${version2} (${buildInfo})` : version2;
233502
233522
  }
233503
233523
  function semVerToString(s6) {
@@ -242936,8 +242956,7 @@ async function prepareMain(argv) {
242936
242956
  try {
242937
242957
  await createReleaseBranch(git, rev, branchName);
242938
242958
  const oldVersion = await getLatestTag(git, getGitTagPrefix());
242939
- const changelogPath = typeof config3.changelog === "string" ? config3.changelog : config3.changelog?.filePath;
242940
- const changelogPolicy = typeof config3.changelog === "object" && config3.changelog?.policy ? config3.changelog.policy : config3.changelogPolicy;
242959
+ const { filePath: changelogPath, policy: changelogPolicy } = getChangelogConfig();
242941
242960
  const changelogBody = await prepareChangelog(
242942
242961
  git,
242943
242962
  oldVersion,
@@ -242946,10 +242965,7 @@ async function prepareMain(argv) {
242946
242965
  changelogPath
242947
242966
  );
242948
242967
  if (changelogBody) {
242949
- const resolvedChangelogPath = (0, import_path31.relative)(
242950
- "",
242951
- changelogPath || DEFAULT_CHANGELOG_PATH
242952
- );
242968
+ const resolvedChangelogPath = (0, import_path31.relative)("", changelogPath);
242953
242969
  await git.add(resolvedChangelogPath);
242954
242970
  }
242955
242971
  const rootDir = getConfigFileDir() || process.cwd();
@@ -242971,7 +242987,7 @@ async function prepareMain(argv) {
242971
242987
  const isCalVer = argv.newVersion === "calver" || getVersioningPolicy() === "calver" /* CalVer */;
242972
242988
  const issueChangelog = isCalVer ? disableChangelogMentions(changelogBody) : changelogBody;
242973
242989
  writeGitHubActionsFile("changelog", issueChangelog);
242974
- const resolvedChangelogPath = changelogPath || DEFAULT_CHANGELOG_PATH;
242990
+ const resolvedChangelogPath = changelogPath;
242975
242991
  const lineRange = await getChangelogLineRange(
242976
242992
  git,
242977
242993
  resolvedChangelogPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/craft",
3
- "version": "2.32.0",
3
+ "version": "2.33.0",
4
4
  "description": "The universal sentry workflow CLI",
5
5
  "main": "dist/craft",
6
6
  "repository": "https://github.com/getsentry/craft",