Problem
The published `@stackbilt/llm-providers` package (v1.17.2) includes `.js.map` files in `dist/` that reference `../src/*.ts` as their source paths, but `src/` is not included in the published package. This causes vitest (and any other tool that consumes sourcemaps) to emit warnings on every test run:
```
Sourcemap for ".../node_modules/@stackbilt/llm-providers/dist/index.js" points to missing source files
Sourcemap for ".../node_modules/@stackbilt/llm-providers/dist/canonical.js" points to missing source files
Sourcemap for ".../node_modules/@stackbilt/llm-providers/dist/gateway-routing.js" points to missing source files
```
(28 warnings total — one per dist file)
Verified via:
$ cat dist/index.js.map | python3 -c "import json,sys; d=json.load(sys.stdin); print(d['sources'])"
['../src/index.ts']
$ ls node_modules/@stackbilt/llm-providers/src
ls: cannot access '...src': No such file or directory
Fix (pick one)
Option A — include src/ in the package (enables step-through debugging):
Add "src" to the files array in package.json:
Option B — strip sourcemaps from the published dist (smaller package, no warnings):
In tsconfig.json or the build command, set "sourceMap": false or add --no-source-maps to the build step.
Option C — inline sources into the map (single file, no missing reference):
Set "inlineSources": true in tsconfig.json. The .map files will embed the source content directly, so no separate src/ needed.
Option A is preferred if downstream consumers step through llm-providers code during debugging. Option B is fine if sourcemaps aren't needed in consumers.
Context
Observed in aegis-daemon v2.25.2 test suite. Not a test failure — all 1863 tests pass — but 28 warnings pollute every vitest run output and make real failures harder to spot.
Problem
The published `@stackbilt/llm-providers` package (v1.17.2) includes `.js.map` files in `dist/` that reference `../src/*.ts` as their source paths, but `src/` is not included in the published package. This causes vitest (and any other tool that consumes sourcemaps) to emit warnings on every test run:
```
Sourcemap for ".../node_modules/@stackbilt/llm-providers/dist/index.js" points to missing source files
Sourcemap for ".../node_modules/@stackbilt/llm-providers/dist/canonical.js" points to missing source files
Sourcemap for ".../node_modules/@stackbilt/llm-providers/dist/gateway-routing.js" points to missing source files
```
(28 warnings total — one per dist file)
Verified via:
Fix (pick one)
Option A — include
src/in the package (enables step-through debugging):Add
"src"to thefilesarray inpackage.json:Option B — strip sourcemaps from the published dist (smaller package, no warnings):
In
tsconfig.jsonor the build command, set"sourceMap": falseor add--no-source-mapsto the build step.Option C — inline sources into the map (single file, no missing reference):
Set
"inlineSources": trueintsconfig.json. The.mapfiles will embed the source content directly, so no separatesrc/needed.Option A is preferred if downstream consumers step through llm-providers code during debugging. Option B is fine if sourcemaps aren't needed in consumers.
Context
Observed in
aegis-daemonv2.25.2 test suite. Not a test failure — all 1863 tests pass — but 28 warnings pollute everyvitest runoutput and make real failures harder to spot.