Removes esModuleInterop from tsd and adds star import for helmet #95
+3
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since this is a plugin consumed by final users if we use
esModuleInterop: true
(as was before this PR) we broke all builds for users that have it set to false. In factesModuleInterop
is always checked in the dependency tree by TS ifskipLibCheck
is not set to true: we need to be sure that our package works for bothesModuleInterop
configurations.On the other hand, Helmet doesn't use the "infamous triplet" (it still uses the old
export =
syntax), so we need to import it usingimport * as helmet from 'helmet'
as it is a more conservative approach.Fixes: #94
This PR can't be merged before this fix is published: fastify/fastify#2555
Checklist
npm run test
andnpm run benchmark
and the Code of conduct