-
Notifications
You must be signed in to change notification settings - Fork 576
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
chore: publish /src to npm and other fixes for sourcemap debugging #1462
chore: publish /src to npm and other fixes for sourcemap debugging #1462
Conversation
Hi @justingrant, we recently merged the change that would unblock the CodeBuild test failure. Can you rebase this PR? |
Crrently, SDKV3 publishes sourcemaps to npm but doesn't publish source files that those sourcemaps point to. This missing source files breaks debugging use-cases, especially for VSCode users because the VSCode debugger relies on source files for setting breakpoints in the debugger, for debugger call stacks, for "step into" original source, and any other debugger use-cases. Even outside of debugging use-cases, it's helpful for developers consuming transpiled libraries to have original source so they can better understand what the library is doing. Finally, some tools will show warnings when sourcemaps are present but source files are missing, and this commit will fix these warnings.
a5980ea
to
b359ee5
Compare
@AllanFly120 - Rebased as requested. No merge conflicts. Thanks! |
Codecov Report
@@ Coverage Diff @@
## master #1462 +/- ##
==========================================
- Coverage 79.80% 79.71% -0.09%
==========================================
Files 298 302 +4
Lines 11502 11678 +176
Branches 2475 2489 +14
==========================================
+ Hits 9179 9309 +130
- Misses 2323 2369 +46
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1462 +/- ##
==========================================
- Coverage 79.80% 79.71% -0.09%
==========================================
Files 298 302 +4
Lines 11502 11678 +176
Branches 2475 2489 +14
==========================================
+ Hits 9179 9309 +130
- Misses 2323 2369 +46
Continue to review full report at Codecov.
|
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.
Looks good to me! Thank you for the contribution!
follow up to aws#1462
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
This PR replaces #393. @trivikr closed that PR in January 2020 because another PR was supposed to include the same fixes, but #393 contained other fixes to problems that are still broken. Hence this PR with the remaining fixes, including updates to account for changes since Jan 2020. Content below is shamelessly copied from #393.
Currently, SDKV3 publishes sourcemaps to npm but doesn't publish the source files that those sourcemaps point to. This missing source files breaks debugging use-cases, especially for VSCode users because the VSCode debugger relies on source files for setting breakpoints in the debugger, for debugger call stacks, for "step into" original source, and any other debugger use-cases. Even outside of debugging use-cases, it's helpful for developers consuming transpiled libraries to have original source so they can better understand what the library is doing. Finally, some tools will show warnings when sourcemaps are present but source files are missing, and this PR will fix these warnings.
This PR:
jest.config.js
and*.spec.ts
to non-client packages' .npmignore because test files shouldn't be in an NPM download.Removes(This is the one part of fix: remove /src/ from .npmignore (for sourcemaps) #393 that is already fixed so is excluded from this PR)*.ts
from npm for client packages. (also removes!*.d.ts
which is now unnecessary)sourceRoot
torootDir
in tsconfig.json. The latter setting is used by all other SDKV3 packages, and it produces sourcemaps with an emptysourceRoot
field. This is ideal, because thesourceRoot
feature turned out to be buggy in some sourcemap-reading and sourcemap-writing tools. Leaving it blank maximizes compatibility with more tools.This PR is similar to aws/aws-sdk-js-crypto-helpers#5 in the AWS Crypto Helpers library, and aws-amplify/amplify-js#2680 which made similar changes to AWS Amplify library earlier this year.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.