fix: remove /src/ from .npmignore (for sourcemaps) #393
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.
Crrently, 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:
/src
from npm for non-client packages, but adds addsjest.config.js
and*.spec.ts
to these packages' .npmignore because it's not expected to be able to run your tests using an NPM download.*.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.