-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes harmful tsconfig settings #6
Conversation
Fixes eslint path issues Updates fastify-plugin in the package-lock.json to fix export default issue Uses `import flash = require('fastify-flash') to make it work with both esModuleInterop settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -6,20 +6,16 @@ | |||
"module": "commonjs", | |||
"pretty": true, | |||
"noEmitOnError": true, | |||
"experimentalDecorators": true, | |||
"sourceMap": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why no source maps? I think they're still relevant on the server for debugging with the devtools, or for tooling like Sentry to pull in to show you the actual source that generated an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do source maps even work if no src folder is shipped? Regardelss, personally, I never ship sourcemaps since there is no need for the final user to debug library code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source maps get written alongside the typescript compiler's output so yes they should still be included in the npm package. And I kind of feel like there isn't a downside to shipping them -- what happens if someone suspects there is a bug in this library, I feel like they would debug it wouldn't they? Especially if it's a pre-release library that has a higher likelihood of bugs, wouldn't we want to provide the best debugging experience possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my experience having a user that is going to debug a lib in node_modules is really rare. More often than not when something brakes they just open an issue, without even providing a repro repo.
Usually, libraries don't ship maps because they are tested and hopefully maps can't provide any useful info. Maps, of course, are mainly used for application code.
If it is important for you, we can re-add them, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all lgtm
LGTM! |
import flash = require('fastify-flash')
to make it work with both esModuleInterop settings (ref: Uses import = require to import helmet types fastify-helmet#96)Checklist
npm run test
andnpm run benchmark
and the Code of conduct