• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

optimizely / javascript-sdk / 3139
78%

Build:
DEFAULT BRANCH: master
Ran 13 Apr 2022 10:44PM UTC
Jobs 7
Files 81
Run time 11min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
3139

cron

travis-ci-com

web-flow
chore: Ship unminified file as ESM entrypoint (#752)

## Background

This PR is copied from [484](https://github.com/optimizely/javascript-sdk/pull/484). It was contributed by @jasonkarns a couple of years ago. I just pulled his changes, merged master and resolved conflicts.

## Summary

ESM entrypoints are very very likely to be consumed by bundlers, not loaded directly into browsers. Therefore it is preferable that the bundlers have access to the unminified source so that consumers can have more control over the final output.

~~This change _adds_ an ESM output bundle that is not minified with terser.~~ (https://github.com/optimizely/javascript-sdk/pull/477 has merged which also adds the unminified ES bundle, so this PR now just makes the unminified bundle the `module` entrypoint.)
Notably, the unminified bundle is created _in addition to_ the minified bundle;
so the minified bundle is still distributed with the package (at the same output location).

This way users who do actually want the minified bundle may still use it.

However, the `package.json#module` entrypoint is changed to reference the unminified bundle, as this is most likely what users will want when consuming from a bundler. (And bundlers are virtually the exclusive consumers of the `module` entrypoint.)

1100 of 1236 branches covered (89.0%)

Branch coverage included in aggregate %.

9638 of 9813 relevant lines covered (98.22%)

521.75 hits per line

Jobs
ID Job ID Ran Files Coverage
3 3139.3 (SDK=javascript SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH) 13 Apr 2022 10:44PM UTC 0
97.19
Travis Job 3139.3
6 3139.6 (SDK=javascript SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH) 13 Apr 2022 10:50PM UTC 0
97.19
Travis Job 3139.6
7 3139.7 (SDK=javascript SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH) 13 Apr 2022 10:53PM UTC 0
97.19
Travis Job 3139.7
8 3139.8 (SDK=javascript SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH) 13 Apr 2022 10:54PM UTC 0
97.19
Travis Job 3139.8
9 3139.9 (SDK=javascript SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH) 13 Apr 2022 10:54PM UTC 0
97.19
Travis Job 3139.9
10 3139.10 (SDK=javascript SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH) 13 Apr 2022 10:54PM UTC 0
97.19
Travis Job 3139.10
11 3139.11 (SDK=javascript SDK_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH) 13 Apr 2022 10:55PM UTC 0
97.19
Travis Job 3139.11
Source Files on build 3139
  • Tree
  • List 81
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Build #3139
  • e092f81a on github
  • Prev Build on master (#3132)
  • Next Build on master (#3147)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc