Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
472 commits
Select commit Hold shift + click to select a range
af8ca41
chore: Updated check branch workflow file (#116)
sunil-lakshman Jan 21, 2025
3247ffb
Dx | 22-01-2025 | hotfix (#125)
sunil-lakshman Jan 21, 2025
02b0838
Back merge (#127)
sunil-lakshman Jan 21, 2025
18485cc
Merge pull request #126 from contentstack/staging
cs-raj Jan 22, 2025
3e1cc80
feat: enhancement for updateasseturlforgql method to support multiple…
nadeem-cs Feb 4, 2025
1f50661
chore: adds package-lock
nadeem-cs Feb 4, 2025
59af2ce
Merge pull request #128 from contentstack/enhancement/DX-1984
nadeem-cs Feb 4, 2025
799526c
chore: Update node version to 22 (#129)
sunil-lakshman Feb 7, 2025
8bba163
Merge remote-tracking branch 'origin/staging' into fix/merge-stage-to…
harshitha-cstk Feb 7, 2025
3114026
Merge pull request #131 from contentstack/fix/merge-stage-to-dev
nadeem-cs Feb 7, 2025
d9be0e6
Merge pull request #130 from contentstack/development
nadeem-cs Feb 7, 2025
2e8970f
chore: Added support of \n after just enter (#133)
sunil-lakshman Feb 8, 2025
92f09b8
chore: Added support of \n after just enter (#133) (#134)
sunil-lakshman Feb 8, 2025
77bd550
Merge pull request #136 from contentstack/master
harshithad0703 Feb 11, 2025
8292db8
Merge pull request #132 from contentstack/staging
harshithad0703 Feb 11, 2025
c81c13c
Merge pull request #137 from contentstack/master
harshithad0703 Feb 12, 2025
52b7d0d
Merge pull request #138 from contentstack/staging
harshithad0703 Feb 12, 2025
38cca9f
fix: fix for html injection
harshitha-cstk Feb 12, 2025
665b422
test: test for html injection fix
harshitha-cstk Feb 12, 2025
031e7cd
chore: update version to 1.3.18 and document html injection fix in ch…
harshitha-cstk Feb 12, 2025
53ec08e
Merge pull request #139 from contentstack/fix/dx-1771-html-injection-fix
harshithad0703 Feb 12, 2025
29f3ffc
Merge pull request #140 from contentstack/development
harshithad0703 Feb 12, 2025
a384722
fix: update test for asset url method for gql
nadeem-cs Feb 13, 2025
60e794a
Merge pull request #142 from contentstack/hotfix/updateAssetURLForGQL…
nadeem-cs Feb 13, 2025
d880132
Merge pull request #143 from contentstack/development
harshithad0703 Feb 13, 2025
ca4b919
Merge pull request #141 from contentstack/staging
harshithad0703 Feb 14, 2025
1905567
fix(node-options): encode urls in default node options
harshitha-cstk Feb 19, 2025
3d27ee2
fix(attributes): sanitize keys and values to prevent html injection
harshitha-cstk Feb 19, 2025
a87a6cf
chore(version): update version to 1.3.19 and add changelog entry for …
harshitha-cstk Feb 19, 2025
1deab62
fix(attributes): ignore attributes key with forbidden characters
harshitha-cstk Feb 19, 2025
9661d22
chore(report): remove semgrep native report file
harshitha-cstk Feb 19, 2025
b11d624
Merge pull request #144 from contentstack/fix/dx-2192-html-injection
harshithad0703 Feb 19, 2025
9b758ef
Merge pull request #145 from contentstack/development
harshithad0703 Feb 19, 2025
c67b63a
Merge pull request #146 from contentstack/staging
cs-raj Feb 25, 2025
68f950f
fix: add data mtec as allowed attribute for audience plugin
nadeem-cs Mar 3, 2025
715f66e
Merge pull request #148 from contentstack/fix/DX-2241
nadeem-cs Mar 5, 2025
707ba6c
Merge pull request #149 from contentstack/development
nadeem-cs Mar 5, 2025
bf3e7f9
fix: customrenderoption for reference entry embedded as link
nadeem-cs Mar 5, 2025
5aa766f
Merge pull request #151 from contentstack/fix/DX-2175
nadeem-cs Mar 5, 2025
2191dd7
test: update test mocks
nadeem-cs Mar 10, 2025
db8e5de
Merge pull request #150 from contentstack/staging
cs-raj Mar 11, 2025
d4d79ac
Merge pull request #147 from contentstack/master
nadeem-cs Mar 17, 2025
857dc02
chore: update dependencies to remove security vulnerabilities
nadeem-cs Mar 17, 2025
1fc9cdc
Merge pull request #153 from contentstack/chore/DX-2159
nadeem-cs Mar 17, 2025
3b5378a
docs: update readme with typescript sdk code snippets
nadeem-cs Mar 26, 2025
9008e51
Merge pull request #154 from contentstack/docs/DX-2365-Update-readme
nadeem-cs Mar 26, 2025
fa796d9
policy-scan.yml
Aravind-Kumar-cstk Apr 16, 2025
62b8817
issues-jira.yml
Aravind-Kumar-cstk Apr 16, 2025
4d5902a
Delete jira.yml
Aravind-Kumar-cstk Apr 16, 2025
b40192e
Delete sast-scan.yml
Aravind-Kumar-cstk Apr 16, 2025
1e24ddb
codeql-analysis.yml
Aravind-Kumar-cstk Apr 16, 2025
68a6fd6
Updated codeowners
Aravind-Kumar-cstk Apr 16, 2025
53bb340
Merge pull request #155 from contentstack/master
harshithad0703 Apr 16, 2025
da77e0e
Merge pull request #156 from contentstack/staging
harshithad0703 Apr 16, 2025
1f259d2
Merge pull request #157 from contentstack/development
harshithad0703 Apr 16, 2025
d59a109
fix: custom-render-option for entry embedded as link
nadeem-cs Apr 21, 2025
1466348
Merge branch 'development' into fix/DX-2294
harshitha-cstk Apr 21, 2025
dba223c
fix: update package-lock file
harshitha-cstk Apr 21, 2025
e93f24a
Merge pull request #152 from contentstack/fix/DX-2294
harshithad0703 Apr 21, 2025
bf43090
Merge pull request #160 from contentstack/development
harshithad0703 Apr 21, 2025
ef43699
Merge pull request #158 from contentstack/staging
harshithad0703 Apr 22, 2025
676ce4d
policy-scan.yml
Aravind-Kumar-cstk Apr 23, 2025
9048ef5
policy-scan.yml
Aravind-Kumar-cstk May 5, 2025
8a459d9
issues-jira.yml
Aravind-Kumar-cstk May 5, 2025
017b4de
secrets-scan.yml
Aravind-Kumar-cstk May 5, 2025
b5a068c
Updated codeowners
Aravind-Kumar-cstk May 5, 2025
4aa44d9
talismanrc file updated
Aravind-Kumar-cstk May 5, 2025
d935588
chore: handle case senstivity for contenttypeuid and locale
nadeem-cs May 21, 2025
8091f71
Merge pull request #161 from contentstack/chore/DX-2892
harshithad0703 May 23, 2025
2418b3c
Merge pull request #163 from contentstack/development
harshithad0703 May 23, 2025
d49d19d
chore: enhance precommit hook with snyk and talisman scans
harshitha-cstk May 23, 2025
2450234
Merge pull request #165 from contentstack/fix/talismanrc-update
harshithad0703 May 23, 2025
3304c83
chore: add husky pre-commit to talisman ignore configuration
harshitha-cstk May 26, 2025
b5e3727
Merge pull request #166 from contentstack/fix/talismanrc-update3
harshithad0703 May 26, 2025
c9b18bb
Merge pull request #167 from contentstack/master
harshithad0703 May 26, 2025
ba3b815
Merge pull request #164 from contentstack/staging
harshithad0703 May 26, 2025
a34dc42
Merge pull request #168 from contentstack/master
reeshika-h May 27, 2025
25c5597
Merge pull request #169 from contentstack/staging
harshithad0703 May 27, 2025
095b3d7
feat: add helper functions for endpoints
nadeem-cs Aug 19, 2025
a6b86ca
fix: Improve null checks in find embedded entry and find embedded ass…
harshitha-cstk Aug 29, 2025
79eb771
chore: bump version to 1.5.0 in package.json
harshitha-cstk Aug 29, 2025
2c060fa
test: Add edge case tests for find embedded entry, asset, and gql it…
harshitha-cstk Aug 29, 2025
cc4bcc8
chore: version bump to 1.4.2 in package.json and package-lock.json
harshitha-cstk Aug 29, 2025
c0e3586
Merge pull request #172 from contentstack/fix/dx-3462-check-empty-emb…
harshithad0703 Aug 29, 2025
2ebfb6f
Merge pull request #173 from contentstack/development
harshithad0703 Aug 29, 2025
f1eae26
Update checksum for package-lock.json in .talismanrc
harshithad0703 Aug 29, 2025
8dad33b
Merge pull request #175 from contentstack/fix/talismanrc
harshithad0703 Aug 29, 2025
f712006
fix: cslp generation for variant-resolved entries
csAyushDubey Sep 1, 2025
2dd82f2
refactor: simplify endpoint fetching logic and improve error handling
nadeem-cs Sep 2, 2025
892855c
fix: remove unused export of region from endpoints
nadeem-cs Sep 2, 2025
a157272
Merge pull request #174 from contentstack/staging
harshithad0703 Sep 2, 2025
e4236e0
fix: added test cases
csAyushDubey Sep 3, 2025
3103be9
Merge branch 'master' into bug/VB-447-cslp-fix
csAyushDubey Sep 3, 2025
8661083
Merge pull request #177 from contentstack/master
harshithad0703 Sep 3, 2025
70315a3
Merge pull request #178 from contentstack/staging
harshithad0703 Sep 3, 2025
a7a8caa
refactor: update getContentstackEndpoint function to improve region n…
nadeem-cs Sep 6, 2025
dadd536
Delete secrets-scan.yml
Aravind-Kumar-cstk Sep 8, 2025
472dd01
Updated codeowners
Aravind-Kumar-cstk Sep 8, 2025
8f2e392
Merge branch 'master' into bug/VB-447-cslp-fix
csAyushDubey Sep 8, 2025
53a0457
test: fixed tests as requested
csAyushDubey Sep 8, 2025
2210ed2
fix: requested logic changes
csAyushDubey Sep 9, 2025
c6b8a4f
Merge branch 'development' into bug/VB-447-cslp-fix
csAyushDubey Sep 11, 2025
ca32c0b
chore
csAyushDubey Sep 11, 2025
0d8040e
Merge pull request #176 from contentstack/bug/VB-447-cslp-fix
nadeem-cs Sep 22, 2025
24244a9
fix: add Region property conditionally to endpoint object in getConte…
nadeem-cs Sep 22, 2025
338faab
chore: bump version to 1.4.3 in package.json
nadeem-cs Sep 22, 2025
b38eee7
Merge pull request #180 from contentstack/fix/versionBump
harshithad0703 Sep 22, 2025
ec6248f
Merge pull request #182 from contentstack/development
harshithad0703 Sep 22, 2025
0673a21
Update checksum for entry-editable.ts in .talismanrc
harshithad0703 Sep 22, 2025
4933253
Merge pull request #183 from contentstack/fix/talisman-update
harshithad0703 Sep 22, 2025
1f37850
Merge pull request #181 from contentstack/staging
harshithad0703 Sep 22, 2025
fa953fa
Merge pull request #184 from contentstack/master
harshithad0703 Sep 22, 2025
4f37185
Merge pull request #185 from contentstack/staging
harshithad0703 Sep 22, 2025
0b55904
fix: Add break and newline handling tests; update related mock data a…
nadeem-cs Sep 23, 2025
d12206a
Merge pull request #186 from contentstack/fix/DX-3546
nadeem-cs Sep 23, 2025
2c830c3
refactor: update dependencies and improve code structure
nadeem-cs Sep 23, 2025
948ed59
Merge pull request #187 from contentstack/chore/remove-unwanted-build…
nadeem-cs Sep 23, 2025
1d138a7
Merge pull request #188 from contentstack/development
nadeem-cs Sep 24, 2025
b560395
Merge pull request #189 from contentstack/staging
nadeem-cs Sep 24, 2025
11f8a39
fix: refernce variant cslp generation fix
karancs06 Oct 9, 2025
425ece0
fix: handle null and undefined values in get tag function
harshitha-cstk Oct 14, 2025
870d1bf
chore: release version 1.4.5
harshitha-cstk Oct 14, 2025
50e5600
test: add test cases
harshitha-cstk Oct 14, 2025
f440877
Merge pull request #192 from contentstack/fix/dx-3462-null-check-getTag
harshithad0703 Oct 14, 2025
10640ee
Merge pull request #194 from contentstack/development
harshithad0703 Oct 23, 2025
a083489
Merge pull request #196 from contentstack/master
reeshika-h Oct 23, 2025
6bb39e9
Merge branch 'development' into fix-refernce-variant-cslp-generation
karancs06 Oct 24, 2025
61deaa2
Merge pull request #191 from contentstack/fix-refernce-variant-cslp-g…
harshithad0703 Oct 27, 2025
44d841d
chore: version bump
harshitha-cstk Oct 27, 2025
7ef6c8b
chore: update checksum for package-lock.json in .talismanrc
harshitha-cstk Oct 27, 2025
e10bfa1
Merge pull request #198 from contentstack/fix/vesion-bump
harshithad0703 Oct 27, 2025
733de10
Merge pull request #197 from contentstack/development
harshithad0703 Oct 27, 2025
d8a3ab3
chore: update codeowners and remove secrets scan workflow
harshitha-cstk Oct 27, 2025
99c2379
Merge pull request #199 from contentstack/fix/workflow
harshithad0703 Oct 27, 2025
2776804
Merge pull request #195 from contentstack/staging
harshithad0703 Oct 27, 2025
2cfbc99
test: add tests for html escaping in jsontohtml function
nadeem-cs Oct 27, 2025
815b3a1
Merge pull request #200 from contentstack/test/tags-as-text-in-jrte
nadeem-cs Oct 27, 2025
459c168
chore: update package version and types path; refactor endpoint fetch…
nadeem-cs Oct 28, 2025
bea5b6d
Merge branch 'development' into feat/DX-3423-endpoints-helper-functions
nadeem-cs Oct 28, 2025
f702271
chore: update package-lock
nadeem-cs Oct 28, 2025
d3e99d2
chore: add postinstall and postupdate scripts to handle regions.json …
nadeem-cs Oct 28, 2025
c9aef37
Merge pull request #171 from contentstack/feat/DX-3423-endpoints-help…
harshithad0703 Oct 29, 2025
6a8734b
Merge pull request #202 from contentstack/development
harshithad0703 Oct 29, 2025
9725c8a
Merge pull request #204 from contentstack/master
harshithad0703 Oct 29, 2025
cf56696
feat: enhance region loading and update configurations
nadeem-cs Oct 31, 2025
a439de5
feat: improve error handling for regions.json loading and update test…
nadeem-cs Oct 31, 2025
4f540c0
Merge pull request #205 from contentstack/feat/DX-3423-endpoints-help…
nadeem-cs Oct 31, 2025
ac7e13b
Merge pull request #206 from contentstack/development
nadeem-cs Oct 31, 2025
6d8ad12
feat: update CI workflow to include node setup and npm install steps
nadeem-cs Nov 3, 2025
f48d206
Merge pull request #207 from contentstack/feat/DX-3423-endpoints-help…
nadeem-cs Nov 3, 2025
8cacebc
Merge pull request #208 from contentstack/development
nadeem-cs Nov 3, 2025
bb0f83b
Merge pull request #203 from contentstack/staging
harshithad0703 Nov 3, 2025
aa7b891
feat: update package.json and endpoints.ts to streamline regions.json…
nadeem-cs Nov 4, 2025
506aa79
Merge pull request #209 from contentstack/feat/DX-3423-endpoints-help…
nadeem-cs Nov 4, 2025
b4de174
Merge pull request #210 from contentstack/development
nadeem-cs Nov 4, 2025
dbe87ca
feat: update CI workflow to trigger on development branch for better …
nadeem-cs Nov 4, 2025
90ed971
fix: update permission to create and update check runs for test repor…
nadeem-cs Nov 4, 2025
af526d0
Merge pull request #212 from contentstack/feat/DX-3423-endpoints-help…
nadeem-cs Nov 4, 2025
0d1b4cb
fix: workflow event
nadeem-cs Nov 4, 2025
52e5e5e
Merge pull request #214 from contentstack/workflow-fix
nadeem-cs Nov 4, 2025
72a0c5e
fix: workflow fix
nadeem-cs Nov 4, 2025
5990778
Merge pull request #215 from contentstack/workflow-fix
nadeem-cs Nov 4, 2025
05423cd
Merge pull request #213 from contentstack/development
nadeem-cs Nov 4, 2025
d9a88f5
Merge pull request #216 from contentstack/master
harshithad0703 Nov 4, 2025
2793b32
feat: add workflow step to download regions.json file
nadeem-cs Nov 4, 2025
3d67db6
Merge pull request #217 from contentstack/workflow-fix
nadeem-cs Nov 4, 2025
cf6c147
fix: use script from package.json to run in workflow action
nadeem-cs Nov 4, 2025
3e46ff2
Merge pull request #218 from contentstack/workflow-fix
nadeem-cs Nov 4, 2025
8b4f238
feat: enhance default-node-options.ts
nadeem-cs Nov 4, 2025
203a5e5
feat: add Jest configuration for TypeScript tests and enhance default…
nadeem-cs Nov 4, 2025
e979405
chore: add verbose flag to download region script
nadeem-cs Nov 5, 2025
104c4b8
Merge pull request #220 from contentstack/workflow-fix
nadeem-cs Nov 5, 2025
f5e87e2
fix: update link rendering to omit href attribute when undefined
nadeem-cs Nov 5, 2025
068862e
chore: update talismanrc
nadeem-cs Nov 5, 2025
1dd575a
chore: add debugging steps to CI workflow and update test command in …
nadeem-cs Nov 5, 2025
8c19173
Merge pull request #221 from contentstack/workflow-fix
nadeem-cs Nov 5, 2025
808e718
chore: add skip-step option to CI workflow for improved control over …
nadeem-cs Nov 5, 2025
37fb833
fix: update ci.yml
nadeem-cs Nov 5, 2025
2825d4e
Merge pull request #222 from contentstack/workflow-fix
nadeem-cs Nov 6, 2025
557f4a5
Merge pull request #211 from contentstack/staging
nadeem-cs Nov 6, 2025
068f470
Merge pull request #224 from contentstack/master
nadeem-cs Nov 6, 2025
f979f1f
Merge pull request #225 from contentstack/staging
harshithad0703 Nov 6, 2025
7d03143
fix: update ESLint config and package version; enhance endpoint error…
nadeem-cs Nov 7, 2025
f3cee6f
Merge branch 'development' into fix/DX-3705
nadeem-cs Nov 7, 2025
3aa4f3b
chore: update changelog
nadeem-cs Nov 7, 2025
e41c26d
chore: update testcase
nadeem-cs Nov 7, 2025
33affc1
Merge pull request #227 from contentstack/fix/DX-3705
nadeem-cs Nov 7, 2025
e662765
fix: update ci.yml
nadeem-cs Nov 7, 2025
65792b3
Merge branch 'master' into fix/DX-3705
nadeem-cs Nov 7, 2025
64f7262
fix: update ci.yml
nadeem-cs Nov 7, 2025
ddfd410
fix: update ci.yml
nadeem-cs Nov 7, 2025
0032ee0
fix: revert all ci.yml changes
nadeem-cs Nov 7, 2025
4d9f809
Merge pull request #228 from contentstack/fix/DX-3705
nadeem-cs Nov 7, 2025
13ca9a3
Merge branch 'development' into fix/DX-3664-missing-attrs
nadeem-cs Nov 10, 2025
87b5569
Merge pull request #230 from contentstack/master
harshithad0703 Nov 10, 2025
f311328
Merge pull request #231 from contentstack/staging
nadeem-cs Nov 10, 2025
d04aebb
Merge pull request #232 from contentstack/development
nadeem-cs Nov 10, 2025
2ff06d6
Merge pull request #219 from contentstack/fix/DX-3664-missing-attrs
nadeem-cs Nov 10, 2025
301d1b7
chore: update version to 1.6.2 and add changelog entry for missing at…
nadeem-cs Nov 10, 2025
82a4dae
Merge pull request #234 from contentstack/fix/DX-3664-missing-attrs
nadeem-cs Nov 10, 2025
1465d6d
Merge pull request #233 from contentstack/development
harshithad0703 Nov 10, 2025
ce0d35d
fix: types path in package.json
nadeem-cs Nov 12, 2025
0700326
Merge pull request #237 from contentstack/fix/types-path
nadeem-cs Nov 12, 2025
0343335
fix: added @types/node to devDep
nadeem-cs Nov 12, 2025
802c789
Merge pull request #238 from contentstack/fix/types-path
harshithad0703 Nov 12, 2025
cf32dee
Merge pull request #235 from contentstack/staging
harshithad0703 Nov 12, 2025
0001d14
Merge pull request #239 from contentstack/master
harshithad0703 Dec 5, 2025
d3d6401
chore: release version 1.6.3 with endpoint refactor, updated build pr…
nadeem-cs Dec 7, 2025
fc5e285
Merge pull request #242 from contentstack/refactor/DX-3796
nadeem-cs Dec 8, 2025
4adc75d
Merge pull request #241 from contentstack/development
harshithad0703 Dec 8, 2025
4b37bdf
Merge pull request #243 from contentstack/staging
harshithad0703 Dec 8, 2025
49f4922
Merge pull request #244 from contentstack/master
harshithad0703 Dec 9, 2025
1044625
fix: option to disable lowercase locale
csAyushDubey Jan 28, 2026
62ee914
test: added tests for addEditableTags options arg
csAyushDubey Jan 29, 2026
f21357e
docs: add contributing guidelines for project
nadeem-cs Jan 29, 2026
1817614
chore: update LICENSE year to 2026 and fix formatting issues
nadeem-cs Jan 29, 2026
73470e6
docs: add detailed JSDoc comments for various functions across multip…
nadeem-cs Jan 29, 2026
31f6b5a
Merge pull request #246 from contentstack/docs/contributing-guidelines
nadeem-cs Jan 30, 2026
9b0b66a
Merge branch 'development' into bug/VB-797-lowercase-locale
nadeem-cs Jan 30, 2026
d484e1b
Merge pull request #245 from contentstack/bug/VB-797-lowercase-locale
harshithad0703 Feb 2, 2026
0662da1
chore: release version 1.7.0
harshitha-cstk Feb 2, 2026
55a0f0b
Merge pull request #247 from contentstack/fix/version_bump
nadeem-cs Feb 2, 2026
4d2c7f3
Merge pull request #248 from contentstack/development
harshithad0703 Feb 2, 2026
5b093ad
Merge pull request #249 from contentstack/staging
harshithad0703 Feb 2, 2026
1d60d75
Merge pull request #250 from contentstack/master
harshithad0703 Feb 2, 2026
46ec4db
fix: guard against null/undefined in getTag function
nadeem-cs Feb 12, 2026
4be5fb6
chore: release 1.7.1 - guard getTag against null/undefined and add re…
nadeem-cs Feb 12, 2026
e727346
Merge pull request #251 from contentstack/fix/DX-3657
nadeem-cs Feb 13, 2026
21a6835
Merge pull request #252 from contentstack/development
naman-contentstack Feb 22, 2026
f2b5c12
Merge pull request #253 from contentstack/staging
naman-contentstack Feb 23, 2026
ee48a72
Merge pull request #254 from contentstack/master
harshithad0703 Feb 23, 2026
c82f06e
Merge pull request #255 from contentstack/staging
naman-contentstack Feb 23, 2026
2c7f2b7
fix: implement logic to fold nested lists into their preceding list i…
harshitha-cstk Feb 26, 2026
17404fe
Merge pull request #256 from contentstack/fix/dx-4946-invalid-HTML-fo…
harshithad0703 Feb 27, 2026
fe672fd
Merge pull request #257 from contentstack/development
harshithad0703 Feb 27, 2026
55e6bd3
Merge pull request #258 from contentstack/staging
harshithad0703 Mar 2, 2026
d853932
Merge pull request #259 from contentstack/master
harshithad0703 Mar 2, 2026
590011b
Update sca-scan.yml
dhavaljain999 Mar 2, 2026
f4bde4b
Merge branch 'master' into feat/dx-5367-add-cursor-rules-skills
harshitha-cstk Mar 20, 2026
30afae3
docs: add AGENTS.md, Cursor rules, and agent skills
harshitha-cstk Mar 20, 2026
b827d20
Merge pull request #260 from contentstack/feat/dx-5367-add-cursor-rul…
harshitha-cstk Mar 20, 2026
cf3034b
Added variant utility
sunil-lakshman Mar 23, 2026
a36c992
fix: fixed missed coverage lines in test file
sunil-lakshman Mar 23, 2026
918c3bc
Merge pull request #261 from contentstack/enh/dx-5408
sunil-lakshman Mar 23, 2026
a0dac4c
Merge pull request #262 from contentstack/development
harshitha-cstk Mar 27, 2026
c1a84e6
Merge pull request #263 from contentstack/staging
harshitha-cstk Mar 30, 2026
0aa9d1a
Add highlight text transform
wenga86 Apr 2, 2026
69e5509
Remove auto formatting
wenga86 Apr 2, 2026
3ea4110
Add mark tag support
wenga86 Apr 2, 2026
e1196ef
Add mark to default arguments whitelist
wenga86 Apr 2, 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
27 changes: 27 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"subject-case": [0],
"subject-empty": [2, "never"],
"subject-full-stop": [2, "never", "."],
"type-enum": [
2,
"always",
[
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"sample"
]
],
"type-empty": [2, "never"]
}
}
26 changes: 26 additions & 0 deletions .cursor/rules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Cursor rules — `@contentstack/utils`

This folder holds project-specific rules for AI assistants working in **contentstack-utils-javascript**. For the full project overview, see **[`AGENTS.md`](../../AGENTS.md)** at the repository root.

## How rules are picked up

Each rule is a `.md`/`.mdc` file. Files with YAML frontmatter can set `description`, `globs`, and `alwaysApply`. Cursor uses these to decide when a rule is included in context.

### Referencing rules in chat

In Cursor, you can **`@`-mention** a rule file (e.g. type `@` and choose the rule from the list) to force its guidance into the conversation. The file name (without extension) is the usual handle, e.g. **`typescript`**, **`testing`**, **`code-review`**.

## Rule index

| File | `alwaysApply` | Globs | When it applies |
|------|----------------|-------|------------------|
| [`dev-workflow.md`](dev-workflow.md) | no | *(none)* | Branching, CI alignment, commits, releases, and day-to-day commands for this repo. |
| [`typescript.mdc`](typescript.mdc) | no | `src/**/*.ts`, `__test__/**/*.ts` | TypeScript version, layout, ESLint/Prettier, strictness, imports. |
| [`typescript-contentstack-utils.mdc`](typescript-contentstack-utils.mdc) | no | `src/**/*.ts` | Delivery-oriented utils only: RTE rendering, GQL helpers, endpoints JSON, Live Preview tags—**not** full CDA/CMA SDK surface. |
| [`testing.mdc`](testing.mdc) | no | `__test__/**/*.ts` | Jest, jsdom, mocks, coverage output paths, no live-test env. |
| [`code-review.mdc`](code-review.mdc) | **yes** | *(global)* | PR checklist: public API docs, compatibility, errors, dependencies, terminology (utils + delivery context). |

## Related

- **[`AGENTS.md`](../../AGENTS.md)** — Single entry point (package purpose, stack, commands).
- **[`skills/README.md`](../../skills/README.md)** — Longer-form skill docs for the same themes.
41 changes: 41 additions & 0 deletions .cursor/rules/code-review.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
description: PR review checklist for @contentstack/utils — API docs, compatibility, security, testing
alwaysApply: true
---

# Code review checklist — `@contentstack/utils`

Use severity labels (**Blocker / Major / Minor**) when triaging findings.

## Public API and documentation

- **Blocker/Major:** New or changed **exports** from `src/index.ts` need accurate **JSDoc** (or clear type names) matching runtime behavior.
- **Major:** README / CHANGELOG updates when behavior is user-visible or migration is needed.

## Backward compatibility

- **Blocker:** Unplanned breaking changes to **function signatures** or **default behavior** consumed by Delivery SDK integrations or documented `renderOption` contracts.
- **Major:** Stricter throwing on inputs that previously passed (especially `getContentstackEndpoint`, RTE traversals).

## Errors

- This package uses **plain `Error`** (e.g. `endpoints.ts`); new code should keep messages actionable. **Major:** Silent failures where callers need to detect bad input.

## Null safety and RTE edge cases

- **Major:** Missing guards on **null/undefined** node or entry fragments (historically sensitive in `entry-editable` / RTE paths).
- **Minor:** Align with **`strictNullChecks: false`** legacy but avoid widening undefined leaks into public types.

## Dependencies and SCA

- **Major:** New runtime deps are rare—justify any addition; **`prepublishOnly`** and hooks assume **`npm test`** and Snyk-friendly trees.
- Use **`npm audit` / Snyk** expectations per org policy.

## Tests

- **Blocker:** Behavioral fixes or new branches without **`__test__`** coverage when risk is high (RTE nesting, GQL URL rewriting, endpoint resolution).
- **Minor:** Snapshot-only tests where a small assertion would be clearer.

## Terminology

- **Major:** Docs/comments must describe this as **utils** alongside **CDA / Delivery / JSON RTE / GraphQL**, not as **CMA** unless the change is explicitly management-related.
38 changes: 38 additions & 0 deletions .cursor/rules/dev-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
description: Branching, CI, local commands, commit hooks, and release flow for contentstack-utils-javascript
alwaysApply: false
---

# Dev workflow — `@contentstack/utils`

## Branches and PRs

- **CI** (`Unit-Test-CI`) runs on **push/PR** to `development`, `staging`, and `master` (see `.github/workflows/ci.yml`).
- **Branch protection:** A workflow fails PRs that target **`staging`** when the head branch is **not** `development` (see `.github/workflows/check-branch.yml`). Prefer **`development`** as the integration branch when contributing upstream.
- Target the branch your team uses for integration; align with maintainers if unsure.

## Local development

| Task | Command / note |
|------|----------------|
| Build | `npm run build` (runs `prebuild`: clean `dist`, `download-regions`, then `tsc` + Rollup) |
| Test | `npm test` (includes `pretest` → build; Jest + coverage; `reports/`) |
| Format | `npm run format` (Prettier: `src/**/*.ts`) |
| ESLint | No `lint` script in `package.json`; run e.g. `npx eslint src __test__` using `eslint.config.js` |

## Git hooks (Husky)

- **`commit-msg`:** [Conventional Commits](https://www.conventionalcommits.org/) via **`commitlint`** (`.commitlintrc.json`).
- **`pre-commit`:** Requires **Snyk** (`snyk test --all-projects`) and **Talisman** installed locally. Set `SKIP_HOOK=1` to bypass (documented in the hook).

## PR expectations

- **`npm test`** passes (build + unit tests).
- **CHANGELOG.md** updated for user-visible changes when maintainers expect it.
- **Dependencies:** Be mindful of Snyk/SCA workflows; security-relevant bumps should be justified.

## Releases and versioning

- **Package version** lives in **`package.json`** (also reflected in **`CHANGELOG.md`**).
- **`prepublishOnly`** runs **`npm test`** before publish.
- **NPM / GitHub Packages:** Publishing is driven by **GitHub release `created`** (`.github/workflows/npm-publish.yml`); requires maintainer secrets (`NPM_TOKEN`, `GIT_TOKEN`). Bump version and changelog in the same change set as the release your team uses.
38 changes: 38 additions & 0 deletions .cursor/rules/testing.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
description: Jest tests, mocks, reports, and environments for @contentstack/utils
globs:
- __test__/**/*.ts
alwaysApply: false
---

# Testing — `@contentstack/utils`

## Framework

- **Jest 29** with **`ts-jest`** preset (`jest.config.ts`).
- **Environment:** **`jsdom`** (suitable for HTML string assertions and DOM-related behavior).

## Discovery and naming

- **Pattern:** `**/__test__/**/?(*.)+(spec|test).[jt]s?(x)` — this repo uses `*.test.ts` under **`__test__/`**.
- **Mocks / fixtures:** `__test__/mock/*.ts` — follow existing mock naming (`*-mock.ts`).

## Coverage and reports

- **Coverage** is collected from `src/**` excluding `src/index.ts` (`collectCoverageFrom`).
- Outputs: **`reports/coverage/`**, **`reports/html/`** (jest-html-reporters), **`reports/junit/`** (jest-junit), **`reports/report.json`** (from `npm test` script).

## Running tests

| Command | Behavior |
|---------|----------|
| `npm test` | Runs **`pretest` → build** then Jest (CI-aligned). |
| `npm run test:debug` | Watch mode, `--runInBand`. |

## Integration / live tests

- **None** in this repo. No `.env` or stack credentials required for **`npm test`**.

## Build dependency

- **`npm test` always builds first** (`pretest`). Ensure **`src/assets/regions.json`** exists or can be downloaded so `endpoints` tests pass.
34 changes: 34 additions & 0 deletions .cursor/rules/typescript-contentstack-utils.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
description: Contentstack utils package patterns — RTE, embedded items, GQL, endpoints (delivery-oriented companion, not CDA/CMA SDK)
globs:
- src/**/*.ts
alwaysApply: false
---

# `@contentstack/utils` — domain patterns

This repository implements **companion utilities** for Contentstack **content consumption** scenarios (typically with the **Delivery SDK** and **CDA / GraphQL** responses). It does **not** implement stack configuration, delivery tokens, or HTTP clients—callers fetch entry JSON elsewhere and pass it into these helpers.

## Mental model

| Area | Source anchors | Notes |
|------|----------------|-------|
| Render options / callbacks | `src/options/`, `src/render-embedded-objects.ts` | `RenderOption`-style maps: node types, marks, `block` / `inline` embeds, `reference`, `display`, `default`. |
| JSON RTE → HTML | `src/json-to-html.ts`, `src/nodes/*`, `src/helper/*` | Supercharged RTE path uses `paths` arrays for nested fields (see `README.md`). |
| Embedded object types | `src/Models/embedded-object.ts`, `src/Models/json-rte-model.ts` | Align typings with shapes coming from **delivery** entry JSON, not management APIs. |
| GraphQL | `src/gql.ts`, `src/updateAssetURLForGQL.ts` | Docs/comments describe use **after** GraphQL fetches; asset URL rewriting is response-shape specific. |
| Live Preview / CSLP tags | `src/entry-editable.ts` | `addTags` / exported `addEditableTags` — preserve existing attribute and locale behavior when changing tag generation. |
| Region endpoints | `src/endpoints.ts` | **`getContentstackEndpoint(region, service?, omitHttps?)`** reads **`src/assets/regions.json`**; throws plain `Error` with human-readable messages on bad region/service. |

## Terminology

- Prefer **CDA / Delivery / JSON RTE / GraphQL** vocabulary when describing behavior—**not** CMA unless you are explicitly discussing something management-only (rare here).
- **“SDK”** in docs often means **this utils package** or the **Delivery SDK** together—disambiguate in user-facing text.

## Concurrency / IO

- Pure synchronous transforms dominate; no retry or rate-limit layer. Do not add HTTP clients without an explicit product requirement.

## Official docs alignment

- Behavior should stay consistent with current **Content Delivery** / **Live Preview** / **JSON RTE** documentation. When in doubt, cite the relevant Contentstack doc set in PR descriptions rather than guessing CMS semantics.
34 changes: 34 additions & 0 deletions .cursor/rules/typescript.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
description: TypeScript conventions for @contentstack/utils (src and tests)
globs:
- src/**/*.ts
- __test__/**/*.ts
alwaysApply: false
---

# TypeScript — `@contentstack/utils`

## Tooling

- **TypeScript ~4.9** (`package.json`, `tsconfig.json`).
- **Bundler output:** `tsc` emits to `dist/lib` with declarations in `dist/types`; **Rollup** produces `dist/index.es.js` (`rollup.config.js`).
- **Strict mode** is on with **`strictNullChecks: false`** — new code should still minimize unnecessary null/undefined gaps when touching APIs.

## Layout

- **Library code:** `src/**/*.ts` only (`tsconfig.json` `include`); **tests** are under `__test__/` (excluded from `tsc` program but type-checked via Jest/tsconfig paths).
- **Public exports:** Maintain **`src/index.ts`** as the single export surface unless intentionally adding secondary entry points.

## Style and lint

- Match existing naming (PascalCase types, camelCase functions, existing file layout under `Models/`, `nodes/`, `helper/`, `options/`).
- **ESLint** flat config: `eslint.config.js` — `@typescript-eslint` recommended for `__test__`; source files use `js.configs.recommended` baseline.
- **Prettier:** `npm run format` scopes `src/**/*.ts`; keep formatting consistent when editing tests too.

## JSON / assets

- **`src/assets/regions.json`:** Consumed by `src/endpoints.ts`; populated by **`npm run download-regions`** during `prebuild`. Do not assume the file is committed (see root `.gitignore`).

## Logging

- No shared logger dependency; avoid introducing `console` noise in library paths unless consistent with nearby code.
20 changes: 20 additions & 0 deletions .github/workflows/check-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Check Branch'

on:
pull_request:

jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Comment PR
if: github.base_ref == 'staging' && github.head_ref != 'development'
uses: thollander/actions-comment-pull-request@v2
with:
message: |
We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the development branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch.
- name: Check branch
if: github.base_ref == 'staging' && github.head_ref != 'development'
run: |
echo "ERROR: We regret to inform you that you are currently not able to merge your changes into the master branch due to restrictions applied by our SRE team. To proceed with merging your changes, we kindly request that you create a pull request from the development branch. Our team will then review the changes and work with you to ensure a successful merge into the master branch."
exit 1
34 changes: 21 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
# This is a basic workflow to help you get started with Actions

name: Unit-Test-CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
branches: [ master, staging, development ]
pull_request:
branches: [ master ]
branches: [ master, staging, development ]

jobs:
build:
build-test:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- name: Install modules
run: npm install
- name: Run tests
run: npm run test
- uses: actions/checkout@v3
- uses: ArtiomTr/jest-coverage-report-action@v2
id: coverage-utils-js
with:
output: comment, report-markdown
- uses: marocchino/sticky-pull-request-comment@v2
with:
header: Contentstack Utils JS Coverage
recreate: true
message: ${{ steps.coverage-utils-js.outputs.report }}
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: JEST Tests
path: reports/junit/jest-*.xml
reporter: jest-junit
fail-on-error: true
68 changes: 68 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
pull_request:
# The branches below must be a subset of the branches above
branches: '*'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Loading