chore: build cjs rollup without typescript #7580
Merged
+536
−615
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.
Issue
n/a
Review diff without JSON files: https://github.com/aws/aws-sdk-js-v3/pull/7580/files?file-filters%5B%5D=.js&show-viewed-files=true
Description
This changes the build pipeline of cjs artifacts.
The motivation for this comes from the build speed of rollup-plugin-typescript. They do not allow an option to skip typechecking. Although
noCheckis set as a compiler option, this is not compatible with how they integrate typescript into the rollup build. This slows the build significantly -- e.g. the core package needs 20s to build cjs.With this change rollup can build the core package's dist-es -> dist-cjs in 4s. Typechecking coverage is applied during the build of
dist-types, so it is redundant in the CJS process. Indeed,noCheck: trueis already in effect forbuild:es.Testing
CI - because e2e runs against the dist-cjs files, it gives high confidence that the change is acceptable.
I also manually verified that the dist-cjs artifacts generated in this way do not differ from what is currently on npmjs.org with both submodule-style packages (core) and non-submodule packages (client-s3).