From cf3034b66df950132957f696861ac0b6fc8dbe42 Mon Sep 17 00:00:00 2001 From: sunil-lakshman <104969541+sunil-lakshman@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:29:38 +0530 Subject: [PATCH 1/2] Added variant utility --- CHANGELOG.md | 3 + __test__/mock/variant-fixtures.ts | 109 +++++++++++++++++++++++++ __test__/variant-aliases.test.ts | 108 ++++++++++++++++++++++++ package-lock.json | 4 +- package.json | 2 +- src/index.ts | 4 +- src/variant-aliases.ts | 131 ++++++++++++++++++++++++++++++ 7 files changed, 357 insertions(+), 4 deletions(-) create mode 100644 __test__/mock/variant-fixtures.ts create mode 100644 __test__/variant-aliases.test.ts create mode 100644 src/variant-aliases.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 0db76f5..4121676 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## [1.9.0](https://github.com/contentstack/contentstack-utils-javascript/tree/v1.9.0) +- Feat: Variant utilities `getVariantAliases` and `getVariantMetadataTags` to read variant alias strings from CDA entry `publish_details.variants` (requires fetches with the `x-cs-variant-uid` header set to aliases per [CDA variants](https://www.contentstack.com/docs/developers/apis/content-delivery-api#get-all-entry-variants)). + ## [1.8.0](https://github.com/contentstack/contentstack-utils-javascript/tree/v1.8.0) - Fix: JSON-to-HTML now outputs valid HTML for nested lists when JSON RTE exports the nested list as a sibling of the preceding list item (`
  • `). The SDK folds such sibling `
      `/`