publint icon indicating copy to clipboard operation
publint copied to clipboard

Respect typesVersion field

Open bluwy opened this issue 2 years ago • 4 comments

See https://github.com/faker-js/faker/pull/1966

typesVersion remaps the types path and should be taken into account when checking if the file exists.

bluwy avatar May 18 '23 03:05 bluwy

Initial attempt at https://github.com/bluwy/publint/tree/fix-typesVersion

bluwy avatar May 20 '23 07:05 bluwy

Published v0.1.13 with a patch to ignore the error for now if "typesVersions" exist. Might return in making the resolution work again in the future, so leaving this open.

bluwy avatar Jun 29 '23 08:06 bluwy

Just wanted to jump in here and also give a +1 on this - we'd be very interested to see the FILE_DOES_NOT_EXIST check applied to the types and typesVersions field.

Right now we have to keep our own hand-written tool on top of publint, and would be very happy if we could drop that :)

(Adding publint to the repo over in https://github.com/apollographql/apollo-client-nextjs/pull/264 in case you're tracking the libraries using it 😄 )

phryneas avatar Apr 02 '24 12:04 phryneas

Awesome! IIRC the resolver for typesVersion was really complex and not comprehensively documented, and it was hard to portray an error for multiple specified TypeScript versions. But otherwise if anyone (or me in the future) would like to contribute this fix, that would be great.

bluwy avatar Apr 04 '24 02:04 bluwy