Add dist files, bundler integration tests #74
Closed
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.
Still in progress, bugs remain
Description
This PR builds on #68 and generates three different dist files with rollup - an ES6 module version, a CommonJS version, and a UMD version. These are listed under
pkg.module
,pkg.main
, andpkg.browser
respectively.This PR adds integration tests that run automatically with CircleCI to test that SES's dist files are usable with the main JavaScript bundlers and tools. We test SES with Webpack, Browserify, Rollup, Parcel, and a mocked version of what unpkg would provide after publishing the latest version to npm. There is a README.md in /integration-test with more detailed information.
Current Bugs
2. Right now the bundlers will error when they try to bundle our tests of the require() functionality because the bundler will not be able to find the modulesAs a partial fix, the test-require.js tests are not included in the test suite run by webpack and parcel, but they are tested in rollup, browserify, and unpkg. This prevents this error entirely, but it does mean that we will not catch future error related to the require functionality in webpack and parcel.unknown
andfoo
Considerations
We still need to test using the ES6 module version directly in the browser with
type="module"
. This seems to require spinning up a small server on CircleCI.Tests
npm test
to make sure normal tests still passnpm run build
to build the dist filesnpm pack
to check that the dist files are included in the npm tarballtest_integration
job locally with the CircleCI command line tool:circleci local execute --job test_integration