fastify / fastify-caching

A Fastify plugin to facilitate working with cache headers
MIT License
201 stars 26 forks source link

fix(types): option privacy in Nodenext | Node16 #137

Closed Gehbt closed 4 months ago

Gehbt commented 8 months ago

Relate commit #116

When use with typescript in compilerOptions: "module": "Node16" | "Nodenext", it will call the namespace fastifyCaching, that caused image and should use image

I don`t know why those tests-suits fail.

Checklist

Reproduction

mcollina commented 8 months ago

What is this fixing?

Gehbt commented 8 months ago

What is this fixing?

I added the informations.

gurgunday commented 8 months ago

Can you please add a test?

We use tsd

Gehbt commented 8 months ago

Can you please add a test?

We use tsd

I cannot provide the test, but I can give a minimal reproduction.

Gehbt commented 8 months ago

Do you review the Reproduction? I think I have revealed it: there is using "type": "commonjs", if changed to "type": "module" it will break. May we really ought to wait a guy in NodeNext?

gurgunday commented 8 months ago

Not sure how we could test this... but reproducing is possible

marcoreni commented 4 months ago

any chance of getting this merged?