Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
483 commits
Select commit Hold shift + click to select a range
f8e2577
Node version bump in package publish workflow (#230)
sunil-lakshman Oct 16, 2024
2f71d6b
Merge pull request #225 from contentstack/staging
cs-raj Oct 17, 2024
3bd8610
Merge pull request #231 from contentstack/master
harshithad0703 Oct 17, 2024
6ae4421
Merge pull request #232 from contentstack/staging
cs-raj Oct 18, 2024
28a0fae
Merge pull request #233 from contentstack/development
cs-raj Oct 18, 2024
961af41
Fix Development
cs-raj Oct 23, 2024
611f43d
Merge pull request #235 from contentstack/fix/versionbump
cs-raj Oct 29, 2024
cd681bd
Merge pull request #236 from contentstack/development
cs-raj Oct 29, 2024
8491127
Merge pull request #234 from contentstack/staging
cs-raj Nov 8, 2024
b481102
Merge pull request #237 from contentstack/master
cs-raj Nov 8, 2024
535c5ec
Merge pull request #238 from contentstack/staging
cs-raj Nov 8, 2024
1e922f8
Handle empty entries in case of Live Preview with proper error message
harshitha-cstk Nov 14, 2024
c51c61e
code changes to handle empty entries
harshitha-cstk Nov 14, 2024
50e0bd3
updated the condition to reject with error message
harshitha-cstk Nov 14, 2024
1bb5c36
Merge pull request #239 from contentstack/fix/dx-1675-handle-empty-en…
harshithad0703 Nov 14, 2024
178287f
Merge pull request #240 from contentstack/development
cs-raj Nov 14, 2024
d6e41dd
Merge pull request #241 from contentstack/staging
cs-raj Nov 18, 2024
0772cd7
Merge pull request #243 from contentstack/master
cs-raj Nov 18, 2024
4b08e3f
Merge pull request #245 from contentstack/staging
cs-raj Nov 18, 2024
a082cc1
Include HTTP error codes in the findOne method (#250)
sunil-lakshman Dec 2, 2024
8a268b0
Merge pull request #251 from contentstack/development
cs-raj Dec 2, 2024
33824b6
fix: added fix for updateasseturl for handling jrte within blocks
Dec 2, 2024
b018a0d
Merge pull request #252 from contentstack/staging
cs-raj Dec 5, 2024
060d2d7
Merge pull request #254 from contentstack/master
cs-raj Dec 5, 2024
0041904
Merge pull request #255 from contentstack/staging
cs-raj Dec 5, 2024
fb8089d
Merge pull request #253 from contentstack/fix/DX-1371
vkalta Dec 5, 2024
82afc27
dropping isomorphic-fetch and node-fetch
harshitha-cstk Dec 16, 2024
7fce4c7
version bumpt to 3.23.1
harshitha-cstk Dec 16, 2024
19e8802
removed commented lines
harshitha-cstk Dec 17, 2024
14ce29e
Updated error codes in testcases
sunil-lakshman Dec 17, 2024
cce05b4
Merge pull request #260 from contentstack/fix/http_code_testcases
harshithad0703 Dec 17, 2024
06748e6
Merge pull request #259 from contentstack/fix/dx-1415-drop-isomorphic…
harshithad0703 Dec 17, 2024
f9d4afc
fix: disable minification for improved debugging
Dec 18, 2024
5f61900
Update README.md
kartikk868 Jan 9, 2025
a0495bf
fix: setting minimize to true for browser
Jan 9, 2025
b649e8a
verison bump
cs-raj Jan 13, 2025
c083f37
license update
cs-raj Jan 13, 2025
ab24a18
Updated slack bolt and qs
cs-raj Jan 18, 2025
fc7f6e4
sca-scan.yml
Aravind-Kumar-cstk Jan 20, 2025
b5ff776
jira.yml
Aravind-Kumar-cstk Jan 20, 2025
8047531
sast-scan.yml
Aravind-Kumar-cstk Jan 20, 2025
da71584
codeql-analysis.yml
Aravind-Kumar-cstk Jan 20, 2025
8dfb816
Updated codeowners
Aravind-Kumar-cstk Jan 20, 2025
904e5c0
Merge pull request #263 from contentstack/fix/VersionBump
cs-raj Jan 20, 2025
0bd34ee
version fixed
cs-raj Jan 20, 2025
0f37f08
Merge pull request #264 from contentstack/fix/VersionBump
cs-raj Jan 20, 2025
f56d0e3
sanity update for dev11
harshitha-cstk Jan 21, 2025
472a214
Merge pull request #265 from contentstack/fix/dx-2069-sanity-update-d…
harshithad0703 Jan 21, 2025
b0f9b8e
Merge pull request #261 from contentstack/feat/DX-1417
vkalta Jan 21, 2025
fac4f47
Merge branch 'master' into staging
cs-raj Jan 21, 2025
10df26d
Merge pull request #266 from contentstack/fix/stage
cs-raj Jan 21, 2025
8c985a1
Merge pull request #267 from contentstack/staging
cs-raj Jan 21, 2025
4b6873b
Merge pull request #268 from contentstack/development
cs-raj Jan 21, 2025
de27647
fix: added npm token to github release pipeline
Jan 22, 2025
2c4658e
Refactor getCacheCallback to directly use parent promise's resolve an…
sunil-lakshman Jan 24, 2025
fde3844
removed cheerio package as it had high vulnerability in latest update
harshitha-cstk Jan 29, 2025
91a0e1f
update sanity reports files
harshitha-cstk Jan 29, 2025
815b03b
version bump to 3.24.2
harshitha-cstk Jan 29, 2025
9ea4492
Merge pull request #274 from contentstack/fix/dx-2117-snyk-issue
harshithad0703 Jan 29, 2025
83112f8
DX | 27-01-2025 | Release (#269)
cs-raj Jan 30, 2025
cc4eff0
DX | 27-01-2025 | Release (#269) (#276)
sunil-lakshman Jan 30, 2025
2b428cd
DX | 27-01-2025 | Release | Refactor getCacheCallback to directly use…
sunil-lakshman Jan 30, 2025
3b45348
Back merge (#277)
sunil-lakshman Jan 30, 2025
2764580
Merge branch 'staging' into fix/27-01-2025-backmerge
harshitha-cstk Jan 30, 2025
46f7e66
update packages with master
harshitha-cstk Jan 30, 2025
cb77d3c
Merge pull request #278 from contentstack/fix/27-01-2025-backmerge
harshithad0703 Jan 30, 2025
2571efa
Merge remote-tracking branch 'origin/development' into fix/27-01-2025…
harshitha-cstk Jan 30, 2025
d0ce01d
update package files and changeLog
harshitha-cstk Jan 30, 2025
49fba2e
updated change log
harshitha-cstk Jan 30, 2025
987046e
#262 update readme file
harshitha-cstk Jan 30, 2025
348cf89
Merge pull request #279 from contentstack/fix/27-01-2025-backmerge-st…
harshithad0703 Jan 30, 2025
94eba5f
Merge pull request #280 from contentstack/development
harshithad0703 Jan 30, 2025
501d2eb
Fixed license and semgrep issues (#282)
sunil-lakshman Feb 3, 2025
68e68eb
Fixed license and semgrep issues (#282) (#283)
sunil-lakshman Feb 3, 2025
8361630
DX | 03-02-2025 | Hotfix Release (#281)
harshithad0703 Feb 3, 2025
db04629
fix: update registry url
Feb 5, 2025
450228d
Update node version to 22
sunil-lakshman Feb 6, 2025
6428dc8
Merge pull request #284 from contentstack/master
cs-raj Feb 6, 2025
b48b0f8
Merge pull request #285 from contentstack/enh/dx-1732
harshithad0703 Feb 6, 2025
07dd35d
update sanity message
harshitha-cstk Feb 11, 2025
0bf1d17
Merge pull request #287 from contentstack/fix/sanity-message
reeshika-h Feb 11, 2025
075ebcf
Merge pull request #288 from contentstack/development
harshithad0703 Feb 18, 2025
1fc9f90
Merge pull request #289 from contentstack/staging
cs-raj Feb 25, 2025
3bf3785
Merge pull request #290 from contentstack/master
cs-raj Feb 25, 2025
efb148b
fix: reset timeline preview variables when not found
nadeem-cs Feb 26, 2025
856444b
Merge pull request #291 from contentstack/fix/DX-2225-timeline-previe…
nadeem-cs Feb 26, 2025
74a14e1
chore: update changelog
nadeem-cs Feb 26, 2025
971bac2
Merge pull request #293 from contentstack/fix/DX-2225-timeline-previe…
nadeem-cs Feb 26, 2025
8ffb4fa
Merge pull request #292 from contentstack/development
nadeem-cs Feb 26, 2025
8bb22f0
Merge pull request #270 from contentstack/fix/DX-1101
vkalta Feb 26, 2025
582ba03
chore: update version to 3.24.3 in package-lock.json
harshitha-cstk Feb 26, 2025
7e8e3ac
Merge branch 'development' into patch-1
nadeem-cs Feb 26, 2025
de92794
Merge pull request #296 from contentstack/fix/package-lock
harshithad0703 Feb 26, 2025
507c1a1
Merge pull request #295 from contentstack/development
harshithad0703 Feb 26, 2025
48473b4
Merge pull request #262 from myWorkshop123/patch-1
harshithad0703 Feb 26, 2025
806e224
feat: update version to 3.25.0 and add GCP-EU support
harshitha-cstk Feb 28, 2025
c865f68
Merge pull request #297 from contentstack/feat/gcp-eu-support
harshithad0703 Mar 3, 2025
b021f6e
Merge pull request #294 from contentstack/staging
harshithad0703 Mar 4, 2025
7ff84d6
Merge pull request #298 from contentstack/master
harshithad0703 Mar 4, 2025
40feb26
Merge pull request #299 from contentstack/staging
harshithad0703 Mar 4, 2025
a17f6d8
Merge pull request #300 from contentstack/development
cs-raj Mar 5, 2025
67def70
fix: validate parameters in sync method and ensure query parameters a…
harshitha-cstk Mar 11, 2025
e96d172
Merge pull request #303 from contentstack/fix/dx-2269-sre-issue
harshithad0703 Mar 11, 2025
4a26d1a
Merge pull request #301 from contentstack/staging
cs-raj Mar 11, 2025
753c855
Merge pull request #304 from contentstack/staging
cs-raj Mar 12, 2025
6c7a19f
feat: add Jest configuration for testing environment and reporting
harshitha-cstk Mar 20, 2025
07e1095
refactor: improve test summary reporting in sanity-report.js
harshitha-cstk Mar 20, 2025
0fdc336
refactor: update tests to use jest and improve readability
harshitha-cstk Mar 20, 2025
62bd7a9
fix: update live preview test to use correct CDN host
harshitha-cstk Mar 20, 2025
aea6188
feat: update testing scripts and enhance Slack reporting for test res…
harshitha-cstk Mar 20, 2025
6a3128a
refactor: remove unnecessary invocation of sendSlackMessage in sanity…
harshitha-cstk Mar 20, 2025
fc7fabe
refactor: remove try catch blocks in test cases
harshitha-cstk Mar 20, 2025
a766e31
fix: update Slack channel in sendSlackMessage function
harshitha-cstk Mar 24, 2025
c358492
update dependencies
harshitha-cstk Mar 26, 2025
6bf3821
Merge pull request #307 from contentstack/fix/dx-2317-slack-fail-msg
harshithad0703 Mar 26, 2025
9e79d7c
Merge pull request #308 from contentstack/development
harshithad0703 Mar 26, 2025
58eddd8
fix: update Slack channel to SLACK_CHANNEL2 in sendFailureDetails fun…
harshitha-cstk Mar 27, 2025
287a77f
Merge pull request #310 from contentstack/fix/slack-thread-msg
harshithad0703 Mar 27, 2025
9222063
Merge pull request #311 from contentstack/development
harshithad0703 Mar 27, 2025
cdc2b2b
Merge pull request #316 from contentstack/master
harshithad0703 Apr 1, 2025
2a50f45
Merge pull request #309 from contentstack/staging
harshithad0703 Apr 1, 2025
96c9b93
bump version to 3.25.1
harshitha-cstk Apr 1, 2025
30c6670
Merge branch 'master' into fix/version-bump
harshithad0703 Apr 1, 2025
d8aa679
Merge pull request #317 from contentstack/fix/version-bump
harshithad0703 Apr 1, 2025
94b108e
Merge pull request #318 from contentstack/master
reeshika-h Apr 1, 2025
def17b6
Merge pull request #319 from contentstack/staging
harshithad0703 Apr 1, 2025
ff41dad
allow number, string, object, boolean, and RegExp as valid query para…
sunil-lakshman Apr 2, 2025
1836c2a
Added testcases
sunil-lakshman Apr 2, 2025
d2cfdd7
Merge pull request #320 from contentstack/fix/DX-2389
sunil-lakshman Apr 2, 2025
68b1b87
update package-lock
harshitha-cstk Apr 2, 2025
85bb900
Merge pull request #322 from contentstack/fix/update-package-lock
harshithad0703 Apr 2, 2025
fbac153
Merge pull request #321 from contentstack/development
harshithad0703 Apr 2, 2025
06b4f0c
update CDN links and integrity hashes in README.md
harshitha-cstk Apr 2, 2025
a17450a
Merge pull request #324 from contentstack/fix/integrity-hash-update
harshithad0703 Apr 3, 2025
52e134b
Add environment variable checks and refactor live preview tests
harshitha-cstk Apr 3, 2025
ce8f187
Merge pull request #323 from contentstack/staging
harshithad0703 Apr 3, 2025
14fa612
Update environment variable checks and improve error handling in config
harshitha-cstk Apr 8, 2025
6c65125
Bump version to 3.25.3 and update changelog to handle sanity tests wi…
harshitha-cstk Apr 8, 2025
77b01fc
Update changelog date for version 3.25.3
harshitha-cstk Apr 8, 2025
99a6cdc
Update integrity hashes in README
harshitha-cstk Apr 8, 2025
9eb4955
Merge pull request #325 from contentstack/fix/dx-2231-handle-envs
harshithad0703 Apr 8, 2025
9909457
Fix: initialize live_preview config before setting properties in Live…
sunil-lakshman Apr 8, 2025
9497326
Merge pull request #326 from contentstack/fix/sanity-testcases
AniketDev7 Apr 8, 2025
9253d01
test: added sync test cases with improved structure
harshitha-cstk Apr 15, 2025
d482ac2
Fix: pagination token test
harshitha-cstk Apr 15, 2025
2bdb616
chore: update package-lock.json with dependency version bumps
harshitha-cstk Apr 15, 2025
9dfb440
Merge pull request #327 from contentstack/fix/dx-2392-sync-test-cases
harshithad0703 Apr 15, 2025
f2ad1d0
chore: bump dependencies in package.json and package-lock.json
harshitha-cstk Apr 15, 2025
bd1f8f8
Merge branch 'staging' into fix/upgrade-dependencies
harshitha-cstk Apr 15, 2025
72134bb
Merge pull request #329 from contentstack/fix/upgrade-dependencies
harshithad0703 Apr 15, 2025
b31b57c
policy-scan.yml
Aravind-Kumar-cstk Apr 16, 2025
484ccb8
issues-jira.yml
Aravind-Kumar-cstk Apr 16, 2025
0f6106e
Delete jira.yml
Aravind-Kumar-cstk Apr 16, 2025
e70eeeb
Delete sast-scan.yml
Aravind-Kumar-cstk Apr 16, 2025
8868802
codeql-analysis.yml
Aravind-Kumar-cstk Apr 16, 2025
2f854bd
Updated codeowners
Aravind-Kumar-cstk Apr 16, 2025
8bb2c87
Merge pull request #330 from contentstack/master
harshithad0703 Apr 16, 2025
3eb026d
Merge pull request #331 from contentstack/staging
harshithad0703 Apr 16, 2025
41708c3
Update policy-scan.yml
Aravind-Kumar-cstk Apr 16, 2025
66c0ead
Merge pull request #332 from contentstack/master
harshithad0703 Apr 16, 2025
56d503d
Merge pull request #328 from contentstack/development
harshithad0703 Apr 16, 2025
b191be0
Test 1
cs-raj Apr 17, 2025
606e580
Merge pull request #333 from contentstack/staging
harshithad0703 Apr 21, 2025
d419d66
Merge pull request #335 from contentstack/master
harshithad0703 Apr 21, 2025
b640238
Merge pull request #336 from contentstack/staging
harshithad0703 Apr 21, 2025
3e11ad8
policy-scan.yml
Aravind-Kumar-cstk Apr 23, 2025
f42adf4
policy-scan.yml
Aravind-Kumar-cstk May 5, 2025
efeeb70
issues-jira.yml
Aravind-Kumar-cstk May 5, 2025
6fc4741
secrets-scan.yml
Aravind-Kumar-cstk May 5, 2025
2817346
Updated codeowners
Aravind-Kumar-cstk May 5, 2025
9fb1c66
talismanrc file updated
Aravind-Kumar-cstk May 5, 2025
8d8ba2a
feat: update sanity suite name to SDK-JS-CDA
AniketDev7 May 7, 2025
dbce5de
Merge pull request #337 from contentstack/update-sanity-suite-name
AniketDev7 May 7, 2025
98f68e1
Added AWS-AU support
ntrjpatel Jul 1, 2025
59437d7
Merge pull request #342 from contentstack/feat/dx-3125
netrajpatel Jul 3, 2025
3fa14b6
Merge pull request #343 from contentstack/development
harshithad0703 Jul 3, 2025
2f0aad7
Merge branch 'master' into fix/talisman-update
harshitha-cstk Jul 4, 2025
5760112
update talismanrc
harshitha-cstk Jul 4, 2025
e869810
Merge pull request #345 from contentstack/fix/talisman-update
harshithad0703 Jul 4, 2025
2a64601
Merge pull request #344 from contentstack/staging
harshithad0703 Jul 7, 2025
114303c
Merge pull request #346 from contentstack/master
harshithad0703 Jul 7, 2025
1852c26
Merge pull request #347 from contentstack/staging
harshithad0703 Jul 8, 2025
eebf28a
build: :heavy_minus_sign: remove unused dependencies and fix installa…
nadeem-cs Jul 25, 2025
53511f5
Merge pull request #351 from contentstack/fix/DX-2118
nadeem-cs Jul 25, 2025
e6b67fe
Merge pull request #352 from contentstack/development
cs-raj Jul 25, 2025
2a88f11
Merge pull request #353 from contentstack/staging
harshithad0703 Jul 28, 2025
4cc9367
Merge pull request #354 from contentstack/master
harshithad0703 Jul 28, 2025
42df2e5
Merge pull request #355 from contentstack/staging
harshithad0703 Jul 28, 2025
5ad6185
Merge branch 'development' into fix/snyk
cs-raj Jul 29, 2025
163e585
Fix ESLint setup and auto-format code
cs-raj Jul 29, 2025
ee3bfd2
Update ESLint config to require semicolons and fix Husky auto-install
cs-raj Jul 29, 2025
96fe8f1
Configure ESLint with standard style and fix formatting issues
cs-raj Jul 29, 2025
84e150e
Changed const to let
cs-raj Jul 30, 2025
7cb4109
Merge pull request #334 from contentstack/fix/snyk
cs-raj Jul 31, 2025
7673657
Changelog
cs-raj Aug 1, 2025
bb66442
Merge pull request #358 from contentstack/fix/dev3
cs-raj Aug 1, 2025
e6f3ca1
Merge pull request #356 from contentstack/development
harshithad0703 Aug 1, 2025
45de520
Update .talismanrc
harshithad0703 Aug 1, 2025
7e73a08
Merge pull request #360 from contentstack/fix/talismanrc
harshithad0703 Aug 1, 2025
f05232c
Merge pull request #359 from contentstack/staging
harshithad0703 Aug 4, 2025
ec702ac
Merge pull request #361 from contentstack/master
harshithad0703 Aug 5, 2025
0459d83
Merge pull request #362 from contentstack/staging
harshithad0703 Aug 5, 2025
a25ff26
Delete secrets-scan.yml
Aravind-Kumar-cstk Sep 8, 2025
788e465
Updated codeowners
Aravind-Kumar-cstk Sep 8, 2025
320c5ad
feat: comprehensive integration test suite with 737 tests
AniketDev7 Nov 13, 2025
2312ce9
Refactor error and warning messages for clarity and consistency acros…
reeshika-h Nov 24, 2025
d291dfe
Refactor error handling in stack, cache provider, and entry modules t…
reeshika-h Nov 24, 2025
0f120b0
workflow fix
reeshika-h Nov 24, 2025
20a3193
workflow fix 2
reeshika-h Nov 24, 2025
99d1963
version bump
reeshika-h Dec 4, 2025
8c116e4
Merge pull request #365 from contentstack/fix/DX-3490-improve-error-msg
harshithad0703 Dec 4, 2025
0a34629
Change checksum for messages.js
harshithad0703 Dec 4, 2025
3dd8012
Merge pull request #367 from contentstack/fix/update-talismanrc
harshithad0703 Dec 4, 2025
8d3354f
Merge pull request #366 from contentstack/development
harshithad0703 Dec 5, 2025
971afd4
Merge pull request #369 from contentstack/master
harshithad0703 Dec 5, 2025
bbe2a95
Merge pull request #368 from contentstack/staging
harshithad0703 Dec 8, 2025
ef7a0d1
Merge pull request #371 from contentstack/master
harshithad0703 Dec 9, 2025
ab6b6f8
fix: increase performance test thresholds for pagination timing
AniketDev7 Dec 22, 2025
dc037c5
fix cve-2025-15284 by updating 'qs' dependency, and remove deprecated…
nadeem-cs Jan 21, 2026
c3a4ff4
chore: license update
nadeem-cs Jan 21, 2026
868550a
Merge pull request #373 from contentstack/fix/DX-3856
nadeem-cs Jan 23, 2026
e8bd0e4
Merge latest changes from development branch
AniketDev7 Jan 27, 2026
040c441
Merge pull request #374 from contentstack/development
harshithad0703 Jan 30, 2026
b112664
Merge pull request #375 from contentstack/staging
harshithad0703 Feb 2, 2026
7134eac
Merge pull request #376 from contentstack/master
harshithad0703 Feb 2, 2026
7bdd810
fix: resolve 4 failing test cases - increase timeouts and performance…
AniketDev7 Feb 5, 2026
bda6c4b
fix: update error handling for invalid locale in LocaleAndLanguage test
AniketDev7 Feb 9, 2026
22f4da0
Update sca-scan.yml
dhavaljain999 Mar 3, 2026
25018a4
fix: handle connection drops (UND_ERR_SOCKET) and prevent process crash
harshitha-cstk Mar 16, 2026
326444f
revert docs
harshitha-cstk Mar 16, 2026
344ff9c
refactor: remove unused variables from request.js
harshitha-cstk Mar 16, 2026
c536191
version bump
harshitha-cstk Mar 18, 2026
4a57003
Merge pull request #377 from contentstack/fix/dx-5444-und-err-socket-…
harshitha-cstk Mar 18, 2026
04b4281
Merge pull request #378 from contentstack/development
naman-contentstack Mar 23, 2026
d959260
Merge pull request #379 from contentstack/staging
naman-contentstack Mar 23, 2026
2158eb5
chore: merge master into feature/comprehensive-integration-tests
aniket-shikhare-cstk May 12, 2026
1a9fab1
test: add 6 socket/transport error tests for v3.27.0 retry coverage
aniket-shikhare-cstk May 12, 2026
e3ba9e1
fix: increase test timeouts and fix flaky async test behavior
aniket-shikhare-cstk May 12, 2026
3511bf9
feat: add nested global field support in test config and helpers
aniket-shikhare-cstk May 12, 2026
eee3982
fix: resolve ESLint lint failures across test suite
aniket-shikhare-cstk May 12, 2026
2fcdca1
fix: remove env-var value from console.log to resolve CodeQL alert
aniket-shikhare-cstk May 12, 2026
f0bdbde
docs: add AGENTS.md, skills, and Cursor rules entry
harshitha-cstk Apr 17, 2026
45c37de
Added skills and cursor rules
sunil-lakshman Mar 24, 2026
aee227d
chore: align release workflows with new development-to-main process
harshitha-cstk Apr 29, 2026
e700469
chore: migrate asset/entry tests to integration suite and remove lega…
maheshmotkar-cs May 27, 2026
baef999
issues-jira.yml
Aravind-Kumar-cstk Jun 19, 2026
932ee62
test: add 2x retry with 4s delay to performance and concurrent reques…
aniket-shikhare-cstk Jun 28, 2026
9ac4e5e
fix: raise UserAgent perf threshold and add retry to VersionUtility t…
aniket-shikhare-cstk Jun 29, 2026
b670ab4
fix: raise Perf_VersionRead_Fast threshold to 500ms for dev11 CI stab…
aniket-shikhare-cstk Jun 29, 2026
e72e9e3
chore: remove internal environment name from test comments
aniket-shikhare-cstk Jun 29, 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
3 changes: 3 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['@babel/preset-env']
};
49 changes: 49 additions & 0 deletions .cursor/rules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Cursor Rules Documentation

This directory contains **Cursor AI rules** for the **Contentstack JavaScript Content Delivery SDK** (`contentstack` on npm) — CDA client development in this repository.

## Rules overview

| Rule | Role |
|------|------|
| [`dev-workflow.md`](dev-workflow.md) | Branches, lint/tests before PR, build + version bump guidance, links to skills |
| [`javascript.mdc`](javascript.mdc) | JavaScript / TypeScript declaration style: `src/`, `webpack/`, root `index.d.ts` |
| [`contentstack-javascript-cda.mdc`](contentstack-javascript-cda.mdc) | CDA SDK patterns: `Stack`, delivery token, host/region, request/cache/live preview |
| [`testing.mdc`](testing.mdc) | Jest e2e (`test/**/*.js`) and TypeScript tests; `test/config.js` env |
| [`code-review.mdc`](code-review.mdc) | PR checklist: JSDoc, `index.d.ts`, compat, errors, tests, CDA semantics (**always applied**) |

## Rule application

Rules load from **globs** and **`alwaysApply`** in each file's frontmatter.

| Context | Typical rules |
|---------|----------------|
| **Every chat / session** | [`code-review.mdc`](code-review.mdc) (`alwaysApply: true`) |
| **Most project files** | [`dev-workflow.md`](dev-workflow.md) — `**/*.js`, `**/*.ts`, `**/*.json` |
| **SDK implementation** | [`javascript.mdc`](javascript.mdc) + [`contentstack-javascript-cda.mdc`](contentstack-javascript-cda.mdc) for `src/**/*.js` |
| **Build config** | [`javascript.mdc`](javascript.mdc) for `webpack/**/*.js` |
| **Public types** | [`javascript.mdc`](javascript.mdc) for `index.d.ts` |
| **Tests** | [`testing.mdc`](testing.mdc) for `test/**/*.js`, `test/**/*.ts` |

Overlaps are expected (e.g. editing `src/core/stack.js` can match `dev-workflow`, `javascript`, and `contentstack-javascript-cda`).

## Usage

- Rules load automatically when opened files match their globs (`code-review` is always in context).
- You can **@ mention** rule files in chat when supported.

## Quick reference table

| File | `alwaysApply` | Globs (summary) |
|------|---------------|-----------------|
| `dev-workflow.md` | no | `**/*.js`, `**/*.ts`, `**/*.json` |
| `javascript.mdc` | no | `src/**/*.js`, `webpack/**/*.js`, `index.d.ts` |
| `contentstack-javascript-cda.mdc` | no | `src/**/*.js` |
| `testing.mdc` | no | `test/**/*.js`, `test/**/*.ts` |
| `code-review.mdc` | **yes** | — |

## Skills & maintenance

- Deeper playbooks: [`skills/README.md`](../../skills/README.md).
- Repo agent entry: [`AGENTS.md`](../../AGENTS.md).
- When directories change, update **globs** in rule frontmatter; keep rules short and put detail in `skills/*/SKILL.md`.
38 changes: 38 additions & 0 deletions .cursor/rules/code-review.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
description: "PR review themes — API docs, compatibility, errors, security, tests (CDA SDK)"
alwaysApply: true
---

# Code review checklist (CDA JavaScript SDK)

Apply when reviewing changes to the **`contentstack`** npm package (Content Delivery API client).

## Public API & documentation

- **JSDoc** updated for new or changed public methods/classes (params, return shape, examples), matching style in `src/core/contentstack.js` / `src/core/stack.js`.
- **`index.d.ts`** updated when TypeScript consumers would see different signatures or new exports.

## Backward compatibility

- Avoid breaking changes to exported function signatures, option objects, or default behavior without a major version rationale.
- If behavior changes, ensure **callers inside `src/`** and tests reflect the new contract.

## Errors & safety

- HTTP failures should continue to reject with a predictable shape from **`src/core/lib/request.js`** where applicable (**`error_message`**, **`error_code`**, **`errors`**, **`status`**, **`statusText`**).
- Do not log full **delivery_token**, **preview_token**, **management_token**, or **api_key** values.
- Respect **null/undefined** edge cases for optional API fields.

## Dependencies & supply chain

- New **dependencies** should be justified (size, maintenance, license).
- Lockfile and **`package.json`** version bumps should be minimal and reviewable.

## Tests

- **Jest** tests for new logic or regressions under **`test/`** (JS and/or **`test/typescript/`** as appropriate).
- Live stack tests must remain compatible with **`test/config.js`** env requirements; document new env needs in **`test/README.md`** or comments near the harness — never commit credentials.

## Security & privacy

- No hardcoded credentials; no accidental exposure of customer content in logs or error messages.
36 changes: 36 additions & 0 deletions .cursor/rules/contentstack-javascript-cda.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
description: "Contentstack CDA SDK patterns in src/core (Content Delivery API)"
globs: ["src/**/*.js"]
alwaysApply: false
---

# Contentstack CDA SDK (`src/core/`)

This package implements the **Content Delivery API (CDA)** read client, not the Content Management API (CMA).

## Stack & config

- **`Contentstack.Stack(options)`** (`src/core/stack.js`) — **`api_key`**, **`delivery_token`**, **`environment`**; optional **`region`**, **`branch`**, **`host`**, **`live_preview`**, **`plugins`**, **`fetchOptions`** (timeout, retries, `retryCondition`, `logHandler`, etc.).
- Default CDN paths and version come from **`config.js`** at the repo root; regional hosts follow existing `stack.js` logic (e.g. `{region}-cdn.contentstack.com`).

## HTTP & errors

- Requests are built in **`src/core/lib/request.js`**: query serialization, **`fetch`**, default retries on **408** / **429** (configurable), plugin hooks **`onRequest`** / **`onResponse`**.
- Failed responses reject with objects carrying **`error_message`**, **`error_code`**, **`errors`**, **`status`**, **`statusText`** when JSON parsing succeeds — keep new code compatible with this shape.

## Modules

- **Entry, Query, Assets, Taxonomy, Result**, etc. live under **`src/core/modules/`** — follow neighboring patterns for chaining, parameters, and URL assembly.
- **Cache**: policies and providers under **`src/core/cache.js`** and **`src/core/cache-provider/`**.

## Live preview

- When **`live_preview.enable`** is true, **`management_token`** vs **`preview_token`** affect host selection — mirror existing `stack.js` behavior and tests under **`test/live-preview/`**.

## Runtime targets

- **`src/runtime/node|web|react-native|nativescript/`** supply **`http`** and **`localstorage`** — changes that affect networking or storage must consider **all** bundled targets.

## Docs

- Align behavior with the official [Content Delivery API](https://www.contentstack.com/docs/developers/apis/content-delivery-api/) documentation.
31 changes: 31 additions & 0 deletions .cursor/rules/dev-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
description: "Branches, tests, and PR expectations for contentstack-javascript (CDA SDK)"
globs: ["**/*.js", "**/*.ts", "**/*.json"]
alwaysApply: false
---

# Development workflow — Contentstack JavaScript CDA SDK

## Branches

- Follow team Git conventions (e.g. feature branches off the repo’s default integration branch).
- Do not commit permanent `test.only`, `it.only`, `describe.only`, or skipped tests meant for CI.

## Before opening a PR

1. **`npm run lint`** — ESLint must pass on `src` and `test`.
2. **`npm test`** — Runs **`pretest`** → **`npm run build`**, then **`test:e2e`** and **`test:typescript`**. For live stack tests, set env vars (see **`test/config.js`**: `HOST`, `API_KEY`, `DELIVERY_TOKEN`, `ENVIRONMENT`). Never commit secrets or `.env` with real tokens.
3. **Version bump** — When the PR introduces **user-visible or release-worthy** SDK behavior (new API, bug fix shipped to npm, or a **breaking** change), update **`version`** in `package.json` per **semver** (patch / minor / major). Docs-only or test-only changes may omit a bump per team practice; match sibling PRs when unsure.

## PR expectations (summary)

- **User-facing changes** — JSDoc on public methods; update **`index.d.ts`** when the public TypeScript surface changes.
- **Behavior** — Preserve backward compatibility unless the change is explicitly breaking and documented.
- **Errors** — Keep rejection shapes consistent with **`src/core/lib/request.js`** (`error_message`, `error_code`, `errors`, `status`, `statusText` where applicable). Do not log full **delivery_token** or **management_token** / **preview_token** values in new code.
- **Tests** — Add or adjust Jest tests under **`test/`** for new behavior; live tests require the env contract in **`test/config.js`**.

## Quick links

- Agent overview: repo root `AGENTS.md`
- CDA patterns: `skills/contentstack-javascript-cda/SKILL.md`
- HTTP / retries / plugins: `skills/framework/SKILL.md`
30 changes: 30 additions & 0 deletions .cursor/rules/javascript.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
description: "JavaScript/TypeScript conventions for src, webpack, and index.d.ts"
globs:
- "src/**/*.js"
- "webpack/**/*.js"
- "index.d.ts"
alwaysApply: false
---

# JavaScript & types (this repo)

## Runtime & modules

- **Source** is **ES modules** under `src/` (`import` / `export`). Webpack resolves aliases such as **`runtime/http.js`** per target (`webpack/webpack.*.js`).
- **`index.d.ts`** is the public TypeScript surface for npm consumers; keep it aligned with `src/core/` JSDoc and exports.

## Style & tooling

- **ESLint** uses **`eslint-config-standard`** and **`@babel/eslint-parser`**. This repo **requires semicolons** and related rules in **`.eslintrc.js`** — match existing `src/core/` style rather than semicolon-free Standard.
- **Environment**: ESLint `es2020`, `node`, `browser`, `jest`.

## Patterns

- Use **JSDoc** (`@description`, `@param`, `@returns`, `@example`) on **public** API consistent with `src/core/contentstack.js` and `src/core/stack.js`.
- **Dependencies**: **`@contentstack/utils`** is exposed on the main class; follow existing import paths (including `.js` suffixes where the codebase uses them in ESM files).

## Logging

- Avoid noisy logging in library code except via existing **`fetchOptions.logHandler`** / **`fetchOptions.debug`** patterns in `src/core/lib/request.js` and `stack.js`.
- Never log full **delivery_token**, **preview_token**, **management_token**, or API keys.
36 changes: 36 additions & 0 deletions .cursor/rules/testing.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
description: "Jest e2e and TypeScript tests for the CDA SDK"
globs:
- "test/**/*.js"
- "test/**/*.ts"
alwaysApply: false
---

# Testing — `contentstack` (CDA)

## Frameworks

| Suite | Runner | Notes |
|-------|--------|--------|
| **JS e2e / integration-style** | **Jest** (`jest.js.config.js`) | `testMatch`: `**/test/**/*.js`; ignores `test/index.js`, `test/config.js`, `test/sync_config.js`, some `utils.js` paths |
| **TypeScript** | **Jest** + **ts-jest** (`jest.config.js`) | `npm run test:typescript`; `test/typescript/**/*.test.ts` |

## Env & live stack

- **Canonical required vars** for suites that `require('./config')` or `require('../config.js')`: **`HOST`**, **`API_KEY`**, **`DELIVERY_TOKEN`**, **`ENVIRONMENT`** — validated in **`test/config.js`** (loads **dotenv**). Missing any variable throws on import.
- Use a **`.env`** file locally; do not commit secrets. **`HOST`** should match the delivery API host for your stack/region.
- Built SDK: many tests **`require('../../dist/node/contentstack.js')`**. **`npm test`** runs **`pretest`** → **`npm run build`** first.

## Layout

- **Suite entry (JS):** `test/index.js` `require`s individual test files.
- **TypeScript:** colocate under **`test/typescript/`** with `*.test.ts` naming.

## Hygiene

- No committed **`only`** / **`skip`** for tests that must run in CI.
- Prefer deterministic assertions; mock or scope live tests when adding new cases so CI behavior stays predictable if env is absent.

## Coverage

- Jest / reporter config is in **`jest.js.config.js`** and **`jest.config.js`**; HTML reports paths are configured there.
43 changes: 43 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = {
env: {
"es2020": true,
"node": true,
"browser": true,
"jest": true
},
extends: 'standard',
// "globals": {
// "Atomics": "readonly",
// "SharedArrayBuffer": "readonly"
// },
// "parserOptions": {
// "ecmaFeatures": {
// "jsx": true
// },
// "ecmaVersion": 2015,
// "sourceType": "module"
// },
parser: "@babel/eslint-parser", // Use Babel parser to handle modern JS syntax
plugins: [
'standard',
'promise'
],
rules: {
'semi': ['error', 'always'],
'semi-spacing': ['error', { before: false, after: true }],
'camelcase': 'off',
'no-tabs': 'off',
'eqeqeq': 'off',
'no-unused-vars': 'warn',
'no-undef': 'warn',
'no-prototype-builtins': 'off',
'no-extend-native': 'off',
'no-fallthrough': 'off',
'prefer-promise-reject-errors': 'off',
'prefer-regex-literals': 'off',
'no-useless-escape': 'off',
'n/handle-callback-err': 'off',
'n/no-callback-literal': 'off',
'no-async-promise-executor': 'off'
}
};
54 changes: 54 additions & 0 deletions .github/workflows/back-merge-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Back-merge master to development

on:
push:
branches:
- master
workflow_dispatch:

permissions:
contents: read
pull-requests: write

jobs:
open-back-merge-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Open back-merge PR if needed
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
BASE_BRANCH="development"
SOURCE_BRANCH="master"

git fetch origin "$BASE_BRANCH" "$SOURCE_BRANCH"

if ! git show-ref --verify --quiet "refs/remotes/origin/$BASE_BRANCH"; then
echo "Base branch '$BASE_BRANCH' does not exist on origin; skipping."
exit 0
fi

SOURCE_SHA=$(git rev-parse "origin/$SOURCE_BRANCH")
BASE_SHA=$(git rev-parse "origin/$BASE_BRANCH")

if [ "$SOURCE_SHA" = "$BASE_SHA" ]; then
echo "$SOURCE_BRANCH and $BASE_BRANCH are at the same commit; nothing to back-merge."
exit 0
fi

EXISTING=$(gh pr list --repo "${{ github.repository }}" --base "$BASE_BRANCH" --head "$SOURCE_BRANCH" --state open --json number --jq 'length')

if [ "$EXISTING" -gt 0 ]; then
echo "An open PR from $SOURCE_BRANCH to $BASE_BRANCH already exists; skipping."
exit 0
fi

gh pr create --repo "${{ github.repository }}" --base "$BASE_BRANCH" --head "$SOURCE_BRANCH" --title "chore: back-merge $SOURCE_BRANCH into $BASE_BRANCH" --body "Automated back-merge after changes landed on \\`$SOURCE_BRANCH\\`. Review and merge to keep \\`$BASE_BRANCH\\` in sync."

echo "Created back-merge PR $SOURCE_BRANCH -> $BASE_BRANCH."
Loading