@codedrifters/configulator 0.0.451 → 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.mjs CHANGED
@@ -34480,17 +34480,15 @@ var VERSION = {
34480
34480
  * Version of `@types/node` to use across all packages (pnpm catalog).
34481
34481
  */
34482
34482
  TYPES_NODE_VERSION: "26.2.0",
34483
- /**
34484
- * What version of Vite to use (pnpm override). Pinned to 5.x so Vitest 4.x
34485
- * can load config (Vite 6+/7+ are ESM-only; see issue #142). Remove override
34486
- * when moving to ESM-only test setup.
34487
- */
34488
- VITE_VERSION: "5.4.11",
34489
34483
  /**
34490
34484
  * What version of Vitest to use when testRunner is 'vitest'.
34491
- * Pinned to 3.x so it works with Vite 5 (Vitest 4 requires Vite 6). See issue #142.
34485
+ *
34486
+ * Also pins `@vitest/coverage-v8`, whose `vitest` peer dependency is an
34487
+ * exact match rather than a range — the two always move together. Both
34488
+ * packages are seeded into the monorepo's pnpm catalog from this constant,
34489
+ * so `Vitest` renders them as `catalog:` wherever that catalog exists.
34492
34490
  */
34493
- VITEST_VERSION: "3.2.4"
34491
+ VITEST_VERSION: "4.1.10"
34494
34492
  };
34495
34493
 
34496
34494
  // src/vitest/vitest-component.ts
@@ -34512,10 +34510,14 @@ var Vitest = class _Vitest extends Component5 {
34512
34510
  this.coverageEnabled = config.coverageEnabled ?? true;
34513
34511
  this.coverageDirectory = config.coverageDirectory ?? "coverage";
34514
34512
  this.coverageReporters = config.coverageReporters ?? ["text", "lcov"];
34515
- this.version = options.vitestVersion ?? VERSION.VITEST_VERSION;
34516
- project.addDevDeps(`vitest@${this.version}`);
34513
+ this.coverageInclude = config.coverageInclude ?? [
34514
+ "src/**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"
34515
+ ];
34516
+ const catalogVersion = PnpmWorkspace.of(project)?.defaultCatalog?.vitest;
34517
+ const specifier = options.vitestVersion === void 0 && catalogVersion !== void 0 ? "catalog:" : options.vitestVersion ?? VERSION.VITEST_VERSION;
34518
+ project.addDevDeps(`vitest@${specifier}`);
34517
34519
  if (this.coverageEnabled) {
34518
- project.addDevDeps(`@vitest/coverage-v8@${this.version}`);
34520
+ project.addDevDeps(`@vitest/coverage-v8@${specifier}`);
34519
34521
  }
34520
34522
  const coveragePath = `/${this.coverageDirectory}/`;
34521
34523
  project.gitignore.addPatterns(coveragePath);
@@ -34569,6 +34571,7 @@ var Vitest = class _Vitest extends Component5 {
34569
34571
  ` provider: "v8",`,
34570
34572
  ` reportsDirectory: "${this.coverageDirectory}",`,
34571
34573
  ` reporter: ${JSON.stringify(this.coverageReporters)},`,
34574
+ ` include: ${JSON.stringify(this.coverageInclude)},`,
34572
34575
  " },",
34573
34576
  " },",
34574
34577
  "});"
@@ -40115,12 +40118,7 @@ var VERSION_NPM_PACKAGES = [
40115
40118
  { key: "TYPES_NODE_VERSION", npmPackage: "@types/node" },
40116
40119
  { key: "VITEST_VERSION", npmPackage: "vitest" }
40117
40120
  ];
40118
- var VERSION_KEYS_SKIP = [
40119
- "NODE_WORKFLOWS",
40120
- "VITE_VERSION",
40121
- "VITEST_VERSION"
40122
- // Pinned to 3.x for Vite 5 compatibility; skip until ESM-only (issue #142)
40123
- ];
40121
+ var VERSION_KEYS_SKIP = ["NODE_WORKFLOWS"];
40124
40122
 
40125
40123
  // src/jsii/jsii-faker.ts
40126
40124
  import * as spec from "@jsii/spec";
@@ -41296,7 +41294,13 @@ var MonorepoProject = class extends TypeScriptAppProject {
41296
41294
  ["aws-cdk-lib"]: VERSION.AWS_CDK_LIB_VERSION,
41297
41295
  ["projen"]: VERSION.PROJEN_VERSION,
41298
41296
  ["constructs"]: VERSION.AWS_CONSTRUCTS_VERSION,
41299
- ["turbo"]: VERSION.TURBO_VERSION
41297
+ ["turbo"]: VERSION.TURBO_VERSION,
41298
+ /**
41299
+ * `@vitest/coverage-v8` declares an exact `vitest` peer
41300
+ * dependency, so both track one constant.
41301
+ */
41302
+ ["vitest"]: VERSION.VITEST_VERSION,
41303
+ ["@vitest/coverage-v8"]: VERSION.VITEST_VERSION
41300
41304
  }
41301
41305
  }
41302
41306
  }
@@ -41778,11 +41782,11 @@ var TypeScriptProject = class extends typescript.TypeScriptProject {
41778
41782
  this.tsconfig?.file.addOverride("compilerOptions.skipLibCheck", true);
41779
41783
  if (options.testRunner === TestRunner.VITEST) {
41780
41784
  new Vitest(this, {
41785
+ ...options.vitestOptions,
41781
41786
  config: {
41782
41787
  include: ["src/**/*.{test,spec}.?(c|m)[jt]s?(x)"],
41783
41788
  ...options.vitestOptions?.config
41784
- },
41785
- ...options.vitestOptions
41789
+ }
41786
41790
  });
41787
41791
  } else {
41788
41792
  this.deps.removeDependency("ts-jest");
@@ -43920,11 +43924,11 @@ var AwsCdkProject = class extends awscdk.AwsCdkTypeScriptApp {
43920
43924
  this.tsconfig?.file.addOverride("compilerOptions.skipLibCheck", true);
43921
43925
  if (testRunner === TestRunner.VITEST) {
43922
43926
  new Vitest(this, {
43927
+ ...options.vitestOptions,
43923
43928
  config: {
43924
43929
  include: ["src/**/*.{test,spec}.?(c|m)[jt]s?(x)"],
43925
43930
  ...options.vitestOptions?.config
43926
- },
43927
- ...options.vitestOptions
43931
+ }
43928
43932
  });
43929
43933
  } else {
43930
43934
  this.deps.removeDependency("ts-jest");