Skip to content
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

Publish generated source maps to NPM #568

Merged
merged 1 commit into from Apr 23, 2021
Merged

Conversation

mdwheele
Copy link
Contributor

@mdwheele mdwheele commented Mar 24, 2021

Hello!

πŸ’β€β™€οΈ This PR removes the *.map rule from .npmignore with the intent that source maps are published in future NPM releases.

I somewhat-often find myself setting breakpoints in dependencies during development to either be able to trace what seems like a bug or simply to figure out how a dependency is working in order to be able to contribute. Today, when I launch my debugger, I get a slew of "errors" complaining about not being able to find source maps for this package:

Could not read source map for file:///<snip>/node_modules/express-openapi-validator/dist/index.js: 
ENOENT: no such file or directory, open '<snip>/node_modules/express-openapi-validator/dist/index.js.map'

This repeats for basically every file in dist.

There may be more to this PR than simply removing the *.map rule, but I would propose that source maps should be distributed as part of the NPM release process and this seemed like the first step. As far as I can tell, the tsconfig is already configured to generate source maps.

Please let me know if there's further work to be done here and I'll be happy to help!

@mdwheele
Copy link
Contributor Author

mdwheele commented Apr 2, 2021

Hey @cdimascio! Just checking in to see if there's anything I can do to help out here. Hope all is well!

@cdimascio
Copy link
Owner

hey @mdwheele, i'll publish an alpha version with your change. perhaps you can verify whether the maps work

@cdimascio
Copy link
Owner

@mdwheele, please try npm install express-openapi-validator@4.12.7-alpha.1. let me know your results.

@mdwheele
Copy link
Contributor Author

mdwheele commented Apr 5, 2021

This works great!

@cdimascio
Copy link
Owner

thanks @mdwheele
will get this merged

@cdimascio cdimascio merged commit e983108 into cdimascio:master Apr 23, 2021
@mdwheele
Copy link
Contributor Author

πŸŽ‰ Thanks so much!

crudo pushed a commit to crudo/express-openapi-validator that referenced this pull request Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants