@codedrifters/configulator 0.0.452 → 0.0.453

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.d.mts CHANGED
@@ -11815,17 +11815,15 @@ declare const VERSION: {
11815
11815
  * Version of `@types/node` to use across all packages (pnpm catalog).
11816
11816
  */
11817
11817
  readonly TYPES_NODE_VERSION: "26.2.0";
11818
- /**
11819
- * What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
11820
- * can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
11821
- * when moving to ESM-only test setup.
11822
- */
11823
- readonly VITE_VERSION: "5.4.11";
11824
11818
  /**
11825
11819
  * What version of Vitest to use when testRunner is 'vitest'.
11826
- * Pinned to 3.x so it works with Vite 5 (Vitest 4 requires Vite 6). See issue #142.
11820
+ *
11821
+ * Also pins `@vitest/coverage-v8`, whose `vitest` peer dependency is an
11822
+ * exact match rather than a range — the two always move together. Both
11823
+ * packages are seeded into the monorepo's pnpm catalog from this constant,
11824
+ * so `Vitest` renders them as `catalog:` wherever that catalog exists.
11827
11825
  */
11828
- readonly VITEST_VERSION: "3.2.4";
11826
+ readonly VITEST_VERSION: "4.1.10";
11829
11827
  };
11830
11828
 
11831
11829
  /**
@@ -11845,8 +11843,7 @@ declare const VERSION_NPM_PACKAGES: ReadonlyArray<{
11845
11843
  }>;
11846
11844
  /**
11847
11845
  * VERSION keys that are not backed by npm or must be skipped by
11848
- * auto-update (e.g. runtime versions like Node.js, or pinned deps like
11849
- * VITE_VERSION until ESM-only test setup).
11846
+ * auto-update (e.g. runtime versions like Node.js).
11850
11847
  */
11851
11848
  declare const VERSION_KEYS_SKIP: ReadonlyArray<VersionKey>;
11852
11849
 
@@ -12583,6 +12580,26 @@ interface VitestConfigOptions {
12583
12580
  * @default "coverage"
12584
12581
  */
12585
12582
  readonly coverageDirectory?: string;
12583
+ /**
12584
+ * Glob patterns for the files coverage is measured against.
12585
+ *
12586
+ * Rendered as `coverage.include`, which Vitest 4 requires: it ships no
12587
+ * default, and coverage with none set silently measures nothing — the
12588
+ * report comes back empty and summarises as 100%. Vitest 3's `coverage.all`
12589
+ * (removed in 4) is what used to cover this implicitly.
12590
+ *
12591
+ * Scoping this to the source root also keeps build output (`dist/`, `lib/`)
12592
+ * out of the report, which Vitest 3 got from a default `coverage.exclude`
12593
+ * list that version 4 reduces to `[]`.
12594
+ *
12595
+ * The default carries an explicit script-extension filter because Vitest 4
12596
+ * also removed `coverage.extensions`: a bare `src/**` sweeps every matched
12597
+ * file into AST remapping, and each non-script file (markdown, astro, ...)
12598
+ * logs a PARSE_ERROR during the uncovered-files pass.
12599
+ *
12600
+ * @default ["src/**\/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"]
12601
+ */
12602
+ readonly coverageInclude?: string[];
12586
12603
  /**
12587
12604
  * Coverage reporters.
12588
12605
  *
@@ -12606,6 +12623,13 @@ interface VitestOptions {
12606
12623
  readonly config?: VitestConfigOptions;
12607
12624
  /**
12608
12625
  * Vitest version (overrides VERSION.VITEST_VERSION).
12626
+ *
12627
+ * Normally omitted: where the parent monorepo's pnpm catalog carries a
12628
+ * `vitest` entry, the rendered specifier is `catalog:` and that entry
12629
+ * decides the resolved version. Setting this pins the exact version
12630
+ * instead, bypassing the catalog — prefer bumping the catalog entry.
12631
+ *
12632
+ * @default - the parent monorepo's catalog pin for `vitest`
12609
12633
  */
12610
12634
  readonly vitestVersion?: string;
12611
12635
  }
