@codedrifters/configulator 0.0.467 → 0.0.469

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/lib/index.mjs CHANGED
@@ -40697,7 +40697,7 @@ function resolveReactViteSiteProjectOutdir(packageName) {
40697
40697
  }
40698
40698
 
40699
40699
  // src/projects/typescript-project.ts
40700
- import { typescript } from "projen";
40700
+ import { ReleasableCommits, typescript } from "projen";
40701
40701
  import {
40702
40702
  NodePackageManager as NodePackageManager2,
40703
40703
  Transform,
@@ -40706,6 +40706,27 @@ import {
40706
40706
  import { ReleaseTrigger } from "projen/lib/release";
40707
40707
  import { merge as merge2 } from "ts-deepmerge";
40708
40708
 
40709
+ // src/projects/changelog-types.ts
40710
+ var CHANGELOG_TYPES = [
40711
+ { type: "feat", section: "Features" },
40712
+ { type: "fix", section: "Bug Fixes" },
40713
+ { type: "perf", section: "Performance Improvements" },
40714
+ { type: "revert", section: "Reverts" },
40715
+ { type: "refactor", section: "Code Refactoring" },
40716
+ { type: "docs", section: "Documentation" },
40717
+ { type: "test", section: "Tests" },
40718
+ { type: "build", section: "Build System" },
40719
+ { type: "ci", section: "Continuous Integration" },
40720
+ { type: "style", section: "Styles" },
40721
+ { type: "chore", section: "Miscellaneous Chores" }
40722
+ ];
40723
+ function resolveVersionrcOptions(merged, userSupplied) {
40724
+ if (!userSupplied?.types) {
40725
+ return merged;
40726
+ }
40727
+ return { ...merged, types: userSupplied.types };
40728
+ }
40729
+
40709
40730
  // src/projects/monorepo-project.ts
40710
40731
  import { WorkflowSteps } from "projen/lib/github";
40711
40732
  import {
@@ -42082,14 +42103,69 @@ var TypeScriptProject = class extends typescript.TypeScriptProject {
42082
42103
  } : {}
42083
42104
  },
42084
42105
  /**
42085
- * Only release when the package folder source content or package.json
42086
- * (version, dependencies) changes.
42106
+ * Only release when the package's own sources or `package.json`
42107
+ * (version, dependencies) change.
42108
+ *
42109
+ * Deliberately narrower than the `"."` pathspec the bump decision and
42110
+ * the changelog use below. Widening this to `<outdir>/**` would make
42111
+ * all three filters select exactly the same files, but it also makes
42112
+ * every package-local edit releasable — a test-only change, or the
42113
+ * `.projen/` regeneration that a sibling package's change produces. In
42114
+ * this monorepo that regeneration is routine, so the aligned trigger
42115
+ * publishes versions whose tarballs are byte-identical to the previous
42116
+ * one.
42117
+ *
42118
+ * The asymmetry that remains is benign: a package-local commit outside
42119
+ * `src` cannot start a release on its own, but is still described in
42120
+ * the notes of the next release that something else triggers. Notes
42121
+ * covering slightly more than the trigger is the right direction for
42122
+ * the two to disagree in.
42087
42123
  */
42088
42124
  releaseTrigger: ReleaseTrigger.continuous({
42089
42125
  paths: [`${resolvedOutdir}/src/**`, `${resolvedOutdir}/package.json`]
42090
- })
42126
+ }),
42127
+ /**
42128
+ * Scope the other two release filters to the package folder, the same
42129
+ * slice of history the trigger above reads from.
42130
+ *
42131
+ * `versionrcOptions.path` reaches `commit-and-tag-version`, which
42132
+ * forwards it to `conventional-changelog` as a `git log` pathspec —
42133
+ * without it the changelog between two package-scoped tags spans every
42134
+ * commit in the monorepo. `releasableCommits` appends the same pathspec
42135
+ * to the command that decides whether to bump at all; without it a
42136
+ * package with no relevant changes still cuts a release, just with an
42137
+ * empty changelog.
42138
+ *
42139
+ * `"."` rather than `resolvedOutdir`: both commands run with their
42140
+ * working directory already set to the package outdir. A single string
42141
+ * is all `path` accepts — `git-raw-commits` splices it into `git log`
42142
+ * as one argv entry (`push("--", path)`), so the pathspec cannot be a
42143
+ * list, so it cannot be narrowed to `src` plus `package.json` to match
42144
+ * the trigger exactly.
42145
+ *
42146
+ * `types` gives every conventional-commit type a visible section. The
42147
+ * preset hides or discards everything but `feat` and `fix` by default,
42148
+ * while still bumping for them, which is what makes a package-local
42149
+ * churn release ship notes holding nothing but a version heading. See
42150
+ * `CHANGELOG_TYPES`.
42151
+ */
42152
+ versionrcOptions: { path: ".", types: [...CHANGELOG_TYPES] },
42153
+ releasableCommits: ReleasableCommits.everyCommit(".")
42154
+ };
42155
+ const mergedOptions = merge2(defaultOptions, userOptions);
42156
+ const options = {
42157
+ ...mergedOptions,
42158
+ /**
42159
+ * `ts-deepmerge` concatenates arrays, so a supplied changelog `types`
42160
+ * arrives appended to `CHANGELOG_TYPES` — and the preset resolves each
42161
+ * commit with `types.find(...)`, so our entry would win every lookup
42162
+ * and the consumer's list would be inert. Replace, don't concatenate.
42163
+ */
42164
+ versionrcOptions: resolveVersionrcOptions(
42165
+ mergedOptions.versionrcOptions,
42166
+ userOptions.versionrcOptions
42167
+ )
42091
42168
  };
42092
- const options = merge2(defaultOptions, userOptions);
42093
42169
  super(options);
42094
42170
  this.addDevDeps("@types/node@catalog:");
42095
42171
  this.tsconfig?.file.addOverride("compilerOptions.skipLibCheck", true);
@@ -42340,7 +42416,7 @@ var DEFAULT_FAVICON_SVG = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
42340
42416
  `;
42341
42417
 
42342
42418
  // src/projects/aws-cdk-project.ts
42343
- import { awscdk, Dependencies } from "projen";
42419
+ import { awscdk, Dependencies, ReleasableCommits as ReleasableCommits2 } from "projen";
42344
42420
  import {
42345
42421
  NodePackageManager as NodePackageManager3,
42346
42422
  Transform as Transform2,
@@ -44235,14 +44311,58 @@ var AwsCdkProject = class extends awscdk.AwsCdkTypeScriptApp {
44235
44311
  cooldown: 7
44236
44312
  },
44237
44313
  /**
44238
- * Only release when the package source content or package.json changes.
44314
+ * Only release when the package's own sources or `package.json`
44315
+ * (version, dependencies) change.
44316
+ *
44317
+ * Deliberately narrower than the `"."` pathspec the bump decision and
44318
+ * the changelog use below. Widening this to `<outdir>/**` would make
44319
+ * all three filters select exactly the same files, but it also makes
44320
+ * every package-local edit releasable — a test-only change, or the
44321
+ * `.projen/` regeneration that a sibling package's change produces. In
44322
+ * this monorepo that regeneration is routine, so the aligned trigger
44323
+ * publishes versions whose tarballs are byte-identical to the previous
44324
+ * one.
44325
+ *
44326
+ * The asymmetry that remains is benign: a package-local commit outside
44327
+ * `src` cannot start a release on its own, but is still described in
44328
+ * the notes of the next release that something else triggers. Notes
44329
+ * covering slightly more than the trigger is the right direction for
44330
+ * the two to disagree in.
44239
44331
  */
44240
44332
  releaseTrigger: ReleaseTrigger2.continuous({
44241
44333
  paths: [`${resolvedOutdir}/src/**`, `${resolvedOutdir}/package.json`]
44242
- })
44334
+ }),
44335
+ /**
44336
+ * Scope the other two release filters to the package folder, the same
44337
+ * slice of history the trigger above reads from.
44338
+ *
44339
+ * `versionrcOptions.path` reaches `commit-and-tag-version`, which
44340
+ * forwards it to `conventional-changelog` as a `git log` pathspec —
44341
+ * without it the changelog between two package-scoped tags spans every
44342
+ * commit in the monorepo. `releasableCommits` appends the same pathspec
44343
+ * to the command that decides whether to bump at all; without it a
44344
+ * package with no relevant changes still cuts a release, just with an
44345
+ * empty changelog.
44346
+ *
44347
+ * `"."` rather than `resolvedOutdir`: both commands run with their
44348
+ * working directory already set to the package outdir. A single string
44349
+ * is all `path` accepts — `git-raw-commits` splices it into `git log`
44350
+ * as one argv entry (`push("--", path)`), so the pathspec cannot be a
44351
+ * list, so it cannot be narrowed to `src` plus `package.json` to match
44352
+ * the trigger exactly.
44353
+ *
44354
+ * `types` gives every conventional-commit type a visible section. The
44355
+ * preset hides or discards everything but `feat` and `fix` by default,
44356
+ * while still bumping for them, which is what makes a package-local
44357
+ * churn release ship notes holding nothing but a version heading. See
44358
+ * `CHANGELOG_TYPES`.
44359
+ */
44360
+ versionrcOptions: { path: ".", types: [...CHANGELOG_TYPES] },
44361
+ releasableCommits: ReleasableCommits2.everyCommit(".")
44243
44362
  };
44363
+ const mergedOptions = merge4(defaultOptions, userOptions);
44244
44364
  const options = {
44245
- ...merge4(defaultOptions, userOptions),
44365
+ ...mergedOptions,
44246
44366
  /**
44247
44367
  * Both versions are the catalog's, resolved above — restate them after
44248
44368
  * the merge so a supplied option can never reintroduce a value the
@@ -44251,7 +44371,17 @@ var AwsCdkProject = class extends awscdk.AwsCdkTypeScriptApp {
44251
44371
  * projen.
44252
44372
  */
44253
44373
  cdkVersion,
44254
- constructsVersion
44374
+ constructsVersion,
44375
+ /**
44376
+ * `ts-deepmerge` concatenates arrays, so a supplied changelog `types`
44377
+ * arrives appended to `CHANGELOG_TYPES` — and the preset resolves each
44378
+ * commit with `types.find(...)`, so our entry would win every lookup
44379
+ * and the consumer's list would be inert. Replace, don't concatenate.
44380
+ */
44381
+ versionrcOptions: resolveVersionrcOptions(
44382
+ mergedOptions.versionrcOptions,
44383
+ userOptions.versionrcOptions
44384
+ )
44255
44385
  };
44256
44386
  super(options);
44257
44387
  this.addDevDeps("@types/node@catalog:");
@@ -44872,6 +45002,7 @@ export {
44872
45002
  CDK_REQUIRE_APPROVAL,
44873
45003
  CDK_SYNTH_DEFAULTS_BY_STAGE,
44874
45004
  CDK_WATCH_DEFAULTS_BY_STAGE,
45005
+ CHANGELOG_TYPES,
44875
45006
  CLAUDE_RULE_TARGET,
44876
45007
  COMPLETE_JOB_ID,
44877
45008
  CONVENTIONAL_COMMIT_TYPE_LABELS,
@@ -45214,6 +45345,7 @@ export {
45214
45345
  resolveTypeLabelForLabels,
45215
45346
  resolveTypeScriptProjectOutdir,
45216
45347
  resolveUnblockDependents,
45348
+ resolveVersionrcOptions,
45217
45349
  runScan,
45218
45350
  slackBundle,
45219
45351
  softwareProfileBundle,