kwhitley / itty-router

A little router.
MIT License
1.8k stars 79 forks source link

Seems like published version is not the version built from git tag #256

Open istarkov opened 4 months ago

istarkov commented 4 months ago

Describe the Issue

json.d.ts in the published version

export declare const json: import("types").ResponseFormatter;

json.d.ts when I built it from 5.0.17 github tag

export declare const json: import("./types").ResponseFormatter;

See published version has import('types') (which is wrong) but it should be import('./types') as in built version.

Because of above the type of the import { json } from 'itty-router' is any (no issues if right import is used (with relative import))

See https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgKwM4QHZwL5wGZQQhwDkwMMAngLSECuMAplCQNwBQ7amcqAhjGCo8wRqjgY6IAEbNWQA

image

It feels like some dirty version was published or some postprocessing ruined the right types

kwhitley commented 4 months ago

Hmmmm good catch... def gives me some clue to how to fix, as this is almost certainly a post processing issue!