@@ -12629,7 +12653,7 @@ declare class Vitest extends Component {
12629
12653
  private readonly coverageEnabled;
12630
12654
  private readonly coverageDirectory;
12631
12655
  private readonly coverageReporters;
12632
- private readonly version;
12656
+ private readonly coverageInclude;
12633
12657
  constructor(project: NodeProject, options?: VitestOptions);
12634
12658
  preSynthesize(): void;
12635
12659
  private addTestTasks;
package/lib/index.d.ts CHANGED
@@ -11864,17 +11864,15 @@ declare const VERSION: {
11864
11864
  * Version of `@types/node` to use across all packages (pnpm catalog).
11865
11865
  */
11866
11866
  readonly TYPES_NODE_VERSION: "26.2.0";
11867
- /**
11868
- * What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
11869
- * can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
11870
- * when moving to ESM-only test setup.
11871
- */
11872
- readonly VITE_VERSION: "5.4.11";
11873
11867
  /**
11874
11868
  * What version of Vitest to use when testRunner is 'vitest'.
11875
- * Pinned to 3.x so it works with Vite 5 (Vitest 4 requires Vite 6). See issue #142.
11869
+ *
11870
+ * Also pins `@vitest/coverage-v8`, whose `vitest` peer dependency is an
11871
+ * exact match rather than a range — the two always move together. Both
11872
+ * packages are seeded into the monorepo's pnpm catalog from this constant,
11873
+ * so `Vitest` renders them as `catalog:` wherever that catalog exists.
11876
11874
  */
11877
- readonly VITEST_VERSION: "3.2.4";
11875
+ readonly VITEST_VERSION: "4.1.10";
11878
11876
  };
11879
11877
 
11880
11878
  /**
@@ -11894,8 +11892,7 @@ declare const VERSION_NPM_PACKAGES: ReadonlyArray<{
11894
11892
  }>;
11895
11893
  /**
11896
11894
  * VERSION keys that are not backed by npm or must be skipped by
11897
- * auto-update (e.g. runtime versions like Node.js, or pinned deps like
11898
- * VITE_VERSION until ESM-only test setup).
11895
+ * auto-update (e.g. runtime versions like Node.js).
11899
11896
  */
11900
11897
  declare const VERSION_KEYS_SKIP: ReadonlyArray<VersionKey>;
11901
11898
 
@@ -12632,6 +12629,26 @@ interface VitestConfigOptions {
12632
12629
  * @default "coverage"
12633
12630
  */
12634
12631
  readonly coverageDirectory?: string;
12632
+ /**
12633
+ * Glob patterns for the files coverage is measured against.
12634
+ *
12635
+ * Rendered as `coverage.include`, which Vitest 4 requires: it ships no
12636
+ * default, and coverage with none set silently measures nothing — the
12637
+ * report comes back empty and summarises as 100%. Vitest 3's `coverage.all`
12638
+ * (removed in 4) is what used to cover this implicitly.
12639
+ *
12640
+ * Scoping this to the source root also keeps build output (`dist/`, `lib/`)
12641
+ * out of the report, which Vitest 3 got from a default `coverage.exclude`
12642
+ * list that version 4 reduces to `[]`.
12643
+ *
12644
+ * The default carries an explicit script-extension filter because Vitest 4
12645
+ * also removed `coverage.extensions`: a bare `src/**` sweeps every matched
12646
+ * file into AST remapping, and each non-script file (markdown, astro, ...)
12647
+ * logs a PARSE_ERROR during the uncovered-files pass.
12648
+ *
12649
+ * @default ["src/**\/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"]
12650
+ */
12651
+ readonly coverageInclude?: string[];
12635
12652
  /**
12636
12653
  * Coverage reporters.
12637
12654
  *
@@ -12655,6 +12672,13 @@ interface VitestOptions {
12655
12672
  readonly config?: VitestConfigOptions;
12656
12673
  /**
12657
12674
  * Vitest version (overrides VERSION.VITEST_VERSION).
12675
+ *
12676
+ * Normally omitted: where the parent monorepo's pnpm catalog carries a
12677
+ * `vitest` entry, the rendered specifier is `catalog:` and that entry
12678
+ * decides the resolved version. Setting this pins the exact version
12679
+ * instead, bypassing the catalog — prefer bumping the catalog entry.
12680
+ *
12681
+ * @default - the parent monorepo's catalog pin for `vitest`
12658
12682
  */
12659
12683
  readonly vitestVersion?: string;
12660
12684
  }
@@ -12678,7 +12702,7 @@ declare class Vitest extends Component {
12678
12702
  private readonly coverageEnabled;
12679
12703
  private readonly coverageDirectory;
12680
12704
  private readonly coverageReporters;
12681
- private readonly version;
12705
+ private readonly coverageInclude;
12682
12706
  constructor(project: NodeProject, options?: VitestOptions);
12683
12707
  preSynthesize(): void;
12684
12708
  private addTestTasks;
package/lib/index.js CHANGED
@@ -34883,17 +34883,15 @@ var VERSION = {
34883
34883
  * Version of `@types/node` to use across all packages (pnpm catalog).
34884
34884
  */
34885
34885
  TYPES_NODE_VERSION: "26.2.0",
34886
- /**
34887
- * What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
34888
- * can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
34889
- * when moving to ESM-only test setup.
34890
- */
34891
- VITE_VERSION: "5.4.11",
34892
34886
  /**
34893
34887
  * What version of Vitest to use when testRunner is 'vitest'.
34894
- * Pinned to 3.x so it works with Vite 5 (Vitest 4 requires Vite 6). See issue #142.
34888
+ *
34889
+ * Also pins `@vitest/coverage-v8`, whose `vitest` peer dependency is an
34890
+ * exact match rather than a range — the two always move together. Both
34891
+ * packages are seeded into the monorepo's pnpm catalog from this constant,
34892
+ * so `Vitest` renders them as `catalog:` wherever that catalog exists.
34895
34893
  */
34896
- VITEST_VERSION: "3.2.4"
34894
+ VITEST_VERSION: "4.1.10"
34897
34895
  };
34898
34896
 
34899
34897
  // src/vitest/vitest-component.ts
@@ -34915,10 +34913,14 @@ var Vitest = class _Vitest extends import_projen3.Component {
34915
34913
  this.coverageEnabled = config.coverageEnabled ?? true;
34916
34914
  this.coverageDirectory = config.coverageDirectory ?? "coverage";
34917
34915
  this.coverageReporters = config.coverageReporters ?? ["text", "lcov"];
34918
- this.version = options.vitestVersion ?? VERSION.VITEST_VERSION;
34919
- project.addDevDeps(`vitest@${this.version}`);
34916
+ this.coverageInclude = config.coverageInclude ?? [
34917
+ "src/**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"
34918
+ ];
34919
+ const catalogVersion = PnpmWorkspace.of(project)?.defaultCatalog?.vitest;
34920
+ const specifier = options.vitestVersion === void 0 && catalogVersion !== void 0 ? "catalog:" : options.vitestVersion ?? VERSION.VITEST_VERSION;
34921
+ project.addDevDeps(`vitest@${specifier}`);
34920
34922
  if (this.coverageEnabled) {
34921
- project.addDevDeps(`@vitest/coverage-v8@${this.version}`);
34923
+ project.addDevDeps(`@vitest/coverage-v8@${specifier}`);
34922
34924
  }
34923
34925
  const coveragePath = `/${this.coverageDirectory}/`;
34924
34926
  project.gitignore.addPatterns(coveragePath);
@@ -34972,6 +34974,7 @@ var Vitest = class _Vitest extends import_projen3.Component {
34972
34974
  ` provider: "v8",`,
34973
34975
  ` reportsDirectory: "${this.coverageDirectory}",`,
34974
34976
  ` reporter: ${JSON.stringify(this.coverageReporters)},`,
34977
+ ` include: ${JSON.stringify(this.coverageInclude)},`,
34975
34978
  " },",
34976
34979
  " },",
34977
34980
  "});"
@@ -40518,12 +40521,7 @@ var VERSION_NPM_PACKAGES = [
40518
40521
  { key: "TYPES_NODE_VERSION", npmPackage: "@types/node" },
40519
40522
  { key: "VITEST_VERSION", npmPackage: "vitest" }
40520
40523
  ];
40521
- var VERSION_KEYS_SKIP = [
40522
- "NODE_WORKFLOWS",
40523
- "VITE_VERSION",
40524
- "VITEST_VERSION"
40525
- // Pinned to 3.x for Vite 5 compatibility; skip until ESM-only (issue #142)
40526
- ];
40524
+ var VERSION_KEYS_SKIP = ["NODE_WORKFLOWS"];
40527
40525
 
40528
40526
  // src/jsii/jsii-faker.ts
40529
40527
  var spec = __toESM(require("@jsii/spec"));
@@ -41690,7 +41688,13 @@ var MonorepoProject = class extends import_typescript3.TypeScriptAppProject {
41690
41688
  ["aws-cdk-lib"]: VERSION.AWS_CDK_LIB_VERSION,
41691
41689
  ["projen"]: VERSION.PROJEN_VERSION,
41692
41690
  ["constructs"]: VERSION.AWS_CONSTRUCTS_VERSION,
41693
- ["turbo"]: VERSION.TURBO_VERSION
41691
+ ["turbo"]: VERSION.TURBO_VERSION,
41692
+ /**
41693
+ * `@vitest/coverage-v8` declares an exact `vitest` peer
41694
+ * dependency, so both track one constant.
41695
+ */
41696
+ ["vitest"]: VERSION.VITEST_VERSION,
41697
+ ["@vitest/coverage-v8"]: VERSION.VITEST_VERSION
41694
41698
  }
41695
41699
  }
41696
41700
  }