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

optimizely / javascript-sdk / 19867184772

02 Dec 2025 05:12PM UTC coverage: 77.752% (-0.6%) from 78.387%
19867184772

push

github

web-flow
[FSSDK-12092] add platform verification for imports  (#1112)

This PR implements a comprehensive platform isolation system for a multi-platform JavaScript SDK that supports Browser, Node.js, and React Native. The system enforces that platform-specific code cannot be imported by incompatible platforms, preventing runtime errors when bundling for different targets.

**Key changes:**
- Adds validation scripts that check `__platforms` exports and import compatibility
- Adds script to automatically add `__platforms` exports based on file name
- Integrates ESLint rule to enforce platform declarations at development time
- Adds extensive documentation and troubleshooting guides
- Updates all source files to include `__platforms` exports

1526 of 3001 branches covered (50.85%)

Branch coverage included in aggregate %.

142 of 226 new or added lines in 99 files covered. (62.83%)

9014 of 10555 relevant lines covered (85.4%)

334.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

21.79
packages/optimizely-sdk/scripts/platform-utils.js


Source Not Available

The file "scripts/platform-utils.js" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

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