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

optimizely / javascript-sdk / 38805102404
78%

Build:
DEFAULT BRANCH: master
Ran 15 Oct 2026 08:51PM UTC
Jobs 4
Files 125
Run time 1min
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

15 Oct 2026 08:49PM UTC coverage: 77.624%. Remained the same
38805102404

push

github

web-flow
[FSSDK-13287] Make React Native polyfills optional and isolate optional requires (#1179)

## Summary
- **Polyfill packages are optional.** `fast-text-encoding` and `react-native-get-random-values` are loaded if installed. Both keep an existing global, so a native `TextEncoder` (Hermes in RN 0.74+) or an app's own polyfill (for example `react-native-quick-crypto`, imported in the app's entry file before the SDK) is used instead. If `TextEncoder` or `crypto.getRandomValues` is still missing, `index.react_native.ts` throws at import with an error that names the package to install.
- **Optional import shims in `lib/import.react_native/`.** There is one shim per optional package, named after the package: `fast-text-encoding.ts`, `react-native-get-random-values.ts` and `@react-native-async-storage/async-storage.ts`. Each one:
  - does its `require` inside `try/catch` while the module loads;
  - exports `isAvailable` plus the package's exports that the SDK uses, under the same names, which are `undefined` if the package is missing;
  - never throws. The importer decides what a missing package means.
- **Shims are built as separate files.** Rollup builds each shim to the same path under `dist/import.react_native/`, and the main React Native bundles load them by relative path. A small `resolveId` plugin keeps the shim imports out of the main bundles. The main bundles no longer contain any optional `require`, and the node, browser and universal bundles are unchanged.
- **AsyncStorage:** the compat helper (`ensureMultiGet`, which adds `multiGet` on v3) is merged into the async-storage shim. The shim exports the package's `default`, with `multiGet` added. The "Module not found" check moved to `AsyncStorageCache`. The CJS bundles read shim default exports through Rollup's `esModule` interop, applied only to shim imports.
- **Build check:** a Rollup plugin fails the build unless every built shim contains exactly one `require()`, of its own package. That catches imp... (continued)

1549 of 3029 branches covered (51.14%)

Branch coverage included in aggregate %.

8990 of 10548 relevant lines covered (85.23%)

261.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-18 - 38805102404.1 15 Oct 2026 08:52PM UTC 125
77.62
GitHub Action Run
2 run-20 - 38805102404.2 15 Oct 2026 08:52PM UTC 125
77.62
GitHub Action Run
3 run-24 - 38805102404.3 15 Oct 2026 08:51PM UTC 125
77.62
GitHub Action Run
4 run-22 - 38805102404.4 15 Oct 2026 08:52PM UTC 125
77.62
GitHub Action Run
Source Files on build 38805102404
  • Tree
  • List 125
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • f308ecb1 on github
  • Prev Build on master (#38429501638)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc