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`)
|
* - package.json (always included by `npm pack`, regardless of `files`)
|
||||||
* - every entry in package.json `files`, treated as either an exact
|
* - every entry in package.json `files`, treated as either an exact
|
||||||
* file match or a directory prefix (matching `npm pack` semantics).
|
* file match or a directory prefix (matching `npm pack` semantics).
|
||||||
* - CI-gating test paths: `tests/<anything>` plus
|
* - CI-gating test paths: `tests/<anything>` — these don't ship in the
|
||||||
* `sdk/src/<anything>/<name>.test.<ts|cjs|mjs|js>` and `.spec.` variants
|
* tarball, but they gate the hotfix-branch test job. A test fixture
|
||||||
* — these don't ship in the tarball, but they gate the hotfix-branch
|
* update that aligns with a cherry-picked production fix MUST be
|
||||||
* test job. A test fixture update that aligns with a cherry-picked
|
* pickable or CI fails on the hotfix run.
|
||||||
* production fix MUST be pickable or CI fails on the hotfix run.
|
|
||||||
* #3621 — root cause of the v1.42.3 hotfix red CI.
|
* #3621 — root cause of the v1.42.3 hotfix red CI.
|
||||||
*
|
*
|
||||||
* `package-lock.json` is intentionally NOT considered shipped — `npm pack`
|
* `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
|
// in hotfix.yml, this lets `test(####):` fixture-alignment commits be
|
||||||
// cherry-picked alongside their production counterparts.
|
// cherry-picked alongside their production counterparts.
|
||||||
function isCiGating(diffPath) {
|
function isCiGating(diffPath) {
|
||||||
if (diffPath.startsWith('tests/')) return true;
|
return diffPath.startsWith('tests/');
|
||||||
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function isShipped(diffPath, shipPrefixes) {
|
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