chore(#1328): remove orphaned root vitest.config.ts left by SDK retirement
vitest.config.ts configured Vitest (not a dependency) to run .ts test files (the repo has none) rooted at ./sdk, a directory deleted when the SDK package seam was retired in #191 (ADR-0174). No npm script, workflow, or dependency references it. Also drop the now-dead sdk/src/*.test.* branch in diff-touches-shipped-paths.cjs isCiGating(), which can never match since the sdk/ tree no longer exists. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -12,11 +12,10 @@
|
||||
* - package.json (always included by `npm pack`, regardless of `files`)
|
||||
* - every entry in package.json `files`, treated as either an exact
|
||||
* file match or a directory prefix (matching `npm pack` semantics).
|
||||
* - CI-gating test paths: `tests/<anything>` plus
|
||||
* `sdk/src/<anything>/<name>.test.<ts|cjs|mjs|js>` and `.spec.` variants
|
||||
* — these don't ship in the tarball, but they gate the hotfix-branch
|
||||
* test job. A test fixture update that aligns with a cherry-picked
|
||||
* production fix MUST be pickable or CI fails on the hotfix run.
|
||||
* - CI-gating test paths: `tests/<anything>` — these don't ship in the
|
||||
* tarball, but they gate the hotfix-branch test job. A test fixture
|
||||
* update that aligns with a cherry-picked production fix MUST be
|
||||
* pickable or CI fails on the hotfix run.
|
||||
* #3621 — root cause of the v1.42.3 hotfix red CI.
|
||||
*
|
||||
* `package-lock.json` is intentionally NOT considered shipped — `npm pack`
|
||||
@@ -65,12 +64,7 @@ function loadShipPrefixes(pkgPath) {
|
||||
// in hotfix.yml, this lets `test(####):` fixture-alignment commits be
|
||||
// cherry-picked alongside their production counterparts.
|
||||
function isCiGating(diffPath) {
|
||||
if (diffPath.startsWith('tests/')) return true;
|
||||
// SDK vitest specs live next to source. Production source ships via
|
||||
// sdk/dist/ (already in package.json `files`); the test files are what's
|
||||
// missing from that surface.
|
||||
if (diffPath.startsWith('sdk/src/') && /\.(test|spec)\.(ts|cjs|mjs|js)$/.test(diffPath)) return true;
|
||||
return false;
|
||||
return diffPath.startsWith('tests/');
|
||||
}
|
||||
|
||||
function isShipped(diffPath, shipPrefixes) {
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
projects: [
|
||||
{
|
||||
test: {
|
||||
name: 'unit',
|
||||
root: './sdk',
|
||||
include: ['src/**/*.test.ts'],
|
||||
exclude: ['src/**/*.integration.test.ts'],
|
||||
},
|
||||
},
|
||||
{
|
||||
test: {
|
||||
name: 'integration',
|
||||
root: './sdk',
|
||||
include: ['src/**/*.integration.test.ts'],
|
||||
testTimeout: 120_000,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user