Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
710 commits
Select commit Hold shift + click to select a range
5d6703b
add unit tests for test coverage
harshitha-cstk Nov 1, 2025
be78783
Merge pull request #258 from contentstack/fix/dx-3674-improve-testcas…
harshithad0703 Nov 5, 2025
1d6fe87
Revert "feat: implement download script for regions.json and update p…
nadeem-cs Nov 5, 2025
3e11d29
Merge pull request #259 from contentstack/revert-255-enhancement/endp…
nadeem-cs Nov 5, 2025
1508842
Enh: add type casting helper for BaseQuery methods to return Query type
sunil-lakshman Nov 5, 2025
5a465b2
Added console.error mock to suppress the error output
sunil-lakshman Nov 6, 2025
ffbbd17
Updated package-lock file
sunil-lakshman Nov 6, 2025
6e4853e
feat: comprehensive API test suite fixes and enhancements
AniketDev7 Nov 10, 2025
f521bd7
refactor: region handling logic to utilize getContentstackEndpoint. …
nadeem-cs Nov 12, 2025
ea7f79a
fix: update default region handling in stack function and improve err…
nadeem-cs Nov 12, 2025
329b2a2
Merge pull request #262 from contentstack/enh/set-region-using-getCon…
nadeem-cs Nov 12, 2025
ab59edb
chore: :wastebasket: remove redundant code
nadeem-cs Nov 12, 2025
c1cef7a
Merge pull request #264 from contentstack/enh/set-region-using-getCon…
nadeem-cs Nov 12, 2025
53df972
Merge pull request #260 from contentstack/enh/dx-3226
harshithad0703 Nov 12, 2025
b578029
upgrade dependencies
harshitha-cstk Nov 12, 2025
74b1714
Merge pull request #265 from contentstack/fix/update-dependency
harshithad0703 Nov 12, 2025
1d6aaea
fix version bump
harshitha-cstk Nov 12, 2025
7d8dce1
Merge pull request #266 from contentstack/fix/version-bump
nadeem-cs Nov 12, 2025
da13ea9
Merge pull request #263 from contentstack/development
harshithad0703 Nov 12, 2025
f3bcca3
Merge pull request #253 from contentstack/staging
harshithad0703 Nov 12, 2025
6031f9d
fix: reverts the endpoints helper method integration
nadeem-cs Nov 13, 2025
da1994e
Merge branch 'main' into fix/revert-endpoints-integration
nadeem-cs Nov 13, 2025
78e499d
fix: revert core package version
nadeem-cs Nov 13, 2025
85d5962
Merge pull request #267 from contentstack/fix/revert-endpoints-integr…
nadeem-cs Nov 13, 2025
4495299
fix: Handle 422 errors gracefully in deep-references 4-level test
AniketDev7 Nov 13, 2025
6ad194b
Improve error messages for invalid arguments and keys in Entries, Ent…
reeshika-h Nov 24, 2025
704a227
Refactor error handling in Entries, Entry, and Query classes to utili…
reeshika-h Nov 24, 2025
870666a
workflow fix 1
reeshika-h Nov 24, 2025
4887f68
feat: Add multi-environment browser testing with real API integration
AniketDev7 Nov 25, 2025
a505458
Fixed the JSDoc Strings
cs-raj Nov 25, 2025
a81d173
Fixed Doc string
cs-raj Nov 25, 2025
4430a84
feat: add multi-environment testing support
AniketDev7 Nov 25, 2025
08012bf
Add CI/CD test script with browser test exclusion option
AniketDev7 Nov 26, 2025
fbc9b65
Merge pull request #270 from contentstack/fix/DR-48
cs-raj Dec 1, 2025
f3447e4
Added Live preview + MG token test csaes
AniketDev7 Dec 1, 2025
368209f
Merge pull request #269 from contentstack/fix/DX-3744-improve-error-msgs
harshithad0703 Dec 3, 2025
4309eb6
version bump
reeshika-h Dec 4, 2025
246ed4e
Merge pull request #273 from contentstack/fix/DX-3744-improve-error-msgs
harshithad0703 Dec 4, 2025
fd9ccd5
bump version to 4.10.4 and update changelog
harshitha-cstk Dec 4, 2025
7059426
Merge pull request #274 from contentstack/fix/version--bump
harshithad0703 Dec 4, 2025
670277b
Merge pull request #275 from contentstack/development
harshithad0703 Dec 4, 2025
7750739
fix: bump @contentstack/core version to ^1.3.4
nadeem-cs Dec 15, 2025
661ffb8
fix: bump version to 4.10.4 and update changelog
nadeem-cs Dec 15, 2025
8c36173
Merge pull request #279 from contentstack/build/core-pkg-version-bump
harshithad0703 Dec 15, 2025
e0931a4
chore: update package-lock
nadeem-cs Dec 15, 2025
3ec2892
Merge branch 'main' into build/core-pkg-version-bump
harshithad0703 Dec 15, 2025
6e35513
fix: add dependencies to various packages in package-lock.json
harshitha-cstk Dec 15, 2025
2373e27
Merge pull request #282 from contentstack/build/core-pkg-version-bump
harshithad0703 Dec 15, 2025
19aa8d5
Merge branch 'main' into feat/dx-3797-update-taxonomy-api
harshitha-cstk Dec 15, 2025
13fa7d9
refactor: update API endpoints from /taxonomy-manager to /taxonomies
harshitha-cstk Dec 15, 2025
251a61c
Merge branch 'main' into feat/taxonomy-publishing
harshitha-cstk Dec 15, 2025
d88c4fc
Merge branch 'feat/taxonomy-publishing' into feat/dx-3797-update-taxo…
harshitha-cstk Dec 15, 2025
8c40783
Merge branch 'main' into fix/back-merge
harshitha-cstk Dec 15, 2025
a85d2a2
Merge pull request #284 from contentstack/feat/dx-3797-update-taxonom…
harshithad0703 Dec 15, 2025
4895794
Merge pull request #285 from contentstack/fix/back-merge
harshithad0703 Dec 15, 2025
111ca84
fix: update error handling in live preview API tests
harshitha-cstk Dec 16, 2025
e3867ea
Merge pull request #286 from contentstack/fix/sanity-test
harshithad0703 Dec 16, 2025
b5312e7
fix security issues
harshitha-cstk Jan 5, 2026
cf3219e
update license
harshitha-cstk Jan 5, 2026
147140d
Merge pull request #289 from contentstack/fix/security-issues
harshithad0703 Jan 5, 2026
f4e6b40
Merge pull request #290 from contentstack/development
harshithad0703 Jan 5, 2026
26b7ecb
Merge pull request #277 from contentstack/staging
harshithad0703 Jan 5, 2026
f7eddfa
chore: update version to 4.10.6 and dependencies; fix changelog for e…
harshitha-cstk Jan 12, 2026
5c7ce79
Merge pull request #291 from contentstack/fix/upgrade-js-core
nadeem-cs Jan 12, 2026
7c79013
Merge pull request #292 from contentstack/staging
harshithad0703 Jan 13, 2026
63b49fd
Merge branch 'main' into feat/taxonomy-publishing
harshitha-cstk Jan 13, 2026
38e9def
Merge branch 'main' into feat/taxonomy-publishing
harshitha-cstk Jan 13, 2026
bbeeec3
Merge development branch with comprehensive test improvements
AniketDev7 Jan 13, 2026
400f32c
Update talismanrc with ignore detectors for package-lock
AniketDev7 Jan 13, 2026
2581b47
Enhance Jest configuration and test setup for improved logging and re…
AniketDev7 Jan 13, 2026
ecdbf8e
Remove redundant postinstall and postupdate scripts from package.json
AniketDev7 Jan 16, 2026
2fd0a94
feat: integrate getContentstackEndpoint for host selection
nadeem-cs Jan 16, 2026
e808d05
Merge pull request #294 from contentstack/feat/DX-3869-endpoints-inte…
nadeem-cs Jan 19, 2026
cfe21d9
Merge branch 'main' into fix/back-merge
harshitha-cstk Jan 19, 2026
626b840
Merge pull request #296 from contentstack/fix/back-merge
harshithad0703 Jan 19, 2026
27ed228
Merge pull request #295 from contentstack/development
harshithad0703 Jan 19, 2026
053966a
Merge branch 'development' into feat/browser-environment-testing
AniketDev7 Jan 19, 2026
ef140c8
Merge pull request #293 from contentstack/feat/browser-environment-te…
AniketDev7 Jan 19, 2026
43bc2aa
test: update locales test case to include assertions
harshitha-cstk Jan 19, 2026
27efb0c
Merge pull request #297 from contentstack/staging
harshithad0703 Jan 19, 2026
407b80a
Merge pull request #298 from contentstack/main
harshithad0703 Jan 19, 2026
a570266
Merge pull request #300 from contentstack/development
AniketDev7 Jan 23, 2026
0b0d42c
updated readme file with host and region support document (#302)
sunil-lakshman Jan 23, 2026
9ef591f
Merge pull request #301 from contentstack/staging
harshithad0703 Jan 27, 2026
5e89a54
Added assetFields for DAM2.0 support
sunil-lakshman Feb 3, 2026
8a95993
updated workflow file
sunil-lakshman Feb 3, 2026
a25ae76
Removed the changes
sunil-lakshman Feb 3, 2026
7cfe989
added node version
sunil-lakshman Feb 3, 2026
f4c0aa5
fix: update coverage workflow to use npm install and custom coverage …
sunil-lakshman Feb 3, 2026
3d5658b
ix: skip prepare script during npm install in CI to prevent hanging
sunil-lakshman Feb 3, 2026
815659f
reverted workflow file
sunil-lakshman Feb 3, 2026
3b368fb
chore: update package-lock file
nadeem-cs Feb 4, 2026
2ac1bb2
chore: update to version 5.0.0 with cache persistence as a separate p…
nadeem-cs Feb 4, 2026
1aed86f
chore: migrate build system from tsup to rollup
nadeem-cs Feb 4, 2026
a1746df
chore: update configuration and scripts for improved testing and buil…
nadeem-cs Feb 4, 2026
a4f5485
refactor: reorganize file structure and enhance caching functionality
nadeem-cs Feb 5, 2026
d2ddc38
Upgraded js core & utils package version
sunil-lakshman Feb 6, 2026
3ae64c8
Added version bump
sunil-lakshman Feb 9, 2026
2a8e89d
Merge pull request #307 from contentstack/fix/dx-4298
sunil-lakshman Feb 9, 2026
e1b844f
Merge pull request #308 from contentstack/development
harshithad0703 Feb 9, 2026
770c9b3
Merge pull request #310 from contentstack/main
harshithad0703 Feb 9, 2026
5860b86
Fix locale error status code assertions to support 400 and 141
AniketDev7 Feb 9, 2026
f971010
Merge pull request #311 from contentstack/fix/locale-error-status-codes
AniketDev7 Feb 9, 2026
f29c924
Merge pull request #309 from contentstack/staging
harshithad0703 Feb 9, 2026
d953d42
Updated package lock file
sunil-lakshman Feb 9, 2026
3392708
Merge pull request #312 from contentstack/fix/package-lock-update
harshithad0703 Feb 9, 2026
26e65aa
Merge pull request #313 from contentstack/main
harshithad0703 Feb 9, 2026
4d390e3
Merge branch 'development' into version5
nadeem-cs Feb 10, 2026
7d28cdc
Merge pull request #306 from contentstack/version5
nadeem-cs Feb 10, 2026
977ceb3
fix: js core and axios version bump
sunil-lakshman Feb 11, 2026
1e63f5f
Merge pull request #314 from contentstack/fix/dx-4468-js-core-version…
sunil-lakshman Feb 12, 2026
f39bbbf
Updated package-lock file
sunil-lakshman Feb 12, 2026
fb09edb
Merge pull request #315 from contentstack/fix/dx-4468-package-lock
sunil-lakshman Feb 12, 2026
c0d20a2
Merge pull request #316 from contentstack/main
harshithad0703 Feb 13, 2026
f1fd787
Merge branch 'staging' into fix/dx-4340-Sync-API-returns-non-Axios-re…
harshitha-cstk Feb 13, 2026
163c327
fix: resolve Sync API non-Axios response issue and update types for s…
harshitha-cstk Feb 13, 2026
589b5db
refactor: update test assertions to use 'items' instead of 'entries' …
harshitha-cstk Feb 13, 2026
e2520ed
fix: correct sync token assertions and improve pagination handling in…
harshitha-cstk Feb 13, 2026
58ad95c
Merge remote-tracking branch 'origin/development' into staging-confli…
sunil-lakshman Feb 13, 2026
8d31ee9
Merge pull request #319 from contentstack/staging-conflict-fix
sunil-lakshman Feb 13, 2026
d2fb213
Merge remote-tracking branch 'origin/development' into staging-confli…
sunil-lakshman Feb 13, 2026
24504f0
Merge pull request #320 from contentstack/staging-conflict-fix1
sunil-lakshman Feb 13, 2026
358d8db
Merge pull request #322 from contentstack/development
naman-contentstack Feb 13, 2026
e38e0ee
chore: downgrade package version from 5.0.1 to 5.0.0 in package.json
harshitha-cstk Feb 13, 2026
1cf341e
Merge pull request #317 from contentstack/fix/dx-4340-Sync-API-return…
harshithad0703 Feb 13, 2026
9cc5fea
Merge pull request #324 from contentstack/development
harshithad0703 Feb 13, 2026
7066ee7
Merge pull request #323 from contentstack/staging
naman-contentstack Feb 16, 2026
cb128a0
Merge pull request #325 from contentstack/main
naman-contentstack Feb 16, 2026
bac1adf
Merge pull request #326 from contentstack/staging
cs-raj Feb 16, 2026
7d11de7
Added support for special symbols in rege method
sunil-lakshman Feb 18, 2026
a538b7f
Merge pull request #327 from contentstack/fix/dx-4498
sunil-lakshman Feb 23, 2026
62e9280
Merge pull request #328 from contentstack/development
naman-contentstack Feb 23, 2026
ef8b93d
Merge pull request #329 from contentstack/staging
naman-contentstack Feb 23, 2026
39af175
Merge pull request #330 from contentstack/main
naman-contentstack Feb 23, 2026
980ac69
Merge pull request #331 from contentstack/staging
naman-contentstack Feb 23, 2026
31e8030
Fixed merge conflits
sunil-lakshman Feb 27, 2026
6fa69e0
Merge branch 'development' into enh/dx-3905
sunil-lakshman Feb 27, 2026
9344f8f
fixed test cases
sunil-lakshman Feb 27, 2026
dec36d4
Merge pull request #305 from contentstack/enh/dx-3905
sunil-lakshman Feb 27, 2026
d222b0a
Merge pull request #334 from contentstack/development
harshithad0703 Feb 27, 2026
117e7e6
fixed failed tests
sunil-lakshman Feb 27, 2026
d134838
Merge pull request #336 from contentstack/fix/asset_fields_tests
sunil-lakshman Feb 27, 2026
05e621a
fix: correct asset_fields[] parameter names for DAM 2.0
AniketDev7 Feb 27, 2026
9bd6efa
Merge pull request #337 from contentstack/fix/asset-fields-correct-pa…
aniket-shikhare-cstk Feb 27, 2026
18df840
Merge pull request #335 from contentstack/staging
harshithad0703 Mar 2, 2026
a4b62c7
Merge pull request #338 from contentstack/main
harshithad0703 Mar 2, 2026
165c68d
Update sca-scan.yml
dhavaljain999 Mar 2, 2026
79648d9
fix: add network tolerance to sync performance assertion
AniketDev7 Mar 4, 2026
507f495
Merge pull request #339 from contentstack/fix/sync-performance-assert…
aniket-shikhare-cstk Mar 4, 2026
a1e6041
fix: added support for special symbols in regex and added tpe support…
sunil-lakshman Mar 9, 2026
f791af6
Merge pull request #340 from contentstack/fix/dx-5325
sunil-lakshman Mar 9, 2026
edb8b43
Merge pull request #341 from contentstack/development
harshithad0703 Mar 9, 2026
7d2b228
Merge pull request #343 from contentstack/main
harshithad0703 Mar 9, 2026
a763410
Merge pull request #342 from contentstack/staging
harshithad0703 Mar 9, 2026
071aef5
Merge branch 'development' into feat/taxonomy-publishing
harshitha-cstk Mar 12, 2026
ed590e2
refactor: reorganize taxonomy imports and add Taxonomy and Term classes
harshitha-cstk Mar 12, 2026
5587efd
chore: remove unused Taxonomy import from stack.ts
harshitha-cstk Mar 12, 2026
7ed8c16
refactor: update import paths for Taxonomy and Term classes to reflec…
harshitha-cstk Mar 12, 2026
09268cc
update package-lock
harshitha-cstk Mar 12, 2026
f14f4e9
Merge branch 'main' into feat/taxonomy-publishing
harshitha-cstk Mar 12, 2026
2e0be5a
Merge branch 'main' into feat/taxonomy-publishing
harshitha-cstk Mar 12, 2026
534f523
Fix: Version Bump
cs-raj Mar 16, 2026
fba7a8a
Merge pull request #346 from contentstack/fix/DX-5492
cs-raj Mar 16, 2026
41f98cb
Merge pull request #348 from contentstack/main
cs-raj Mar 16, 2026
8b1cf31
Merge pull request #347 from contentstack/development
naman-contentstack Mar 16, 2026
a1b7443
Added cursor rules & skills
sunil-lakshman Mar 25, 2026
fbb2b27
Merge pull request #349 from contentstack/enh/dx-5357
sunil-lakshman Mar 25, 2026
3398d83
fix: update entries taxonomy tests to use real stack data
aniket-shikhare-cstk Apr 9, 2026
240cdcd
Added base query methods in content type class
sunil-lakshman Apr 10, 2026
21e68c8
Merge pull request #352 from contentstack/enh/DX-4945
sunil-lakshman Apr 10, 2026
0378648
Merge pull request #354 from contentstack/development
naman-contentstack Apr 13, 2026
cdba1ce
Merge pull request #355 from contentstack/staging
naman-contentstack Apr 13, 2026
aed985a
Merge pull request #356 from contentstack/main
naman-contentstack Apr 13, 2026
6813477
docs(DX-6049): add AGENTS.md, skills, and Cursor rules entry
harshitha-cstk Apr 17, 2026
6c4ac55
Merge pull request #357 from contentstack/fix/dx-6050-update-cursor-r…
harshitha-cstk Apr 17, 2026
d0d05b2
Fixed snyk issues
sunil-lakshman Apr 22, 2026
450fdca
Merge pull request #358 from contentstack/fix/snyk-fix
sunil-lakshman Apr 22, 2026
4212d86
Merge remote-tracking branch 'origin/main' into enh/dx-6157-new-relea…
harshitha-cstk Apr 28, 2026
8cc37d4
chore: align release workflows with new development-to-main process
harshitha-cstk Apr 29, 2026
9521eaf
chore: bump version to 5.2.1 for release-process PR checks
harshitha-cstk Apr 29, 2026
a60336c
update changelog
harshitha-cstk Apr 29, 2026
7a6ce95
revert version bump
harshitha-cstk Apr 29, 2026
32077b7
Merge pull request #360 from contentstack/main
harshitha-cstk Apr 30, 2026
e812430
Merge branch 'development' into enh/dx-6157-new-release-process
harshitha-cstk Apr 30, 2026
bd073bf
Merge pull request #359 from contentstack/enh/dx-6157-new-release-pro…
harshitha-cstk Apr 30, 2026
9d2ebdb
Added Branches support in entry variants
sunil-lakshman May 15, 2026
a0d7d72
fix: update version extraction logic in check-version-bump workflow t…
harshitha-cstk May 15, 2026
088752b
chore: update changelog and bump version to 5.2.1 with dependency upg…
harshitha-cstk May 25, 2026
eecc7ec
fix: enhance version detection in changelog for version bump checks
harshitha-cstk May 25, 2026
760a5e9
Merge pull request #366 from contentstack/fix/dependecy-upgrades
harshitha-cstk May 25, 2026
fb9ab05
Merge pull request #363 from contentstack/development
harshitha-cstk May 25, 2026
8e26c20
Merge pull request #367 from contentstack/main
harshitha-cstk May 25, 2026
22b5f2b
issues-jira.yml
Aravind-Kumar-cstk Jun 19, 2026
5bbcc60
Merge pull request #370 from contentstack/main
harshitha-cstk Jun 19, 2026
f879b8b
Fix: Upgrade dependencies
harshitha-cstk Jun 24, 2026
d0ab9a1
version bump
harshitha-cstk Jun 24, 2026
41c440b
Merge pull request #372 from contentstack/fix/snyk-issues
harshitha-cstk Jun 24, 2026
37f0efa
Merge pull request #373 from contentstack/main
harshitha-cstk Jun 24, 2026
2ff390c
Delete issues-jira.yml
Aravind-Kumar-cstk Jun 30, 2026
cf621e8
Merge branch 'development' into feat/taxonomy-publishing
harshitha-cstk Jul 15, 2026
3c987b6
feat: add locale and includeFallback support to taxonomy CDA delivery
cs-raj Jul 15, 2026
dae3f07
Merge pull request #374 from contentstack/enhc/taxonomy-localisation-2
harshitha-cstk Jul 15, 2026
dcf6048
feat(taxonomy): add query-parameter support to Taxonomy, Term, and Te…
harshitha-cstk Jul 15, 2026
cdd2fee
version bump
harshitha-cstk Jul 15, 2026
8121f6a
add taxonomy localization test cases
harshitha-cstk Jul 15, 2026
82fc012
test: add locale/includeFallback coverage for taxonomy, term, and ter…
cs-raj Jul 15, 2026
5a7b189
fix: tests
cs-raj Jul 15, 2026
5801073
chore: fix test cases
cs-raj Jul 15, 2026
5a8e9c0
Merge pull request #345 from contentstack/feat/taxonomy-publishing
cs-raj Jul 15, 2026
1264482
chore: updated changelog
cs-raj Jul 15, 2026
1b45bf5
chore: changelog update
cs-raj Jul 15, 2026
618ac03
Merge pull request #375 from contentstack/feat/taxonomy-publishing
netrajpatel Jul 15, 2026
cf91770
Merge remote-tracking branch 'origin/development' into fix/entries-ta…
netrajpatel Jul 15, 2026
830f66a
Merge pull request #351 from contentstack/fix/entries-taxonomy-test-data
netrajpatel Jul 15, 2026
578f158
Merge branch 'main' into development
cs-raj Jul 15, 2026
01c3e69
Merge pull request #377 from contentstack/fix/dev
cs-raj Jul 15, 2026
c50679f
Merge pull request #376 from contentstack/development
maheshmotkar-cs Jul 15, 2026
587202b
Merge pull request #378 from contentstack/main
cs-raj Jul 16, 2026
34113cc
feat(taxonomy): remove locale param from fetch(), bump to v5.4.0
cs-raj Jul 16, 2026
6fcb900
Merge pull request #379 from contentstack/feat/taxonomy-publishing-v5…
cs-raj Jul 16, 2026
39ee605
Merge pull request #380 from contentstack/main
cs-raj Jul 16, 2026
7282338
refactor: update variant description in Entries and Entry classes for…
reeshika-h Jul 20, 2026
d73a5c5
Merge remote-tracking branch 'origin/development' into enh/DX-7322
reeshika-h Jul 20, 2026
f779976
version bump
reeshika-h Jul 20, 2026
40256be
chore: add missing version header for 5.4.0 in CHANGELOG.md
reeshika-h Jul 21, 2026
fb74608
Merge pull request #361 from contentstack/enh/DX-7322
OMpawar-21 Jul 24, 2026
a03561d
test: add rich HTML report and fix API suite for enriched v5 stack
aniket-shikhare-cstk Jul 26, 2026
62ad828
Merge pull request #382 from contentstack/enh/DX-7322-rich-report-and…
aniket-shikhare-cstk Jul 29, 2026
4c7eb3b
Merge pull request #381 from contentstack/development
OMpawar-21 Jul 29, 2026
335d975
Merge pull request #383 from contentstack/main
OMpawar-21 Jul 29, 2026
7a4eaec
fix-today
OMpawar-21 Jul 31, 2026
8a56e40
sca-scan.yml
Aravind-Kumar-cstk Aug 2, 2026
f9ac1f0
fix(DX-10060): retry transient network errors to prevent build crashes
OMpawar-21 Aug 3, 2026
c9a16bc
chore: bump version to 5.6.0
OMpawar-21 Aug 3, 2026
0d45b5b
test(DX-10060): cover throwing retryCondition to resolve CI coverage …
OMpawar-21 Aug 3, 2026
1cbdcc4
chore: bump version to 5.5.1 and update dependencies in package.json …
reeshika-h Aug 3, 2026
e04cb55
Merge branch 'main' into fix/DX-9991
cs-raj Aug 3, 2026
e8a4eea
Merge pull request #386 from contentstack/fix/DX-9991
reeshika-h Aug 3, 2026
29dce77
Merge pull request #387 from contentstack/main
reeshika-h Aug 3, 2026
e0cfc39
Merge branch 'development' into fix/DX-10060
OMpawar-21 Aug 4, 2026
19ec2c9
fix(DX-10060): address Copilot review comments and close branch cover…
OMpawar-21 Aug 5, 2026
99fb4ad
chore: Prepare 5.5.2 release with @contentstack/core ^1.5.1
reeshika-h Aug 5, 2026
ea5cc12
Merge pull request #388 from contentstack/chore/DX-release-5.5.2-core…
reeshika-h Aug 5, 2026
0bb6187
Merge pull request #389 from contentstack/development
reeshika-h Aug 5, 2026
1c4b28c
Merge pull request #390 from contentstack/main
OMpawar-21 Aug 5, 2026
065ddc0
fix(DX-10060): address second Copilot review — changelog date and JSD…
OMpawar-21 Aug 5, 2026
3e4e178
Merge branch 'development' into fix/DX-10060
OMpawar-21 Aug 5, 2026
4d3344a
Merge pull request #385 from contentstack/fix/DX-10060
OMpawar-21 Aug 6, 2026
f9738ce
chore: reconcile diverged git histories
cs-raj Aug 11, 2026
b83159c
Merge pull request #392 from contentstack/fix/reconcile-history
OMpawar-21 Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### Version: 5.6.0
#### Date: Aug-10-2026
Fix: Transient network-layer errors (ENOTFOUND, ENETUNREACH, ECONNRESET, ECONNREFUSED, EAI_AGAIN, ETIMEDOUT, EHOSTUNREACH, ENETDOWN) are now retried automatically using the SDK's configured retry policy instead of failing immediately.
Enhancement: User-supplied `retryCondition` is composed with the default network-error retry logic — both are honoured without either replacing the other. If `retryCondition` throws, the SDK logs a warning via `logHandler` and falls back to default retry behaviour.

### Version: 5.5.2
#### Date: Aug-05-2026
Fix: Bump `@contentstack/core` to `^1.5.1`:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/delivery-sdk",
"version": "5.5.2",
"version": "5.6.0",
"type": "module",
"license": "MIT",
"engines": {
Expand Down
29 changes: 29 additions & 0 deletions src/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,35 @@ export function isBrowser() {
return (typeof window !== "undefined");
}

/**
* Node.js/libuv error codes that represent transient, retryable network-layer
* failures. All occur before an HTTP response is received (error.response is
* undefined). ECONNABORTED is excluded — @contentstack/core handles it as a
* structured TIMEOUT error and it should not be retried here.
*/
export const TRANSIENT_NETWORK_ERROR_CODES: ReadonlySet<string> = new Set([
'ENOTFOUND', // DNS resolution failed
'ENETUNREACH', // no route to host
'ECONNRESET', // connection reset mid-flight
'ECONNREFUSED', // port closed / service not listening
'EAI_AGAIN', // DNS server returned SERVFAIL (transient)
'ETIMEDOUT', // OS-level connection timeout
'EHOSTUNREACH', // no route to host at IP layer
'ENETDOWN', // local network interface down
]);

/**
* Determines whether an error represents a transient, retryable network-layer
* failure (e.g. DNS lookup failure, connection reset), used to build the SDK's
* default retry behavior so a single blip doesn't crash the caller (e.g. a
* Next.js static build) instead of being silently retried.
* @param {any} error - The error thrown by the underlying HTTP client (Axios)
* @returns {boolean} True if `error.code` matches a known transient network error code and no HTTP response was received (`error.response` is absent)
*/
export function isTransientNetworkError(error: any): boolean {
return !!error && typeof error.code === 'string' && !error.response && TRANSIENT_NETWORK_ERROR_CODES.has(error.code);
}

/**
* Encodes query parameters recursively, handling nested objects
* @param {params} params - Query parameters object to encode
Expand Down
19 changes: 17 additions & 2 deletions src/stack/contentstack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,24 @@ export function stack(config: StackConfig): StackClass {
}
}

// Retry policy handlers
// Retry policy handlers.
// Network-layer errors (DNS failures, connection resets, etc.) are retried
// by default, composed on top of any user-supplied retryCondition.
// The user's retryCondition reference is never replaced — only wrapped.
const combinedRetryCondition = (error: any) => {
try {
if (config.retryCondition?.(error)) return true;
} catch (e) {
config.logHandler?.('warn', {
type: 'retry_condition_error',
message: `[Contentstack SDK] retryCondition callback threw: "${(e as Error)?.message ?? e}". Check your retryCondition implementation. Falling back to default network-error retry behavior.`,
error: e,
});
}
return Utility.isTransientNetworkError(error);
};
const errorHandler = (error: any) => {
return retryResponseErrorHandler(error, config, client);
return retryResponseErrorHandler(error, { ...config, retryCondition: combinedRetryCondition }, client);
};
client.interceptors.request.use(retryRequestHandler);
client.interceptors.response.use(retryResponseHandler, errorHandler);
Expand Down
310 changes: 310 additions & 0 deletions test/unit/network-error-retry.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
import * as Contentstack from '../../src/stack';
import { StackConfig } from '../../src/common/types';
import MockAdapter from 'axios-mock-adapter';

describe('Default network-error retry behavior', () => {
let mockClient: MockAdapter | undefined;

afterEach(() => {
mockClient?.restore();
mockClient = undefined;
});

const dnsError = (code: string) => (config: any) =>
Promise.reject(
Object.assign(new Error(`getaddrinfo ${code} example.com`), {
code,
config,
isAxiosError: true,
})
);

it('(a) retries and succeeds after a single transient ENOTFOUND failure with no custom retryCondition', async () => {
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryDelay: 10,
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

mockClient
.onGet('/content_types/test')
.replyOnce(dnsError('ENOTFOUND'))
.onGet('/content_types/test')
.reply(200, { content_types: [] });

const res = await client.get('/content_types/test');
expect(res.status).toBe(200);
});

it('(b) still fails after retryLimit is exhausted on a permanent network failure', async () => {
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryLimit: 2,
retryDelay: 10,
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

mockClient.onGet('/content_types/test').reply(dnsError('ENOTFOUND'));

await expect(client.get('/content_types/test')).rejects.toBeDefined();
});

it('(c) composes with a user-supplied retryCondition without replacing it', async () => {
const userCondition = jest.fn((error: any) => error?.response?.status === 500);
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryDelay: 10,
retryCondition: userCondition,
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

mockClient
.onGet('/content_types/test')
.replyOnce(dnsError('ECONNRESET'))
.onGet('/content_types/test')
.reply(200, { content_types: [] });

const res = await client.get('/content_types/test');
expect(res.status).toBe(200);
// config is never mutated — stack.config.retryCondition stays the exact
// user-supplied function, matching the identity assertion already made
// by test/unit/retry-configuration.spec.ts.
expect(stack.config.retryCondition).toBe(userCondition);
});

it('(d) ECONNABORTED (axios timeout) is NOT retried — core classifies it as a structured TIMEOUT error', async () => {
// ECONNABORTED is excluded from TRANSIENT_NETWORK_ERROR_CODES so that
// @contentstack/core can surface it as { error_code: "TIMEOUT" } (#239).
// Retrying it here would bypass that structured classification.
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryDelay: 10,
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

mockClient.onGet('/content_types/test').timeout();

await expect(client.get('/content_types/test')).rejects.toBeDefined();
});

it('(e) ENETUNREACH and ETIMEDOUT (the customer-reported codes) are retried', async () => {
for (const code of ['ENETUNREACH', 'ETIMEDOUT'] as const) {
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryDelay: 10,
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
const mock = new MockAdapter(client);

mock
.onGet('/content_types/test')
.replyOnce(dnsError(code))
.onGet('/content_types/test')
.reply(200, { content_types: [] });

const res = await client.get('/content_types/test');
expect(res.status).toBe(200);
mock.restore();
}
});

it('(f) EAI_AGAIN (DNS servfail, intermittent) is retried', async () => {
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryDelay: 10,
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

mockClient
.onGet('/content_types/test')
.replyOnce(dnsError('EAI_AGAIN'))
.onGet('/content_types/test')
.reply(200, { content_types: [] });

const res = await client.get('/content_types/test');
expect(res.status).toBe(200);
});

it('(g) retryCondition that throws is caught — structured warning logged and SDK falls back to default retry', async () => {
const warnPayloads: any[] = [];
const throwingCondition = () => { throw new Error('boom'); };
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryDelay: 10,
retryCondition: throwingCondition,
logHandler: (level: string, msg: any) => {
if (level === 'warn') warnPayloads.push(msg);
},
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

mockClient
.onGet('/content_types/test')
.replyOnce(dnsError('ENOTFOUND'))
.onGet('/content_types/test')
.reply(200, { content_types: [] });

const res = await client.get('/content_types/test');
expect(res.status).toBe(200);
expect(warnPayloads.length).toBeGreaterThan(0);
expect(warnPayloads[0]).toEqual(expect.objectContaining({ type: 'retry_condition_error' }));
expect(warnPayloads[0].message).toContain('[Contentstack SDK]');
expect(warnPayloads[0].message).toContain('boom');
});

it('(h1) retryCondition throws a non-Error (string) — ?? fallback logs the raw thrown value', async () => {
const warnPayloads: any[] = [];
const throwingCondition = () => { throw 'not-an-error-object'; };
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryDelay: 10,
retryCondition: throwingCondition,
logHandler: (level: string, msg: any) => {
if (level === 'warn') warnPayloads.push(msg);
},
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

mockClient
.onGet('/content_types/test')
.replyOnce(dnsError('ENOTFOUND'))
.onGet('/content_types/test')
.reply(200, { content_types: [] });

const res = await client.get('/content_types/test');
expect(res.status).toBe(200);
expect(warnPayloads[0]).toEqual(expect.objectContaining({ type: 'retry_condition_error' }));
// message uses the raw thrown value via the ?? fallback since it has no .message
expect(warnPayloads[0].message).toContain('not-an-error-object');
});

it('(h) retryCondition that throws with no logHandler — SDK falls back silently without throwing', async () => {
const throwingCondition = () => { throw new Error('boom'); };
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryDelay: 10,
retryCondition: throwingCondition,
// no logHandler — exercises the logHandler?. undefined branch
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

mockClient
.onGet('/content_types/test')
.replyOnce(dnsError('ENOTFOUND'))
.onGet('/content_types/test')
.reply(200, { content_types: [] });

const res = await client.get('/content_types/test');
expect(res.status).toBe(200);
});

it('(k) retryCondition returning true triggers retry even for non-transient-code errors', async () => {
// Covers the `if (config.retryCondition?.(error)) return true` branch.
const alwaysRetry = jest.fn().mockReturnValue(true);
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryDelay: 10,
retryCondition: alwaysRetry,
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

// Use a generic error with no recognized code — only user retryCondition covers it.
const genericError = (cfg: any) =>
Promise.reject(Object.assign(new Error('generic'), { config: cfg, isAxiosError: true }));

mockClient
.onGet('/content_types/test')
.replyOnce(genericError)
.onGet('/content_types/test')
.reply(200, { content_types: [] });

const res = await client.get('/content_types/test');
expect(res.status).toBe(200);
expect(alwaysRetry).toHaveBeenCalled();
});

it('(i) retryOnError: false disables network-error retries — ENOTFOUND throws immediately', async () => {
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryOnError: false,
retryDelay: 10,
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

// Second route intentionally registered — if the SDK retried it would succeed,
// proving the test would only pass when retryOnError: false truly disables retry.
mockClient
.onGet('/content_types/test')
.replyOnce(dnsError('ENOTFOUND'))
.onGet('/content_types/test')
.reply(200, { content_types: [] });

await expect(client.get('/content_types/test')).rejects.toBeDefined();
});

it('(j) retryLimit: 0 disables network-error retries — ENOTFOUND throws immediately', async () => {
const config: StackConfig = {
apiKey: 'TEST-API-KEY',
deliveryToken: 'TEST-DELIVERY-TOKEN',
environment: 'TEST-ENVIRONMENT',
retryLimit: 0,
retryDelay: 10,
};
const stack = Contentstack.stack(config);
const client = stack.getClient();
mockClient = new MockAdapter(client);

// Second route intentionally registered — if the SDK retried it would succeed,
// proving the test would only pass when retryLimit: 0 truly disables retry.
mockClient
.onGet('/content_types/test')
.replyOnce(dnsError('ENOTFOUND'))
.onGet('/content_types/test')
.reply(200, { content_types: [] });

await expect(client.get('/content_types/test')).rejects.toBeDefined();
});
});
Loading