Skip to content

DX | 05-08-2026 | Release - #249

Merged
reeshika-h merged 6 commits into
mainfrom
development
Aug 5, 2026
Merged

DX | 05-08-2026 | Release#249
reeshika-h merged 6 commits into
mainfrom
development

Conversation

@reeshika-h

Copy link
Copy Markdown
Contributor
  • v1.5.0 ---> v1.5.1
  • fix: Resolve require() incompatibility in ESM and UMD builds

reeshika-h and others added 6 commits August 3, 2026 15:41
Three environments broke when keep-alive agents were introduced using
require('http') and require('https'):

1. Native ESM (ReferenceError: require is not defined)
   - Added typeof require === 'undefined' guard in createKeepAliveAgent()
   - Falls back to false (pre-1.5.0 behaviour) in ESM environments

2. Turbopack/webpack (expression is too dynamic)
   - Replaced require(moduleName) variable arg with static string literals
   - require('http') / require('https') are statically analysable by bundlers

3. UMD webpack build (Can't resolve 'http')
   - Added externals for http and https in config/webpack.config.js
   - UMD wrapper resolves them at runtime in Node; isNodeEnvironment guard
     prevents execution in browser where they are not available

Tests added:
- test/esm-compat.mjs: native ESM integration test (run after build)
- test/contentstack-core.node-agent.spec.ts: Jest wrapper spawning esm-compat.mjs
- test/esm-exports.spec.ts: static analysis asserting no dynamic require(variable)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… fix

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fix: Resolve require() incompatibility in ESM and UMD builds
@snyk-io

snyk-io Bot commented Aug 5, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 0 0 25 ✅ Passed
🟡 Medium Severity 0 0 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

✅ No SLA breaches detected. All vulnerabilities are within acceptable time thresholds.

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 0 0 30 / 120 days ✅ Passed
🟡 Medium 0 0 90 / 365 days ✅ Passed
🔵 Low 0 0 180 / 365 days ✅ Passed

✅ BUILD PASSED - All security checks passed

@cs-raj
cs-raj marked this pull request as ready for review August 5, 2026 08:59
@cs-raj
cs-raj requested a review from a team as a code owner August 5, 2026 08:59
@OMpawar-21
OMpawar-21 self-requested a review August 5, 2026 09:00
@reeshika-h
reeshika-h merged commit 1a66bda into main Aug 5, 2026
9 of 10 checks passed
reeshika-h added a commit that referenced this pull request Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants